:root {
  --bg: #050816;
  --bg-soft: #0b1124;
  --text: #f4f7ff;
  --muted: #9aa6c8;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #7c5cff;
  --accent-2: #1fe0c8;
  --glow: 0 0 120px rgba(124, 92, 255, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 20%, rgba(124, 92, 255, 0.24), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(31, 224, 200, 0.16), transparent 22%),
    linear-gradient(180deg, #081020 0%, var(--bg) 55%, #04050b 100%);
  font-family: "Space Grotesk", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(26px);
  pointer-events: none;
}

.bg-orb-a {
  top: 8vh;
  left: -6rem;
  width: 16rem;
  height: 16rem;
  background: rgba(124, 92, 255, 0.26);
  box-shadow: var(--glow);
  animation: floatOrbA 14s ease-in-out infinite;
}

.bg-orb-b {
  right: -4rem;
  bottom: 10vh;
  width: 14rem;
  height: 14rem;
  background: rgba(31, 224, 200, 0.16);
  box-shadow: 0 0 80px rgba(31, 224, 200, 0.18);
  animation: floatOrbB 17s ease-in-out infinite;
}

.grid-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black, transparent 88%);
  opacity: 0.32;
  animation: pulseGrid 10s linear infinite;
}

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 72px;
  animation: fadeUp 700ms ease both;
}

.hero {
  padding: 3rem 0 1.2rem;
  display: flex;
  justify-content: center;
}

.hero-stack {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.kicker-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(31, 224, 200, 0.26);
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(8, 15, 31, 0.56);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  animation: drift 4.8s ease-in-out infinite;
}

.kicker-link:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 224, 200, 0.52);
  background: rgba(10, 18, 35, 0.82);
  box-shadow: 0 0 30px rgba(31, 224, 200, 0.16);
}

.portal-list {
  display: grid;
  gap: 14px;
  margin-top: 0.8rem;
  position: relative;
}

.portal {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 24px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
  animation: fadeUp 700ms ease both;
}

.portal:nth-child(1) {
  animation-delay: 80ms;
}

.portal:nth-child(2) {
  animation-delay: 160ms;
}

.portal:nth-child(3) {
  animation-delay: 240ms;
}

.portal:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(124, 92, 255, 0.38);
  background:
    linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(255, 255, 255, 0.05));
  box-shadow: 0 20px 50px rgba(9, 15, 30, 0.45);
}

.portal-live {
  box-shadow: 0 24px 60px rgba(6, 18, 36, 0.45);
}

.portal::after {
  content: "";
  position: absolute;
  inset: auto -20% -1px auto;
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(-12deg);
  opacity: 0.6;
}

.portal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.08) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 420ms ease;
}

.portal:hover::before {
  transform: translateX(120%);
}

.portal-meta {
  color: var(--accent-2);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.portal strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.05em;
}

.portal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.1);
  color: #b9a7ff;
  box-shadow: inset 0 0 20px rgba(124, 92, 255, 0.08);
}

.portal-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-live .portal-icon {
  border-color: rgba(145, 118, 255, 0.42);
  background: rgba(124, 92, 255, 0.13);
  color: #c9bbff;
}

.portal-icon-faceit {
  border-color: rgba(31, 224, 200, 0.34);
  background: rgba(31, 224, 200, 0.10);
  color: #6ef0df;
}

.portal-icon-faceit svg {
  fill: currentColor;
  stroke: none;
}

.portal-icon-plus {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #d3daf2;
}

.portal-icon-note {
  border-color: rgba(255, 255, 255, 0.14);
  background: #030406;
  color: #ffffff;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.04);
}

.letter-icon {
  font-family: "Unbounded", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.shell-detail {
  max-width: 1040px;
}

.detail-intro,
.detail-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  backdrop-filter: blur(10px);
  overflow: hidden;
  animation: fadeUp 800ms ease both;
}

.detail-intro {
  padding: 28px;
  box-shadow: 0 24px 60px rgba(6, 18, 36, 0.45);
  animation-delay: 90ms;
}

.detail-topline {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.detail-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 10px;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.06em;
}

.detail-copy {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.detail-connect {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.detail-side-title {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.detail-button:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.38);
  background: rgba(124, 92, 255, 0.12);
}

.detail-button-primary {
  border-color: rgba(31, 224, 200, 0.24);
  background: rgba(31, 224, 200, 0.12);
  color: #d9fff8;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.detail-card {
  padding: 24px;
}

.detail-grid .detail-card:nth-child(1) {
  animation-delay: 180ms;
}

.detail-grid .detail-card:nth-child(2) {
  animation-delay: 280ms;
}

.detail-card h2 {
  margin: 12px 0 18px;
  font-family: "Unbounded", sans-serif;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.command-list,
.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.command-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.command-list li,
.steps-list li {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.command-list li {
  display: grid;
  gap: 8px;
  position: relative;
}

.command-list li:hover,
.steps-list li:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.22);
  background: rgba(124, 92, 255, 0.06);
}

.command-list code {
  color: #d8cfff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
}

.command-list span,
.steps-list li {
  color: var(--muted);
  line-height: 1.65;
}

.command-list li.has-tooltip {
  cursor: help;
}

.command-tooltip {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(100% + 12px);
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(124, 92, 255, 0.24);
  border-radius: 16px;
  background: rgba(6, 10, 24, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 5;
}

.command-tooltip::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 100%;
  border-width: 8px;
  border-style: solid;
  border-color: rgba(6, 10, 24, 0.96) transparent transparent transparent;
}

.command-tooltip strong {
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.command-tooltip code {
  color: #f3ecff;
  font-size: 0.9rem;
}

.command-list li.has-tooltip:hover .command-tooltip,
.command-list li.has-tooltip:focus-within .command-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.steps-inline {
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.steps-compact {
  grid-template-columns: 1fr;
  width: 100%;
}

.steps-compact li {
  padding: 12px 14px;
}

.back-link {
  color: rgba(244, 247, 255, 0.72);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 180ms ease, transform 180ms ease;
}

.back-link:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes pulseGrid {
  0%,
  100% {
    opacity: 0.24;
  }
  50% {
    opacity: 0.38;
  }
}

@keyframes floatOrbA {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(18px, -12px, 0);
  }
}

@keyframes floatOrbB {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-14px, 14px, 0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.risk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.risk-safe {
  border-color: rgba(118, 166, 123, 0.34);
  background: rgba(118, 166, 123, 0.14);
  color: #cce4c7;
}

.risk-watch {
  border-color: rgba(194, 162, 90, 0.34);
  background: rgba(194, 162, 90, 0.14);
  color: #f0d79a;
}

.risk-avoid {
  border-color: rgba(183, 80, 80, 0.34);
  background: rgba(183, 80, 80, 0.14);
  color: #ffb4b4;
}

.detail-title-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  flex: 0 0 40px;
}

.detail-title-icon svg {
  width: 20px;
  height: 20px;
}

.faceit-title-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  flex: 0 0 48px;
}

.faceit-title-icon .letter-icon {
  font-size: 1.3rem;
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 22px, 960px);
    padding-top: 34px;
  }

  .hero {
    padding-top: 2rem;
  }

  .portal {
    padding: 20px 18px 18px;
    border-radius: 22px;
  }

  .detail-intro,
  .detail-card {
    border-radius: 22px;
  }
}

@media (max-width: 820px) {
  .detail-topline {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .command-list,
  .steps-inline,
  .steps-compact {
    grid-template-columns: 1fr;
  }

  .command-tooltip {
    left: 12px;
    right: 12px;
  }
}
