/* =====================================================
   ROOT / THEMES
   ===================================================== */

:root {
  --bg: #050505;
  --bg-soft: #080808;
  --surface: #0b0b0b;
  --surface-2: #101010;

  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.16);

  --text: #f5f5f5;
  --text-soft: #a0a0a0;
  --text-muted: #666666;

  --accent: #ffffff;
  --accent-soft: rgba(255,255,255,0.08);

  --purple: #8b5cf6;
  --purple-soft: rgba(139,92,246,0.15);

  --success: #6ee7b7;
  --warning: #fbbf24;
  --danger: #fb7185;

  --shadow: rgba(0,0,0,0.35);

  --radius: 18px;
  --radius-small: 12px;

  --container: 1180px;
}


/* =====================================================
   PURPLE THEME
   ===================================================== */

body[data-theme="purple"] {

  --bg: #08060d;
  --bg-soft: #0c0913;

  --surface: #100c19;
  --surface-2: #151020;

  --border: rgba(180,150,255,0.14);
  --border-hover: rgba(180,150,255,0.28);

  --text: #faf9ff;
  --text-soft: #aaa2bc;
  --text-muted: #71677e;

  --accent: #a78bfa;
  --accent-soft: rgba(167,139,250,0.12);

  --purple: #a78bfa;
  --purple-soft: rgba(167,139,250,0.18);

}


/* =====================================================
   LIGHT THEME
   ===================================================== */

body[data-theme="light"] {

  --bg: #f4f4f5;
  --bg-soft: #fafafa;

  --surface: #ffffff;
  --surface-2: #f7f7f7;

  --border: rgba(0,0,0,0.09);
  --border-hover: rgba(0,0,0,0.17);

  --text: #111111;
  --text-soft: #555555;
  --text-muted: #888888;

  --accent: #111111;
  --accent-soft: rgba(0,0,0,0.06);

  --purple: #111111;
  --purple-soft: rgba(0,0,0,0.06);

  --shadow: rgba(0,0,0,0.08);

}


/* =====================================================
   RESET
   ===================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {

  min-height: 100vh;

  background:
    radial-gradient(
      circle at 50% -20%,
      rgba(255,255,255,0.035),
      transparent 40%
    ),
    var(--bg);

  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  line-height: 1.6;

  transition:
    background 0.3s ease,
    color 0.3s ease;

}

body[data-theme="purple"] {
  background:
    radial-gradient(
      circle at 50% -15%,
      rgba(139,92,246,0.10),
      transparent 40%
    ),
    var(--bg);
}

body[data-theme="light"] {
  background:
    radial-gradient(
      circle at 50% -15%,
      rgba(0,0,0,0.025),
      transparent 40%
    ),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {

  width: min(
    calc(100% - 40px),
    var(--container)
  );

  margin: 0 auto;

}


/* =====================================================
   NAVIGATION
   ===================================================== */

.nav {

  height: 82px;

  display: flex;
  align-items: center;

  justify-content: space-between;

  gap: 30px;

}

.logo {

  display: flex;
  align-items: center;

  gap: 12px;

  font-size: 18px;
  font-weight: 750;

  letter-spacing: -0.5px;

  flex-shrink: 0;

}

.logo > div:last-child span {
  color: var(--text-soft);
}


/* =====================================================
   LUNOWARE ICON
   ===================================================== */

.logo-mark {

  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 13px;

  background: var(--accent);

  color: var(--bg);

  overflow: hidden;

  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.25s ease;

}

.logo:hover .logo-mark {
  transform: scale(1.04);
}

body[data-theme="purple"] .logo-mark {

  background: #ffffff;
  color: #08060d;

}

body[data-theme="light"] .logo-mark {

  background: #111111;
  color: #ffffff;

}

.lunoware-mark {

  width: 140%;
  height: 140%;

  display: block;

  transform: scale(1.08);

}


/* =====================================================
   NAV CENTER
   ===================================================== */

.nav-center {

  display: flex;
  align-items: center;

  gap: 6px;

  margin-left: auto;

}

.nav-center > a:not(.discord-btn) {

  padding: 9px 13px;

  border-radius: 9px;

  color: var(--text-soft);

  font-size: 14px;
  font-weight: 550;

  transition:
    color 0.2s ease,
    background 0.2s ease;

}

.nav-center > a:not(.discord-btn):hover {

  color: var(--text);

  background: var(--accent-soft);

}


/* =====================================================
   DISCORD
   ===================================================== */

.discord-btn {

  display: inline-flex;

  align-items: center;
  justify-content: center;

  gap: 8px;

  padding: 9px 14px;

  margin-left: 4px;

  border: 1px solid var(--border);

  border-radius: 10px;

  color: var(--text);

  font-size: 14px;
  font-weight: 650;

  background: var(--surface);

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;

}

.discord-btn:hover {

  border-color: var(--border-hover);

  background: var(--surface-2);

  transform: translateY(-1px);

}

.discord-icon {

  width: 17px;
  height: 17px;

  fill: currentColor;

  display: block;

}


/* =====================================================
   THEME SWITCHER + LOGIN
   ===================================================== */

.nav-right {

  display: flex;
  align-items: center;

  gap: 10px;

  flex-shrink: 0;

}

.theme-switcher {

  display: flex;
  align-items: center;

  padding: 4px;

  gap: 2px;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: 10px;

  flex-shrink: 0;

}

.theme-btn {

  border: 0;

  background: transparent;

  color: var(--text-muted);

  padding: 7px 10px;

  border-radius: 7px;

  cursor: pointer;

  font-size: 12px;
  font-weight: 650;

  transition:
    background 0.2s ease,
    color 0.2s ease;

}

.theme-btn:hover {
  color: var(--text);
}

.theme-btn.active {

  background: var(--accent);

  color: var(--bg);

}

body[data-theme="purple"] .theme-btn.active {

  background: #a78bfa;
  color: #08060d;

}

body[data-theme="light"] .theme-btn.active {

  background: #111111;
  color: #ffffff;

}


/* =====================================================
   LOGIN BUTTON
   ===================================================== */

.btn-login {

  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 9px 18px;

  border: none;

  border-radius: 10px;

  color: var(--bg);

  font-size: 14px;
  font-weight: 700;

  background: var(--accent);

  cursor: pointer;

  transition:
    transform 0.2s ease,
    opacity 0.2s ease;

}

body[data-theme="purple"] .btn-login {

  background: #a78bfa;
  color: #08060d;

}

body[data-theme="light"] .btn-login {

  background: #111111;
  color: #ffffff;

}

.btn-login:hover {

  transform: translateY(-2px);
  opacity: 0.92;

}


/* =====================================================
   HERO
   ===================================================== */

.hero {

  min-height: 680px;

  display: flex;
  align-items: center;

  padding:
    90px 0
    100px;

  position: relative;

  overflow: hidden;

}

.hero::before {

  content: "";

  position: absolute;

  width: 650px;
  height: 650px;

  top: -350px;
  left: 50%;

  transform: translateX(-50%);

  border-radius: 50%;

  background: rgba(255,255,255,0.025);

  filter: blur(20px);

  pointer-events: none;

}

body[data-theme="purple"] .hero::before {
  background: rgba(139,92,246,0.08);
}

body[data-theme="light"] .hero::before {
  background: rgba(0,0,0,0.025);
}

.hero-content {

  max-width: 780px;

  position: relative;
  z-index: 1;

}

.eyebrow {

  display: inline-flex;

  align-items: center;

  gap: 8px;

  margin-bottom: 18px;

  color: var(--text-muted);

  font-size: 11px;
  font-weight: 750;

  letter-spacing: 2px;

  text-transform: uppercase;

}

.eyebrow::before {

  content: "";

  width: 18px;
  height: 1px;

  background: currentColor;

  opacity: 0.7;

}

h1 {

  font-size: clamp(
    60px,
    9vw,
    108px
  );

  line-height: 0.88;

  letter-spacing: -6px;

  font-weight: 850;

  margin-bottom: 35px;

}

h1 span {

  color: var(--text-soft);

}

.hero-description {

  max-width: 610px;

  color: var(--text-soft);

  font-size: 16px;

  line-height: 1.8;

  margin-bottom: 32px;

}


/* =====================================================
   BUTTONS
   ===================================================== */

.buttons {

  display: flex;

  flex-wrap: wrap;

  gap: 10px;

  margin-bottom: 60px;

}

.btn {

  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 46px;

  padding: 0 18px;

  border-radius: 10px;

  font-size: 14px;
  font-weight: 700;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;

}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {

  background: var(--accent);
  color: var(--bg);

}

body[data-theme="purple"] .btn-primary {

  background: #a78bfa;
  color: #08060d;

}

body[data-theme="light"] .btn-primary {

  background: #111111;
  color: #ffffff;

}

.btn-secondary {

  border: 1px solid var(--border);

  background: var(--surface);

  color: var(--text);

}

.btn-secondary:hover {
  border-color: var(--border-hover);
}


/* =====================================================
   STATS
   ===================================================== */

.stats {

  display: flex;

  flex-wrap: wrap;

  gap: 40px;

}

.stat {

  display: flex;

  flex-direction: column;

  gap: 3px;

}

.stat strong {

  font-size: 21px;
  font-weight: 800;

  letter-spacing: -0.5px;

}

.stat span {

  color: var(--text-muted);

  font-size: 12px;

}


/* =====================================================
   SECTIONS
   ===================================================== */

section {

  padding: 100px 0;

  border-top: 1px solid var(--border);

}

.section-head {

  display: flex;

  align-items: flex-end;

  justify-content: space-between;

  gap: 40px;

  margin-bottom: 45px;

}

.section-head h2 {

  font-size: clamp(32px, 5vw, 52px);

  line-height: 1;

  letter-spacing: -2px;

}

.section-head > p {

  max-width: 390px;

  color: var(--text-soft);

  font-size: 14px;

  line-height: 1.7;

}


/* =====================================================
   GAMES GRID
   ===================================================== */

.grid {

  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 14px;

}


/* =====================================================
   GAME CARD
   ===================================================== */

.card {

  min-height: 250px;

  padding: 24px;

  position: relative;

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: var(--radius);

  overflow: hidden;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;

}

.card::before {

  content: "";

  position: absolute;

  width: 160px;
  height: 160px;

  top: -100px;
  right: -80px;

  border-radius: 50%;

  background: rgba(255,255,255,0.025);

  pointer-events: none;

}

body[data-theme="purple"] .card::before {
  background: rgba(139,92,246,0.06);
}

body[data-theme="light"] .card::before {
  background: rgba(0,0,0,0.025);
}

.card:hover {

  transform: translateY(-4px);

  border-color: var(--border-hover);

  box-shadow:
    0 15px 40px var(--shadow);

}


/* =====================================================
   CARD TOP
   ===================================================== */

.card-top {

  width: 100%;

  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 12px;

  margin-bottom: 24px;

}

.game-icon {

  width: 42px;
  height: 42px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background: var(--accent-soft);

  border: 1px solid var(--border);

  color: var(--text);

  font-size: 18px;

}


/* =====================================================
   STATUS BADGES
   ===================================================== */

.badges {

  display: flex;

  flex-wrap: wrap;

  justify-content: flex-end;

  gap: 5px;

}

.badge {

  display: inline-flex;

  align-items: center;

  min-height: 23px;

  padding: 0 8px;

  border-radius: 6px;

  border: 1px solid var(--border);

  background: var(--surface-2);

  color: var(--text-muted);

  font-size: 9px;

  font-weight: 800;

  letter-spacing: 0.7px;

  text-transform: uppercase;

}

.badge-paid {

  color: var(--warning);

  border-color: rgba(251,191,36,0.18);

  background: rgba(251,191,36,0.06);

}

.badge-keyless {

  color: var(--success);

  border-color: rgba(110,231,183,0.18);

  background: rgba(110,231,183,0.06);

}

.badge-patched {

  color: var(--danger);

  border-color: rgba(251,113,133,0.18);

  background: rgba(251,113,133,0.06);

}

.badge-updating {

  color: var(--warning);

  border-color: rgba(251,191,36,0.18);

  background: rgba(251,191,36,0.06);

}


/* =====================================================
   CARD CONTENT
   ===================================================== */

.card h3 {

  font-size: 20px;

  line-height: 1.2;

  letter-spacing: -0.5px;

  margin-bottom: 8px;

}

.card-description {

  color: var(--text-soft);

  font-size: 13px;

  line-height: 1.65;

  margin-bottom: 25px;

}

.card-bottom {

  width: 100%;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 10px;

  margin-top: auto;

  padding-top: 16px;

  border-top: 1px solid var(--border);

}

.version {

  color: var(--text-muted);

  font-size: 11px;

  font-weight: 650;

}

.game-id {

  color: var(--text-muted);

  font-size: 10px;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;

  opacity: 0.65;

}


/* =====================================================
   LOADING
   ===================================================== */

.games-loading {

  grid-column: 1 / -1;

  min-height: 220px;

  display: flex;

  align-items: center;
  justify-content: center;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  color: var(--text-muted);

  font-size: 13px;

}

.games-error {

  grid-column: 1 / -1;

  padding: 25px;

  border: 1px solid rgba(251,113,133,0.2);

  border-radius: var(--radius);

  background: rgba(251,113,133,0.04);

  color: var(--danger);

  font-size: 13px;

  line-height: 1.7;

}


/* =====================================================
   FEATURES / SHOWCASE
   ===================================================== */

.showcase {

  display: grid;

  grid-template-columns:
    minmax(0, 1.35fr)
    minmax(300px, 0.65fr);

  gap: 14px;

}

.terminal {

  min-height: 390px;

  overflow: hidden;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  background: #030303;

  color: #e8e8e8;

  box-shadow:
    0 20px 60px rgba(0,0,0,0.25);

}

body[data-theme="light"] .terminal {
  background: #111111;
}

.terminal-bar {

  height: 46px;

  display: flex;
  align-items: center;

  gap: 7px;

  padding: 0 16px;

  border-bottom: 1px solid rgba(255,255,255,0.07);

}

.circle {

  width: 9px;
  height: 9px;

  border-radius: 50%;

  background: #444;

}

.circle:first-child {
  background: #ff5f57;
}

.circle:nth-child(2) {
  background: #febc2e;
}

.circle:nth-child(3) {
  background: #28c840;
}

.terminal pre {

  padding: 30px;

  overflow-x: auto;

  color: #dddddd;

  font-size: 14px;

  line-height: 1.9;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;

}

.gray {
  color: #777;
}

.feature-stack {

  display: flex;

  flex-direction: column;

  gap: 14px;

}

.feature {

  flex: 1;

  padding: 24px;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  background: var(--surface);

}

.feature b {

  display: block;

  margin-bottom: 8px;

  font-size: 14px;

}

.feature p {

  color: var(--text-soft);

  font-size: 13px;

  line-height: 1.7;

}


/* =====================================================
   CTA
   ===================================================== */

.cta {

  padding: 70px 40px;

  text-align: center;

  border: 1px solid var(--border);

  border-radius: 24px;

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255,255,255,0.04),
      transparent 55%
    ),
    var(--surface);

}

body[data-theme="purple"] .cta {

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(139,92,246,0.10),
      transparent 55%
    ),
    var(--surface);

}

body[data-theme="light"] .cta {

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(0,0,0,0.035),
      transparent 55%
    ),
    var(--surface);

}

.cta .eyebrow {
  justify-content: center;
}

.cta h2 {

  margin-bottom: 16px;

  font-size: clamp(
    36px,
    6vw,
    68px
  );

  line-height: 1;

  letter-spacing: -3px;

}

.cta p {

  max-width: 560px;

  margin:
    0 auto
    28px;

  color: var(--text-soft);

  font-size: 14px;

}


/* =====================================================
   FOOTER
   ===================================================== */

footer {

  padding: 30px 0;

  border-top: 1px solid var(--border);

}

.footer-inner {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  color: var(--text-muted);

  font-size: 11px;

}

.footer-logo {

  color: var(--text);

  font-weight: 750;

}


/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1000px) {

  .nav {
    gap: 15px;
  }

  .nav-center {
    display: none;
  }

  .grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {

  .container {
    width: min(
      calc(100% - 28px),
      var(--container)
    );
  }

  .nav {
    height: 72px;
  }

  .nav-right {
    margin-left: auto;
  }

  .theme-btn {
    padding: 6px 8px;
  }

  .logo-mark {
    width: 42px;
    height: 42px;
  }

  .logo {
    gap: 9px;
    font-size: 16px;
  }

  .hero {

    min-height: auto;

    padding:
      80px 0
      90px;

  }

  h1 {

    font-size: clamp(
      55px,
      17vw,
      85px
    );

    letter-spacing: -5px;

  }

  .section-head {

    align-items: flex-start;

    flex-direction: column;

    gap: 15px;

  }

  .section-head > p {
    max-width: 100%;
  }

  .grid {

    grid-template-columns:
      1fr;

  }

  .showcase {

    grid-template-columns:
      1fr;

  }

  .terminal {
    min-height: 300px;
  }

  .stats {
    gap: 25px;
  }

  .cta {
    padding:
      55px 22px;
  }

  .footer-inner {

    flex-direction: column;

    text-align: center;

  }

}

@media (max-width: 480px) {

  .theme-btn {
    font-size: 10px;
    padding: 6px 7px;
  }

  .logo > div:last-child {
    display: none;
  }

  .buttons {

    flex-direction: column;

  }

  .btn {
    width: 100%;
  }

  .card {
    min-height: 235px;
  }

}