﻿:root {
  --bg: #07090c;
  --text: #ecf3f8;
  --muted: #a3b2c0;
  --accent: #28d8c3;
  --accent-2: #ff9b55;
  --radius: 20px;
  --mx: 50%;
  --my: 35%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: radial-gradient(
      1200px 700px at 14% 12%,
      #13202b 0%,
      var(--bg) 52%
    ),
    var(--bg);
  font-family: "Sora", sans-serif;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle 220px at var(--mx) var(--my),
    rgba(255, 255, 255, 0.09),
    transparent 75%
  );
  z-index: 1;
}

.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.ambient-dot {
  position: absolute;
  left: var(--x);
  top: 110%;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.15) 65%,
    transparent 100%
  );
  opacity: 0;
  filter: blur(0.4px);
  animation:
    rise var(--dur) linear var(--delay) infinite,
    twinkle 3.4s ease-in-out var(--delay) infinite;
}

.glow {
  position: fixed;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.24;
  pointer-events: none;
}

.glow-a {
  background: var(--accent);
  top: -120px;
  right: -120px;
}

.glow-b {
  background: var(--accent-2);
  bottom: -170px;
  left: -100px;
}

.topbar,
.hero,
.footer {
  width: min(1120px, 92vw);
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.topbar {
  padding: 1.4rem 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-family: "Syne", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: brandPulse 4.4s ease-in-out infinite;
}

.hero {
  flex: 1;
  padding: 6.2rem 0 3.8rem;
}

.hub-line {
  margin: 0 0 1.25rem;
  text-align: center;
  font-family: "Syne", sans-serif;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, #cffff7, #7cead9, #ffd2ad, #cffff7);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 22px rgba(124, 234, 217, 0.32);
  animation: hubLineFlow 4s linear infinite;
}

.plugin-slider {
  width: min(1700px, 92vw);
  margin: 0 calc(50% - 46vw) 1.45rem;
}

.plugin-slider-window {
  height: 104px;
  overflow: hidden;
  border-radius: 0;
  border: none;
  background: transparent;
  padding: 0;
  position: relative;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.25) 8%,
    black 14%,
    black 86%,
    rgba(0, 0, 0, 0.25) 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.25) 8%,
    black 14%,
    black 86%,
    rgba(0, 0, 0, 0.25) 92%,
    transparent 100%
  );
}

.plugin-slider-track {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  will-change: transform;
}

.plugin-mini-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  flex: 0 0 clamp(220px, 24vw, 270px);
  align-items: center;
  gap: 0.6rem;
  min-height: 82px;
  padding: 0.4rem;
  border-radius: 13px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.plugin-mini-card:hover {
  transform: translateX(4px);
  border-color: rgba(40, 216, 195, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.plugin-mini-card img {
  width: 100%;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.plugin-mini-card span {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  line-height: 1.25;
}

.plugin-empty {
  min-height: 82px;
  width: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

.portal-grid {
  position: relative;
  margin-top: 2.4rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.ad-slot {
  width: min(100%, 980px);
  margin: 1.8rem auto 0;
}

.portal-grid::before,
.portal-grid::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(0.2px);
}

.portal-grid::before {
  left: -10px;
  top: -14px;
  background: radial-gradient(
    circle at 30% 30%,
    #d9fff9,
    rgba(40, 216, 195, 0.2)
  );
  box-shadow: 0 0 20px rgba(40, 216, 195, 0.6);
  animation: floatOrbit 5.8s ease-in-out infinite;
}

.portal-grid::after {
  right: -4px;
  bottom: -18px;
  width: 11px;
  height: 11px;
  background: radial-gradient(
    circle at 30% 30%,
    #fff0e0,
    rgba(255, 155, 85, 0.2)
  );
  box-shadow: 0 0 18px rgba(255, 155, 85, 0.55);
  animation: floatOrbit 6.6s ease-in-out infinite reverse;
}

.portal {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 154px;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 1.3rem;
  background:
    linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.09),
        rgba(255, 255, 255, 0.02)
      )
      padding-box,
    linear-gradient(
        140deg,
        rgba(40, 216, 195, 0.75),
        rgba(255, 155, 85, 0.55),
        rgba(40, 216, 195, 0.22)
      )
      border-box;
  backdrop-filter: blur(7px);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry))
    translateY(var(--lift));
  transform-style: preserve-3d;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition:
    transform 0.2s ease,
    box-shadow 0.28s ease;
}

.portal::before {
  content: "";
  position: absolute;
  top: -35%;
  left: -55%;
  width: 45%;
  height: 170%;
  transform: rotate(18deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.16),
    transparent
  );
  transition: left 0.6s ease;
  z-index: -1;
}

.portal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at 90% 10%,
    rgba(40, 216, 195, 0.2),
    transparent 34%
  );
  pointer-events: none;
  z-index: -1;
}

.portal:nth-child(1),
.portal:nth-child(2),
.portal:nth-child(3),
.portal:nth-child(4) {
  grid-column: span 3;
}

.portal:nth-child(5),
.portal:nth-child(6),
.portal:nth-child(7) {
  grid-column: span 4;
}

.portal:hover {
  --lift: -7px;
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.5),
    0 0 26px rgba(40, 216, 195, 0.26);
}

.portal:hover::before {
  left: 120%;
}

.portal-tag {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.55rem;
  padding: 0.26rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #c7fff8;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  animation: softPulse 3.2s ease-in-out infinite;
}

.portal h2 {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.42rem);
  line-height: 1.2;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 0 rgba(0, 0, 0, 0.5),
    0 3px 8px rgba(0, 0, 0, 0.45);
  transform: translateZ(16px);
  transition:
    transform 0.22s ease,
    text-shadow 0.22s ease;
}

.portal:hover h2 {
  transform: translateZ(24px);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12),
    0 3px 0 rgba(0, 0, 0, 0.6),
    0 8px 16px rgba(0, 0, 0, 0.5);
}

.footer {
  margin-top: auto;
  padding: 0 0 0.7rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

@keyframes floatOrbit {
  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-8px) translateX(4px);
    opacity: 1;
  }
}

@keyframes softPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(40, 216, 195, 0.2);
  }
  50% {
    box-shadow: 0 0 14px rgba(40, 216, 195, 0.35);
  }
}

@keyframes rise {
  0% {
    transform: translate3d(var(--drift), 0, 0);
    opacity: 0;
  }
  12% {
    opacity: var(--alpha);
  }
  88% {
    opacity: var(--alpha);
  }
  100% {
    transform: translate3d(calc(var(--drift) * -1), -120vh, 0);
    opacity: 0;
  }
}

@keyframes twinkle {
  0%,
  100% {
    filter: blur(0.4px) brightness(0.9);
  }
  50% {
    filter: blur(0.1px) brightness(1.25);
  }
}

@keyframes brandPulse {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(40, 216, 195, 0);
  }
  50% {
    text-shadow: 0 0 16px rgba(40, 216, 195, 0.38);
  }
}

@keyframes hubLineFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 220% 50%;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 4rem;
  }

  .portal:nth-child(1),
  .portal:nth-child(2),
  .portal:nth-child(3),
  .portal:nth-child(4),
  .portal:nth-child(5),
  .portal:nth-child(6),
  .portal:nth-child(7) {
    grid-column: span 12;
  }
}

@media (max-width: 620px) {
  .topbar {
    justify-content: center;
  }

  .footer {
    justify-content: center;
  }

  .plugin-slider-window {
    height: 88px;
    padding: 0;
  }

  .plugin-mini-card {
    grid-template-columns: 76px 1fr;
    flex-basis: clamp(195px, 72vw, 235px);
    min-height: 70px;
  }

  .plugin-mini-card img {
    height: 62px;
  }

  .plugin-mini-card span {
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-dot,
  .brand,
  .portal-tag,
  .hub-line {
    animation: none !important;
  }
}
