:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f3f3ef;
  --border: #e2e2dc;
  --text: #1a1a1e;
  --text-muted: #64646e;
  --accent: #a8e600;
  --accent-dim: #8bc400;
  --accent-glow: rgba(168, 230, 0, 0.22);
  --danger: #e03e3e;
  --success: #22a06b;
  --container: 1140px;
  --photo-filter: saturate(0.72) contrast(1.03) brightness(1.05);
  --photo-overlay: linear-gradient(
    160deg,
    rgba(255, 252, 245, 0.42) 0%,
    rgba(248, 246, 240, 0.28) 45%,
    rgba(255, 255, 255, 0.18) 100%
  );
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #1a1a10;
}

img { max-width: 100%; display: block; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top, 0);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex-shrink: 1;
}

.nav-brand img {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  object-fit: contain;
}

.nav-brand-text {
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.nav-brand-text .accent {
  color: var(--accent);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
}

.nav-link {
  color: var(--text-muted);
  transition: color 0.15s;
}

.nav-link:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-follow {
  display: none;
}

@media (min-width: 640px) {
  .nav-follow { display: inline-flex; }
}

.menu-btn {
  display: flex;
  padding: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.menu-btn:hover { color: var(--text); }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.mobile-menu.open { display: flex; }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #1a1a10;
}

.btn-primary:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.btn-sm {
  height: 2.25rem;
  padding: 0 1rem;
  font-size: 0.8125rem;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("assets/hero-bg.png") center / cover no-repeat;
  filter: var(--photo-filter);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 252, 245, 0.55) 0%, rgba(250, 248, 242, 0.82) 55%, rgba(250, 250, 247, 0.94) 100%),
    var(--photo-overlay),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}

.hero-rocket {
  display: none;
  position: absolute;
  left: 75%;
  top: 90%;
  width: clamp(170px, 20vw, 260px);
  z-index: 1;
  pointer-events: none;
  will-change: transform;
  --boost-scale: 1;
  --boost-opacity: 1;
}

.hero-rocket--hovering .hero-boost-flame--outer { animation-duration: 0.07s; }
.hero-rocket--hovering .hero-boost-flame--main { animation-duration: 0.06s; }
.hero-rocket--hovering .hero-boost-flame--inner { animation-duration: 0.08s; }
.hero-rocket--hovering .hero-spark { animation-duration: 0.4s; }

.hero-rocket-img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
  filter: var(--photo-filter) drop-shadow(0 20px 36px rgba(26, 26, 30, 0.16));
  transform-origin: 50% 72%;
}

.hero-rocket-boost {
  position: absolute;
  bottom: 10%;
  left: 50%;
  width: 80px;
  height: 140px;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.hero-boost-flame {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  animation: boost-flicker ease-in-out infinite alternate;
}

.hero-boost-flame--outer {
  width: calc(34px * var(--boost-scale));
  height: calc(88px * var(--boost-scale));
  border-radius: 50% 50% 42% 42% / 68% 68% 32% 32%;
  background: linear-gradient(to bottom, #b8e020 0%, #ff9a30 55%, #e85a20 78%, transparent 100%);
  opacity: calc(0.82 * var(--boost-opacity));
  animation-duration: 0.1s;
}

.hero-boost-flame--main {
  width: calc(22px * var(--boost-scale));
  height: calc(68px * var(--boost-scale));
  border-radius: 50% 50% 40% 40% / 72% 72% 28% 28%;
  background: linear-gradient(to bottom, #d8f040 0%, #a8e600 35%, #ff8830 72%, transparent 100%);
  opacity: var(--boost-opacity);
  animation-duration: 0.08s;
  animation-delay: -0.03s;
}

.hero-boost-flame--inner {
  width: calc(10px * var(--boost-scale));
  height: calc(36px * var(--boost-scale));
  border-radius: 50% 50% 38% 38% / 75% 75% 25% 25%;
  background: linear-gradient(to bottom, #fffce8 0%, #ffe878 45%, #ffaa40 80%, transparent 100%);
  opacity: var(--boost-opacity);
  animation-duration: 0.12s;
  animation-delay: -0.06s;
}

.hero-boost-sparks {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100px;
  height: 120px;
  transform: translateX(-50%);
  pointer-events: none;
  overflow: visible;
}

.hero-spark {
  position: absolute;
  bottom: 4px;
  left: 50%;
  opacity: 0;
  animation: boost-spark-fly linear infinite;
}

.hero-spark--dot {
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: #ffbb22;
  border: 1px solid #e87810;
}

.hero-spark--ember {
  width: 5px;
  height: 11px;
  margin-left: -2px;
  border-radius: 40%;
  background: linear-gradient(to bottom, #ffe066 0%, #ff9922 100%);
  border: 1px solid #d86a10;
}

.hero-spark--streak {
  width: 3px;
  height: 14px;
  margin-left: -1px;
  border-radius: 2px;
  background: linear-gradient(to bottom, #c8e600 0%, #ff7722 100%);
}

.hero-spark--1 { --dx: -18px; --rot: -25deg; animation-duration: 0.55s; animation-delay: 0s; }
.hero-spark--2 { --dx: 14px;  --rot: 18deg;  animation-duration: 0.62s; animation-delay: 0.08s; }
.hero-spark--3 { --dx: -8px;  --rot: -8deg;  animation-duration: 0.48s; animation-delay: 0.16s; }
.hero-spark--4 { --dx: 22px;  --rot: 32deg;  animation-duration: 0.7s;  animation-delay: 0.24s; }
.hero-spark--5 { --dx: -26px; --rot: -42deg; animation-duration: 0.58s; animation-delay: 0.05s; }
.hero-spark--6 { --dx: 6px;   --rot: 6deg;   animation-duration: 0.65s; animation-delay: 0.14s; }
.hero-spark--7 { --dx: -12px; --rot: -18deg; animation-duration: 0.52s; animation-delay: 0.28s; }
.hero-spark--8 { --dx: 18px;  --rot: 24deg;  animation-duration: 0.45s; animation-delay: 0.1s; }
.hero-spark--9 { --dx: -20px; --rot: -30deg; animation-duration: 0.6s;  animation-delay: 0.2s; }
.hero-spark--10 { --dx: 10px; --rot: 12deg; animation-duration: 0.5s;  animation-delay: 0.32s; }

.hero-spark--2.hero-spark--dot { background: #a8e600; border-color: #6a9a00; }
.hero-spark--4.hero-spark--dot { background: #ff8833; border-color: #cc5510; width: 7px; height: 7px; margin-left: -3px; }
.hero-spark--7.hero-spark--ember { background: linear-gradient(to bottom, #fff0a0 0%, #ffaa33 100%); height: 13px; }
.hero-spark--10.hero-spark--streak { height: 18px; background: linear-gradient(to bottom, #d8f030 0%, #ff6622 100%); }

@keyframes boost-flicker {
  0% { transform: translateX(-50%) scaleX(1) scaleY(1); }
  33% { transform: translateX(-46%) scaleX(0.84) scaleY(1.14); }
  66% { transform: translateX(-54%) scaleX(1.08) scaleY(0.9); }
  100% { transform: translateX(-50%) scaleX(0.94) scaleY(1.08); }
}

@keyframes boost-spark-fly {
  0% {
    transform: translate(0, 0) rotate(var(--rot, 0deg)) scale(1);
    opacity: 0;
  }
  8% { opacity: 1; }
  70% { opacity: 0.85; }
  100% {
    transform: translate(var(--dx, 0), calc(90px * var(--boost-scale))) rotate(var(--rot, 0deg)) scale(0.5);
    opacity: 0;
  }
}

@media (min-width: 768px) {
  .hero-rocket {
    display: block;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 6rem 0 5rem;
  max-width: 40rem;
  margin: 0 auto;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.78);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0 0 1.25rem;
}

.hero-title .accent { color: var(--accent); }

.hero-desc {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 auto 2rem;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ── Sections ── */
.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.section-alt { background: var(--surface); }

.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  line-height: 1.15;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 36rem;
  margin: 0;
}

/* ── About ── */
.about-grid {
  display: grid;
  gap: 1.5rem;
  align-items: stretch;
}

.about-col-copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.about-col-game {
  display: flex;
  min-width: 0;
}

.about-intro .section-desc {
  max-width: none;
}

.about-cards {
  display: grid;
  gap: 0.875rem;
  flex: 1;
}

.about-card {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: border-color 0.15s;
}

.about-card:hover { border-color: var(--accent); }

.about-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.about-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.about-preview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
}

.about-preview-stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 220px;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  background: linear-gradient(180deg, #eef0ea 0%, #e4e6e0 100%);
}

.about-preview-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.about-preview-mult {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1.75rem, 7vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: #f4f4f6;
  text-shadow: 0 0 32px var(--accent-glow);
  pointer-events: none;
  z-index: 2;
  transition: color 0.15s;
}

.about-preview-mult.live { color: #b8f06a; }
.about-preview-mult.crashed { color: var(--danger); }

.about-preview-status {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c5c64;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  z-index: 2;
  pointer-events: none;
}

.about-preview-status.live {
  color: var(--accent);
  border-color: rgba(168, 230, 0, 0.3);
}

.about-preview-status.crashed {
  color: var(--danger);
  border-color: rgba(255, 77, 77, 0.3);
}

.about-preview-cta {
  width: 100%;
  justify-content: center;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .about-preview-stage {
    min-height: 0;
  }
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
    gap: 2.5rem;
  }
}

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--surface-2);
  box-shadow: 0 2px 12px rgba(26, 26, 30, 0.06);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--photo-filter);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--photo-overlay);
  mix-blend-mode: soft-light;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(26, 26, 30, 0.18) 0%, transparent 55%);
  opacity: 0;
  z-index: 2;
  transition: opacity 0.2s;
  pointer-events: none;
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: saturate(0.82) contrast(1.04) brightness(1.06);
}

.gallery-item:hover::after { opacity: 1; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 0.75rem;
  object-fit: contain;
  filter: var(--photo-filter);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover { border-color: var(--accent); }

/* ── App showcase ── */
.showcase {
  display: grid;
  gap: 3rem;
  margin-top: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .showcase { grid-template-columns: 1fr 1fr; }
}

.showcase-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.showcase-visual::before {
  content: "";
  position: absolute;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(168, 230, 0, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
}

.showcase-visual::after {
  content: "";
  position: absolute;
  inset: 8%;
  background: var(--photo-overlay);
  mix-blend-mode: soft-light;
  border-radius: 1rem;
  pointer-events: none;
  z-index: 2;
}

.showcase-visual img {
  position: relative;
  z-index: 1;
  max-height: 380px;
  width: auto;
  filter: var(--photo-filter) drop-shadow(0 16px 32px rgba(26, 26, 30, 0.12));
}

.showcase-features {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.feature-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.feature-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.feature-icon svg {
  display: block;
}

.feature-row h4 {
  margin: 0 0 0.2rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.feature-row p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Network ── */
.rbh-card {
  margin-top: 3rem;
  padding: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(168, 230, 0, 0.1) 0%, transparent 50%),
    var(--surface);
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .rbh-card { grid-template-columns: 1.2fr 0.8fr; padding: 3rem; }
}

.rbh-card img {
  position: relative;
  max-height: 280px;
  width: auto;
  margin: 0 auto;
  filter: var(--photo-filter) drop-shadow(0 12px 24px rgba(26, 26, 30, 0.1));
}

.rbh-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.pill {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-brand img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8125rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Mobile ── */
@media (max-width: 767px) {
  .container {
    padding: 0 1.125rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .nav-inner {
    height: 3.5rem;
  }

  .nav-brand-text {
    font-size: 1rem;
  }

  .nav-brand img {
    width: 1.75rem;
    height: 1.75rem;
  }

  .hero {
    min-height: 88svh;
  }

  .hero-content {
    padding: 4.25rem 0 3.25rem;
  }

  .hero-title {
    font-size: clamp(2.25rem, 10vw, 3.25rem);
  }

  .hero-desc {
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-cta {
    width: 100%;
    max-width: 22rem;
    margin: 0 auto;
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 1.875rem);
  }

  .section-desc {
    font-size: 1rem;
  }

  .about-intro {
    max-width: none;
  }

  .about-grid {
    margin-top: 2rem;
    gap: 1.75rem;
  }

  .about-col-game {
    order: -1;
  }

  .about-preview {
    padding: 1rem;
  }

  .about-preview-stage {
    min-height: 200px;
    flex: none;
    aspect-ratio: 16 / 10;
  }

  .about-card {
    padding: 1.125rem 1.25rem;
  }

  .gallery-grid {
    margin-top: 2rem;
    gap: 0.625rem;
  }

  .showcase {
    margin-top: 2rem;
    gap: 2rem;
  }

  .showcase-visual {
    order: -1;
    min-height: 220px;
  }

  .showcase-visual img {
    max-height: 260px;
    width: 100%;
    object-fit: contain;
  }

  .rbh-card {
    margin-top: 2rem;
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .rbh-card img {
    order: -1;
    max-height: 200px;
    width: 100%;
    object-fit: contain;
  }

  .rbh-card .section-desc {
    margin-bottom: 0;
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
  }

  .footer {
    padding: 2rem 0;
    text-align: center;
  }

  .footer-inner {
    align-items: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.25rem;
  }
}

@media (max-width: 380px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .nav-actions .btn-sm {
    padding: 0 0.75rem;
    font-size: 0.75rem;
  }
}

/* ── App page ── */
.app-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-wrap {
  flex: 1;
  padding: 2rem 0 3rem;
}

.game-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .game-layout {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

.game-stage {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(180deg, #eef0ea 0%, #e4e6e0 100%);
  min-height: 420px;
}

.game-canvas-wrap {
  position: relative;
  height: 340px;
  overflow: hidden;
}

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

.game-multiplier {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px var(--accent-glow);
  z-index: 5;
  pointer-events: none;
  transition: color 0.2s;
}

.game-multiplier.crashed { color: var(--danger); text-shadow: 0 0 40px rgba(255,77,77,0.4); }
.game-multiplier.cashed { color: var(--success); text-shadow: 0 0 40px rgba(52,211,153,0.4); }

.game-status {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  z-index: 5;
}

.game-status.waiting { color: var(--text-muted); }
.game-status.flying { color: var(--accent); border-color: rgba(168,230,0,0.3); }
.game-status.crashed { color: var(--danger); border-color: rgba(255,77,77,0.3); }

.game-controls {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.stake-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.stake-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  font-variant-numeric: tabular-nums;
}

.stake-btn:hover { border-color: var(--accent); color: var(--text); }
.stake-btn.active { background: var(--accent); color: #1a1a10; border-color: var(--accent); font-weight: 600; }

.stake-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
  outline: none;
}

.stake-input:focus { border-color: var(--accent); }

.action-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn-bet {
  background: var(--accent);
  color: #1a1a10;
}

.btn-bet:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-cashout {
  background: var(--success);
  color: #ffffff;
}

.btn-cashout:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Sidebar */
.game-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-card {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  overflow: hidden;
}

.sidebar-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.balance-display {
  padding: 1.25rem 1rem;
  text-align: center;
}

.balance-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.balance-amount {
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.history-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 0.5rem;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.history-item:nth-child(odd) { background: rgba(0, 0, 0, 0.03); }

.history-item .mult { font-weight: 700; }
.history-item .mult.low { color: var(--danger); }
.history-item .mult.mid { color: #fbbf24; }
.history-item .mult.high { color: var(--success); }

.crash-feed {
  max-height: 160px;
  overflow-y: auto;
  padding: 0.5rem;
  font-size: 0.75rem;
}

.crash-feed-item {
  padding: 0.4rem 0.65rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.crash-feed-item .win { color: var(--success); }
.crash-feed-item .lose { color: var(--danger); }

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  z-index: 300;
  transform: translateY(120%);
  transition: transform 0.25s ease;
  box-shadow: 0 8px 30px rgba(26, 26, 30, 0.12);
}

.toast.show { transform: translateY(0); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }