:root {
  --bg-deep: #051126;
  --bg-mid: #0a2142;
  --bg-soft: #153866;
  --panel: rgba(9, 21, 43, 0.82);
  --panel-strong: rgba(6, 16, 34, 0.94);
  --panel-border: rgba(122, 186, 255, 0.16);
  --ink: #f3f7ff;
  --muted: #b8cbe7;
  --mustard: #d7a537;
  --mustard-deep: #9d6d0c;
  --cyan: #66d7ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  --header-height: 92px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Aptos", "Trebuchet MS", "Gill Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 18%, rgba(102, 215, 255, 0.14), transparent 24%),
    radial-gradient(circle at 84% 14%, rgba(215, 165, 55, 0.12), transparent 22%),
    linear-gradient(180deg, var(--bg-mid), var(--bg-deep) 62%, #030815 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(70px);
}

body::before {
  width: 28vw;
  height: 28vw;
  left: -6vw;
  top: 12vh;
  background: rgba(60, 146, 255, 0.14);
}

body::after {
  width: 30vw;
  height: 30vw;
  right: -8vw;
  bottom: -8vh;
  background: rgba(215, 165, 55, 0.13);
}

.home-page {
  overflow-x: hidden;
}

.explore-page {
  overflow: hidden;
}

.explore-page::before,
.explore-page::after {
  display: none;
}

.site-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 24px;
  background: rgba(4, 14, 31, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: min(221px, 32vw);
  height: auto;
  border-radius: 10px;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(4, 14, 31, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.nav-link:hover:not(.is-disabled) {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.nav-link.is-active {
  background: rgba(102, 215, 255, 0.1);
  color: var(--cyan);
}

.nav-link.is-disabled {
  opacity: 0.42;
  cursor: default;
}

.music-button,
.primary-button,
.secondary-button,
.panel-button,
.sidebar-toggle,
.cta-button {
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.music-button {
  appearance: none;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 14, 31, 0.82);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.music-button:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 215, 255, 0.24);
}

.home-main {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-height) + 26px) 28px 36px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 26px;
  align-items: stretch;
  min-height: calc(100vh - var(--header-height) - 62px);
}

.hero-copy-panel,
.hero-showcase,
.showcase-card,
.page-banner,
.game-frame,
.shop-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-copy-panel,
.hero-showcase {
  border-radius: 34px;
  padding: 36px;
  background:
    linear-gradient(180deg, rgba(20, 41, 74, 0.72), rgba(6, 16, 34, 0.92)),
    var(--panel);
}

.hero-copy-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-kicker,
.card-kicker,
.banner-kicker,
.shop-kicker {
  margin: 0;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy-panel h1,
.page-banner h1 {
  margin: 16px 0 0;
  font-family: Rockwell, "Bookman Old Style", Georgia, serif;
  line-height: 0.96;
}

.hero-copy-panel h1 {
  font-size: clamp(2.7rem, 5vw, 5.4rem);
  text-wrap: balance;
}

.hero-copy {
  width: min(620px, 100%);
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 24px;
  text-decoration: none;
}

.primary-button {
  background: linear-gradient(135deg, #f6d16f, var(--mustard));
  color: #1d1400;
  box-shadow: 0 18px 42px rgba(215, 165, 55, 0.28);
}

.secondary-button {
  border: 1px solid rgba(102, 215, 255, 0.18);
  background: rgba(102, 215, 255, 0.08);
  color: var(--cyan);
}

.primary-button:hover,
.secondary-button:hover,
.panel-button:hover,
.sidebar-toggle:hover,
.cta-button:hover {
  transform: translateY(-1px);
}

.secondary-button.compact {
  min-height: 48px;
  padding: 0 18px;
}

.hero-showcase {
  display: grid;
  gap: 18px;
}

.showcase-card {
  border-radius: 28px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(16, 34, 62, 0.72), rgba(5, 14, 30, 0.94)),
    var(--panel-strong);
}

.showcase-card h2,
.showcase-card h3 {
  margin: 14px 0 0;
  font-family: Rockwell, "Bookman Old Style", Georgia, serif;
}

.showcase-card h2 {
  font-size: 2rem;
}

.showcase-card h3 {
  font-size: 1.35rem;
}

.showcase-card p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.explore-main {
  position: relative;
  z-index: 1;
  padding: 0;
  min-height: 100vh;
}

.page-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 18px 22px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(18, 39, 70, 0.72), rgba(5, 14, 30, 0.94)),
    var(--panel);
}

.page-banner h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
}

.game-section {
  min-width: 0;
}

.game-frame {
  position: relative;
  overflow: hidden;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  background: rgba(3, 9, 22, 1);
}

.game-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.3)),
    linear-gradient(90deg, rgba(2, 8, 22, 0.66), transparent 10%, transparent 90%, rgba(2, 8, 22, 0.66));
}

#game {
  width: 100%;
  height: 100%;
}

#game canvas {
  display: block;
  width: 100%;
  height: auto;
}

.control-ribbon {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: min(760px, calc(100% - 36px));
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 15, 32, 0.74);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  backdrop-filter: blur(16px);
}

.hud-pill.accent {
  color: #1b1300;
  background: linear-gradient(135deg, #f6d16f, var(--mustard));
  border-color: rgba(215, 165, 55, 0.24);
}

.sidebar-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 7;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(102, 215, 255, 0.18);
  background: rgba(6, 16, 34, 0.88);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 1;
}

.sidebar-toggle.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.shop-overlay {
  position: absolute;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(420px, calc(100% - 36px));
  z-index: 8;
  pointer-events: none;
}

.shop-panel {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 22px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(18, 39, 70, 0.78), rgba(5, 14, 30, 0.98)),
    var(--panel-strong);
  transform: translateX(112%);
  opacity: 0;
  transition:
    transform 220ms ease,
    opacity 220ms ease;
  pointer-events: auto;
}

.shop-overlay.is-open .shop-panel {
  transform: translateX(0);
  opacity: 1;
}

.shop-panel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-button {
  appearance: none;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  background: linear-gradient(135deg, #f6d16f, var(--mustard));
  color: #1d1400;
  cursor: pointer;
}

.panel-button.muted {
  border: 1px solid rgba(102, 215, 255, 0.18);
  background: rgba(102, 215, 255, 0.08);
  color: var(--cyan);
}

.shop-kicker {
  margin-top: 18px;
}

#shop-title {
  margin: 12px 0 0;
  font-family: Rockwell, "Bookman Old Style", Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  line-height: 1.04;
}

.shop-description,
.shop-help,
.video-placeholder {
  color: var(--muted);
  line-height: 1.6;
}

.shop-description {
  margin: 14px 0 0;
}

.video-shell {
  margin-top: 18px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(102, 215, 255, 0.06), rgba(215, 165, 55, 0.05)),
    rgba(1, 8, 20, 0.82);
  min-height: 250px;
}

#video-frame {
  display: block;
  width: 100%;
  min-height: 300px;
  border: 0;
  background: rgba(1, 8, 20, 0.96);
}

.video-placeholder {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 24px;
  text-align: center;
}

.shop-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  text-decoration: none;
}

.cta-button.secondary {
  border: 1px solid rgba(102, 215, 255, 0.18);
  background: rgba(102, 215, 255, 0.08);
  color: var(--cyan);
}

.cta-button:not(.secondary) {
  background: linear-gradient(135deg, #f6d16f, var(--mustard));
  color: #1d1400;
  box-shadow: 0 16px 36px rgba(215, 165, 55, 0.22);
}

.cta-button.is-disabled {
  pointer-events: none;
  opacity: 0.45;
  box-shadow: none;
}

.shop-help {
  margin: 16px 0 0;
  font-size: 0.95rem;
}

@media (max-width: 1100px) {
  .home-hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  :root {
    --header-height: 124px;
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .header-right {
    justify-content: space-between;
  }

  .site-nav {
    overflow-x: auto;
  }

  .home-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-copy-panel,
  .hero-showcase {
    padding: 26px;
  }

  .page-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-frame {
    height: 100vh;
    min-height: 100vh;
  }
}

@media (max-width: 700px) {
  .brand-logo {
    width: min(170px, 46vw);
  }

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

  .hero-actions,
  .shop-panel-actions,
  .shop-links {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .panel-button,
  .cta-button {
    width: 100%;
  }

  .control-ribbon {
    right: 14px;
    left: 14px;
    bottom: 14px;
    max-width: none;
  }

  .sidebar-toggle {
    top: 14px;
    right: 14px;
  }

  .shop-overlay {
    top: 14px;
    right: 14px;
    left: 14px;
    width: auto;
    bottom: 14px;
  }
}
