/* CSS variables & reset */
:root {
  --brand:       #6c47ff;
  --brand-dark:  #4a2db5;
  --brand-light: #ede9ff;
  --gold:        #f5a623;
  --gold-dark:   #d4891a;
  --text:        #1a1a2e;
  --text-mid:    #444;
  --text-light:  #777;
  --border:      #e4e4f0;
  --bg-tint:     #f8f7ff;
  --white:       #ffffff;
  --radius:      10px;
  --shadow-sm:   0 2px 8px rgba(108,71,255,0.08);
  --shadow:      0 4px 20px rgba(108,71,255,0.12);
  --nav-h:       60px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a  { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout helpers */
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--tint { background: var(--bg-tint); }

.presale-banner { padding: 48px 20px; background: #f7f5ff; border-bottom: 1px solid var(--border); }
.presale-card { max-width: 1080px; margin: 0 auto; padding: 38px; border-radius: 24px; background: #17152b; color: white; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; box-shadow: 0 18px 55px rgba(30,24,80,.16); }
.presale-kicker { color: #ffd84d; font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.presale-card .presale-title { margin: 8px 0 10px; font-size: clamp(1.7rem,4vw,2.5rem); font-weight: 700; line-height: 1.1; color: white; max-width: none; }
.presale-card p { max-width: 650px; color: rgba(255,255,255,.7); }
.presale-link { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; padding: 14px 22px; border-radius: 13px; background: #ffd84d; color: #17152b; font-weight: 800; text-decoration: none; }
.presale-link:hover { transform: translateY(-2px); text-decoration: none; }
.nav-presale { background: linear-gradient(135deg,#6d4aff,#4a2db5); color:#fff !important; font-weight:800 !important; padding:9px 15px !important; border-radius:50px !important; box-shadow:0 4px 16px rgba(108,71,255,.28); }
.nav-presale:hover { color:#fff !important; text-decoration:none !important; transform:translateY(-1px); }
.typeform-home { max-width:1080px; margin:28px auto 0; overflow:hidden; border:1px solid var(--border); border-radius:24px; background:#fff; box-shadow:0 18px 55px rgba(30,24,80,.10); }
@media (max-width: 720px) { .presale-card { grid-template-columns: 1fr; padding: 28px; } .presale-link { width: 100%; } }

.section-label {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
h2.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-light);
  max-width: 580px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.topic-intro { max-width: 820px; }
.topic-intro > p { color: var(--text-mid); margin-bottom: 18px; line-height: 1.8; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0; }
.topic-card { padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); box-shadow: var(--shadow-sm); }
.topic-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.topic-card p { color: var(--text-light); font-size: .93rem; line-height: 1.65; }
@media (max-width: 760px) { .topic-grid { grid-template-columns: 1fr; } }

/* Header / nav */
header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.05rem;
  color: var(--text); text-decoration: none;
}
.nav-logo-icon { font-size: 1.4rem; }

nav { display: flex; align-items: center; gap: 4px; }
nav a {
  color: var(--text-mid); font-size: 0.88rem; font-weight: 500;
  padding: 6px 12px; border-radius: 6px;
  text-decoration: none; transition: background 0.15s, color 0.15s;
}
nav a:hover { background: var(--brand-light); color: var(--brand); text-decoration: none; }

.nav-play {
  background: linear-gradient(135deg, #f5a623, #e8890d);
  color: #fff !important;
  font-weight: 700 !important;
  padding: 8px 18px !important;
  border-radius: 50px !important;
  box-shadow: 0 2px 10px rgba(245,166,35,0.35);
  transition: transform 0.12s, box-shadow 0.12s !important;
  background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
}
.nav-play:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,166,35,0.45) !important; background: linear-gradient(135deg, #f5a623,#e8890d) !important; }

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-mid); font-size: 0.88rem; font-weight: 500;
  padding: 6px 12px; border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary:hover { background: var(--brand-light); color: var(--brand); }
.nav-dropdown > summary::after {
  content: ""; width: 6px; height: 6px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.nav-dropdown[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 168px; padding: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(23,13,54,0.14);
  z-index: 901;
}
.nav-dropdown-menu a { display: block; white-space: nowrap; }

.mobile-nav-label {
  padding: 12px 12px 4px; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light);
}

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-mid); border-radius: 2px; }

/* Mobile nav */
.mobile-nav {
  display: none; flex-direction: column;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 8px 20px 16px;
  gap: 2px;
  position: absolute; top: var(--nav-h); left: 0; right: 0; z-index: 899;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 10px 12px; border-radius: 8px; font-size: 0.95rem; color: var(--text-mid); font-weight: 500; text-decoration: none; }
.mobile-nav a:hover { background: var(--bg-tint); }
.mobile-nav .nav-play {
  margin-top: 8px; text-align: center;
  background: linear-gradient(135deg,#f5a623,#e8890d);
  color: white; font-weight: 700; border-radius: 50px;
  padding: 12px;
}

@media (max-width: 700px) {
  nav { display: none; }
  .hamburger { display: flex; }
}

/* Hero */
.hero {
  background: linear-gradient(160deg, #1a1a2e 0%, #2d1b69 50%, #1a1a2e 100%);
  color: white;
  padding: 28px 20px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-inner { position: relative; max-width: 960px; margin: 0 auto; }
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 30%, rgba(108,71,255,0.3) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.3);
  color: #FFD700;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.hero h1 span {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
  font-size: clamp(0.88rem, 1.6vw, 1rem);
  color: rgba(255,255,255,0.65);
  max-width: 640px; margin: 0 auto 20px;
  line-height: 1.6;
}
.hero-sub strong { color: rgba(255,255,255,0.9); }

/* Game stage — the playable frame in the first screen */
.game-stage {
  position: relative; scroll-margin-top: calc(var(--nav-h) + 16px);
  width: 100%; height: clamp(520px, 74vh, 700px);
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,215,0,0.08);
  background: #0D0D1A;
}
.stage-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; font-size: 0.82rem; color: rgba(255,255,255,0.55);
}
.stage-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stage-btn {
  background: rgba(255,255,255,0.08); color: #fff;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 50px;
  padding: 8px 16px; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.stage-btn:hover { background: rgba(255,255,255,0.16); }
@media (max-width: 700px) {
  .hero { padding: 18px 12px 22px; }
  .hero-badge { display: none; }
  .hero h1 { font-size: 1.35rem; }
  .hero-sub { font-size: 0.84rem; margin-bottom: 14px; }
  .game-stage { height: clamp(440px, 68vh, 600px); border-radius: 14px; }
  .stage-bar { justify-content: center; text-align: center; }
}

/* Ad slot directly below the game; collapses until an ad unit is placed inside */
.ad-slot { max-width: 960px; margin: 24px auto 0; padding: 0 20px; text-align: center; }
.ad-slot:empty { display: none; }

.btn-primary {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #1a1a00; border: none; border-radius: 50px;
  padding: 15px 36px; font-size: 1.05rem; font-weight: 800;
  cursor: pointer; transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: 0 4px 20px rgba(255,165,0,0.45);
  letter-spacing: 0.03em;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,165,0,0.55); }
.btn-primary:active { transform: scale(0.97); }

.btn-outline {
  background: rgba(255,255,255,0.08);
  color: white; border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px; padding: 14px 28px;
  font-size: 0.97rem; font-weight: 500; cursor: pointer;
  transition: background 0.15s; backdrop-filter: blur(4px);
}
.btn-outline:hover { background: rgba(255,255,255,0.14); }


/* Trust bar */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 18px 20px;
}
.trust-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 24px;
}
.trust-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.85rem; font-weight: 600; color: var(--text-mid);
}

/* How to play */
.steps-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px;
}
.step-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.step-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand);
  font-weight: 800; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.step-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; }
.step-desc  { font-size: 0.83rem; color: var(--text-light); line-height: 1.55; }

.tip-box {
  margin-top: 32px; padding: 18px 22px;
  background: linear-gradient(135deg, #ede9ff, #f5f0ff);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem; color: var(--text-mid);
  line-height: 1.6;
}
.tip-box strong { color: var(--brand); }

/* Rules table */
.rules-intro {
  font-size: 0.95rem; color: var(--text-mid); line-height: 1.7;
  margin-bottom: 28px; max-width: 700px;
}
.rules-table-wrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem;
}
thead th {
  background: var(--brand); color: white;
  padding: 12px 16px; text-align: left;
  font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em;
}
thead th:first-child { border-radius: var(--radius) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-tint); }
tbody td { padding: 11px 16px; line-height: 1.5; }
td:first-child { font-weight: 800; font-size: 1rem; color: var(--brand); width: 60px; }
td:nth-child(2) { font-weight: 700; width: 160px; color: var(--text); }
td:last-child { color: var(--text-mid); }
.tag {
  display: inline-block;
  padding: 2px 8px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
  background: var(--brand-light); color: var(--brand);
  margin-bottom: 4px;
}

/* Versions */
.versions-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px;
}
.ver-card {
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 22px 16px;
  text-align: center; cursor: pointer;
  transition: all 0.2s; box-shadow: var(--shadow-sm);
  text-decoration: none; color: inherit;
}
.ver-card:hover {
  border-color: var(--brand); transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(108,71,255,0.15);
  text-decoration: none;
}
.ver-name  { font-weight: 800; font-size: 1rem; margin-bottom: 5px; }
.ver-desc  { font-size: 0.8rem; color: var(--text-light); line-height: 1.5; }
.ver-badge {
  margin-top: 12px;
  display: inline-block; padding: 3px 10px;
  background: var(--brand-light); color: var(--brand);
  border-radius: 20px; font-size: 0.7rem; font-weight: 700;
}

/* Tips */
.tips-list { counter-reset: tip; display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.tip-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; background: white;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.tip-item::before {
  content: counter(tip); counter-increment: tip;
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 700; color: var(--brand); background: var(--brand-light);
}
.tip-text  { font-size: 0.9rem; color: var(--text-mid); line-height: 1.6; }
.tip-text strong { color: var(--text); display: block; margin-bottom: 2px; }

/* FAQ */
.faq-list { max-width: 720px; }
.faq-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  text-align: left; padding: 18px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 0.97rem; font-weight: 700; color: var(--text);
  transition: color 0.15s;
}
.faq-q:hover { color: var(--brand); }
.faq-icon { font-size: 1.1rem; color: var(--brand); flex-shrink: 0; transition: transform 0.25s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.9rem; color: var(--text-mid); line-height: 1.7;
}
.faq-item.open .faq-a { max-height: 300px; padding-bottom: 16px; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, #2d1b69, #1a1a2e);
  color: white; text-align: center; padding: 64px 20px;
}
.cta-banner h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 900; margin-bottom: 12px; }
.cta-banner p  { color: rgba(255,255,255,0.6); margin-bottom: 30px; font-size: 0.97rem; }

/* Footer */
footer {
  background: #111; color: rgba(255,255,255,0.5);
  padding: 40px 20px 28px;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 24px;
}
.footer-top {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px;
  padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo { font-weight: 800; font-size: 1rem; color: white; margin-bottom: 6px; }
.footer-tagline { font-size: 0.8rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.footer-links a { color: rgba(255,255,255,0.45); font-size: 0.83rem; text-decoration: none; }
.footer-links a:hover { color: white; text-decoration: none; }
.footer-partners { margin: 0 0 28px; }
.footer-partners #footer-partners-title { color: white; font-size: 0.95rem; font-weight: 700; margin: 0 0 12px; }
.footer-partner-rail { position: relative; display: flex; align-items: center; gap: 8px; }
.footer-partner-badges {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-wrap: nowrap; align-items: center; gap: 14px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 4px 2px;
}
.footer-partner-badges::-webkit-scrollbar { display: none; }
.footer-partner-badges > a {
  flex: 0 0 auto; display: inline-flex; align-items: center;
  height: 48px;
}
.footer-partner-badges img { display: block; height: 100%; width: auto; max-width: none; object-fit: contain; }
.footer-partner-nav {
  flex: 0 0 auto; width: 32px; height: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.18); border-radius: 50%;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8);
  font-size: 1.05rem; line-height: 1; cursor: pointer;
  transition: background .18s, color .18s, opacity .18s;
}
.footer-partner-nav:hover:not(:disabled) { background: rgba(255,255,255,0.16); color: #fff; }
.footer-partner-nav:disabled { opacity: .28; cursor: default; }
.footer-partner-rail[data-scrollable="false"] .footer-partner-nav { display: none; }
@media (max-width: 640px) {
  .footer-partner-badges > a { height: 40px; }
  .footer-partner-badges { gap: 12px; }
  .footer-partner-nav { width: 28px; height: 28px; font-size: 0.95rem; }
}
.footer-bottom { font-size: 0.78rem; text-align: center; }

/* Game overlay (fullscreen) */
.game-overlay {
  position: absolute; inset: 0;
  background: #0D0D1A;
  container-type: size;
}
.game-overlay.fullscreen { position: fixed; z-index: 1000; }

/* Corner buttons: ⛶ toggles fullscreen, ✕ exits it. Hidden on the main screen
   (which has its own action row) so they never overlap the in-game header. */
.game-close, .game-fs {
  position: absolute; top: 14px; right: 16px;
  z-index: 1100;
  background: rgba(255,255,255,0.12); color: white;
  border: none; border-radius: 50%;
  width: 36px; height: 36px; font-size: 1.1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.game-close:hover, .game-fs:hover { background: rgba(255,255,255,0.22); }
.game-fs { right: 60px; font-size: 1rem; }
.game-overlay:not(.fullscreen) .game-close { display: none; }
.game-overlay:not(.fullscreen) .game-fs { right: 16px; }
.game-overlay[data-screen="main"] .game-close,
.game-overlay[data-screen="main"] .game-fs { display: none; }

/* Game screens */
.gscreen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 20px; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease; overflow-y: auto;
}
.gscreen.active { opacity: 1; pointer-events: all; }

/* Game Home */
.g-home { background: radial-gradient(ellipse at top, #2d1b69 0%, #11001c 55%, #0D0D1A 100%); gap: 8px; }
.g-crown { font-size: 5rem; animation: gFloat 3s ease-in-out infinite; filter:drop-shadow(0 0 22px rgba(255,215,0,.55)); margin-bottom:8px; }
@keyframes gFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-14px)} }
.g-title {
  font-size: clamp(2.6rem,9vw,4rem); font-weight:900; text-align:center; line-height:1.05;
  background:linear-gradient(135deg,#FFD700,#FF8C00); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.g-online { font-size:.95rem; letter-spacing:.45em; text-transform:uppercase; color:rgba(255,255,255,.38); margin-bottom:8px; }
.g-tagline { font-size:.85rem; color:rgba(255,255,255,.3); margin-bottom:40px; }
.g-btn-gold {
  background:linear-gradient(135deg,#FFD700,#FFA500); color:#1a1a00;
  border:none; border-radius:50px; padding:16px 40px;
  font-size:1.05rem; font-weight:800; cursor:pointer;
  transition:transform .12s, box-shadow .12s;
  box-shadow:0 4px 22px rgba(255,165,0,.42);
}
.g-btn-gold:hover { transform:translateY(-2px); }
.g-btn-gold:active { transform:scale(.97); }
.g-btn-ghost {
  background:rgba(255,255,255,.08); color:#fff;
  border:1px solid rgba(255,255,255,.18); border-radius:50px;
  padding:13px 32px; font-size:.95rem; font-weight:500; cursor:pointer;
  transition:background .15s;
}
.g-btn-ghost:hover { background:rgba(255,255,255,.14); }

/* Version screen */
.g-version-bg { background:radial-gradient(ellipse at bottom,#1a0533 0%,#0D0D1A 70%); justify-content:flex-start; padding-top:56px; }
.g-top-bar { display:flex; align-items:center; gap:10px; width:100%; max-width:440px; margin-bottom:20px; flex-shrink:0; }
.g-back-btn { background:none; border:none; color:rgba(255,255,255,.5); font-size:1.6rem; cursor:pointer; padding:2px 6px; line-height:1; }
.g-heading { font-size:1.2rem; font-weight:700; color:#fff; }
/* Short frames (laptops): the list shrinks and scrolls so the Let's Play button never falls below the fold */
.g-vlist { display:flex; flex-direction:column; gap:10px; width:100%; max-width:440px; flex:0 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; padding:0 5px 2px 0; }
.g-vlist::-webkit-scrollbar { width:3px; }
.g-vlist::-webkit-scrollbar-thumb { background:rgba(255,255,255,.2); border-radius:3px; }
.g-vcard {
  display:flex; align-items:center; gap:14px; padding:14px 18px; flex-shrink:0;
  background:rgba(255,255,255,.05); border:1.5px solid rgba(255,255,255,.09);
  border-radius:13px; cursor:pointer; transition:all .18s;
}
.g-vcard:hover  { background:rgba(255,215,0,.07); border-color:rgba(255,215,0,.25); transform:translateX(3px); }
.g-vcard.sel    { background:rgba(255,215,0,.11); border-color:rgba(255,215,0,.55); }
.g-vic  { font-size:1.85rem; width:40px; text-align:center; flex-shrink:0; }
.g-vinfo { flex:1; }
.g-vname { font-weight:700; font-size:.96rem; color:#fff; margin-bottom:2px; }
.g-vdesc { font-size:.76rem; color:rgba(255,255,255,.42); }
.g-vcheck { color:#FFD700; font-size:1.1rem; opacity:0; transition:opacity .18s; }
.g-vcard.sel .g-vcheck { opacity:1; }
.g-play-wrap { width:100%; max-width:440px; margin-top:16px; flex-shrink:0; }

/* Game main */
.g-main-bg { background:radial-gradient(ellipse at center,#1c1045 0%,#0D0D1A 100%); justify-content:space-between; padding:0 20px; }
.g-header { display:flex; align-items:center; justify-content:space-between; width:100%; max-width:440px; padding:14px 0 6px; flex-shrink:0; }
.g-info-left { display:flex; flex-direction:column; gap:1px; }
.g-ver-lbl { font-size:.68rem; text-transform:uppercase; letter-spacing:.1em; color:rgba(255,255,255,.36); }
.g-rem { font-size:.9rem; font-weight:600; color:rgba(255,255,255,.75); }
.kings-row { display:flex; gap:3px; }
.k-icon { font-size:1.15rem; opacity:.2; transition:opacity .3s,transform .3s; }
.k-icon.lit { opacity:1; animation:kpop .35s ease; }
@keyframes kpop { 0%,100%{transform:scale(1)} 50%{transform:scale(1.4)} }
.g-menu-btn { background:none; border:none; color:rgba(255,255,255,.42); font-size:1.1rem; cursor:pointer; padding:4px 8px; }

/* Card */
.card-area { flex:1; display:flex; align-items:center; justify-content:center; width:100%; padding:8px 0; }
.card-wrap { perspective:1200px; width:258px; height:368px; }
.gcard {
  width:100%; height:100%; position:relative;
  transform-style:preserve-3d;
  transition:transform .52s cubic-bezier(.4,.2,.2,1);
  border-radius:16px;
  box-shadow:0 24px 60px rgba(0,0,0,.65),0 0 40px rgba(255,215,0,.08);
}
.gcard.flipped { transform:rotateY(180deg); }
.card-face { position:absolute; inset:0; border-radius:16px; backface-visibility:hidden; -webkit-backface-visibility:hidden; }
.c-back {
  background:linear-gradient(145deg,#1a237e 0%,#4a148c 100%);
  display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.c-back::before { content:''; position:absolute; inset:9px; border:1.5px solid rgba(255,215,0,.28); border-radius:9px; }
.c-back-inner { display:flex; flex-direction:column; align-items:center; gap:6px; }
.c-back-crown { font-size:3.4rem; filter:drop-shadow(0 0 14px rgba(255,215,0,.5)); }
.c-back-text { font-size:.6rem; letter-spacing:.24em; text-transform:uppercase; color:rgba(255,215,0,.45); }
.c-front { transform:rotateY(180deg); background:#fff; padding:11px; display:flex; flex-direction:column; }
.gcard-corner { display:flex; flex-direction:column; align-items:center; line-height:1.1; }
.gcard-corner.br { align-self:flex-end; transform:rotate(180deg); margin-top:auto; }
.cv { font-size:1.05rem; font-weight:900; }
.cs { font-size:.88rem; }
.suit-red  { color:#E53935; }
.suit-blck { color:#1a1a1a; }
.card-mid { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; padding:4px 0; }
.big-suit { font-size:2.9rem; line-height:1; }
.rule-badge { background:#1a1a2e; color:#fff; padding:3px 13px; border-radius:20px; font-size:.67rem; font-weight:800; letter-spacing:.06em; }
.rule-name  { font-size:1.05rem; font-weight:800; color:#1a1a2e; text-align:center; line-height:1.2; }
.rule-desc  { font-size:.78rem; color:#555; text-align:center; line-height:1.5; padding:0 2px; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.draw-area { width:100%; max-width:440px; padding:12px 0 28px; flex-shrink:0; }
.draw-btn {
  width:100%; background:linear-gradient(135deg,#FFD700,#FFA500);
  color:#1a1a00; border:none; border-radius:50px;
  padding:18px; font-size:1.08rem; font-weight:800;
  cursor:pointer; transition:transform .1s; box-shadow:0 4px 22px rgba(255,165,0,.42);
}
.draw-btn:active { transform:scale(.97); }
.draw-hint { text-align:center; font-size:.73rem; color:rgba(255,255,255,.27); margin-top:8px; }

/* Game over */
.g-over-bg { background:radial-gradient(ellipse at top,#1b4d1e 0%,#0D0D1A 70%); gap:12px; }
.go-emoji  { font-size:4rem; }
.go-title  { font-size:2rem; font-weight:900; background:linear-gradient(135deg,#69f0ae,#40c4ff); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.go-sub    { color:rgba(255,255,255,.42); font-size:.88rem; text-align:center; line-height:1.7; margin-bottom:20px; }
.go-btns   { display:flex; flex-direction:column; gap:10px; width:100%; max-width:300px; }

/* Game Menu Sheet */
.g-overlay { position:fixed; inset:0; background:rgba(0,0,0,.65); display:flex; align-items:flex-end; justify-content:center; z-index:1200; opacity:0; pointer-events:none; transition:opacity .25s; backdrop-filter:blur(5px); }
.g-overlay.open { opacity:1; pointer-events:all; }
.g-sheet { background:#1e1e30; border-radius:22px 22px 0 0; padding:20px 22px 40px; width:100%; max-width:480px; transform:translateY(100%); transition:transform .28s cubic-bezier(.4,0,.2,1); }
.g-overlay.open .g-sheet { transform:translateY(0); }
.g-handle { width:38px; height:4px; background:rgba(255,255,255,.18); border-radius:2px; margin:0 auto 18px; }
.g-sheet-title { font-size:1.1rem; font-weight:700; color:#fff; margin-bottom:14px; }
.g-opt { display:block; width:100%; background:rgba(255,255,255,.06); border:none; border-radius:11px; padding:13px 16px; color:#fff; font-size:.93rem; text-align:left; cursor:pointer; transition:background .14s; margin-bottom:8px; }
.g-opt:hover { background:rgba(255,255,255,.11); }
.g-opt.danger { color:#ff6b6b; }

/* Toast */
.g-toast { position:fixed; bottom:110px; left:50%; transform:translateX(-50%) translateY(14px); background:rgba(255,215,0,.92); color:#1a1a00; padding:9px 22px; border-radius:50px; font-weight:700; font-size:.87rem; opacity:0; transition:all .28s; pointer-events:none; white-space:nowrap; z-index:1300; }
.g-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

@container (max-height:650px) {
  .card-wrap { width:210px; height:300px; }
  .c-back-crown { font-size:2.5rem; }
}
@container (max-height:560px) {
  .card-wrap { width:180px; height:256px; }
  .draw-area { padding-bottom:14px; }
}
@container (max-width:360px) {
  .card-wrap { width:230px; height:328px; }
}

/* Players screen */
.g-players-bg { background:radial-gradient(ellipse at top,#0d1b3e 0%,#0D0D1A 70%); justify-content:flex-start; padding-top:56px; }
.g-players-list { display:flex; flex-direction:column; gap:8px; width:100%; max-width:440px; max-height:52cqh; overflow-y:auto; margin-bottom:4px; padding-right:2px; }
.g-players-list::-webkit-scrollbar { width:3px; }
.g-players-list::-webkit-scrollbar-thumb { background:rgba(255,255,255,.2); border-radius:3px; }
.player-row { display:flex; align-items:center; gap:10px; padding:10px 14px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1); border-radius:12px; transition:border-color .15s; }
.player-row:focus-within { border-color:rgba(255,215,0,.4); }
.player-avatar { font-size:1.45rem; flex-shrink:0; }
.player-input { flex:1; background:transparent; border:none; color:#fff; font-size:.97rem; font-weight:600; outline:none; padding:4px 0; min-width:0; }
.player-input::placeholder { color:rgba(255,255,255,.28); }
.player-remove { background:none; border:none; color:rgba(255,255,255,.3); font-size:.82rem; cursor:pointer; width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:background .15s,color .15s; }
.player-remove:hover { background:rgba(255,60,60,.18); color:#ff6b6b; }
.player-spacer { width:26px; flex-shrink:0; }
.g-add-btn { width:100%; max-width:440px; background:rgba(255,255,255,.07); border:1.5px dashed rgba(255,255,255,.18); border-radius:12px; color:rgba(255,255,255,.55); font-size:.92rem; font-weight:600; padding:12px; cursor:pointer; transition:background .15s,border-color .15s; margin-bottom:10px; }
.g-add-btn:hover { background:rgba(255,255,255,.11); border-color:rgba(255,255,255,.3); color:#fff; }

/* Redesigned game header */
.g-header { display:flex; flex-direction:column; gap:5px; width:100%; max-width:440px; padding:12px 0 4px; flex-shrink:0; }
.g-hr1 { display:flex; align-items:center; justify-content:space-between; width:100%; }
.g-hr2 { display:flex; align-items:center; justify-content:space-between; width:100%; }
.g-turn {
  font-size:1.05rem; font-weight:800;
  background:linear-gradient(135deg,#FFD700,#FFA500);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
  filter:drop-shadow(0 0 8px rgba(255,180,0,.45));
  min-width:0; flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  letter-spacing:.01em;
}
.g-actions { display:flex; gap:4px; align-items:center; flex-shrink:0; }
.g-icon-btn { background:rgba(255,255,255,.09); border:none; border-radius:8px; color:rgba(255,255,255,.75); font-size:.95rem; cursor:pointer; width:32px; height:32px; display:flex; align-items:center; justify-content:center; transition:background .14s; }
.g-icon-btn:hover { background:rgba(255,255,255,.18); }

/* Timer */
/* Floating countdown ring (top-right of overlay) */
.timer-display { position:absolute; top:14px; left:16px; width:68px; height:68px; display:none; align-items:center; justify-content:center; z-index:1060; cursor:pointer; }
.timer-display.active { display:flex; }
.timer-display.alarm { animation:tAlarm .25s ease infinite; }
@keyframes tAlarm { 0%,100%{transform:scale(1)} 50%{transform:scale(1.12)} }
.timer-display svg { position:absolute; inset:0; width:100%; height:100%; transform:rotate(-90deg); }
.timer-ring-bg  { fill:none; stroke:rgba(255,255,255,.12); stroke-width:5; }
.timer-circle   { fill:none; stroke-width:5; stroke-linecap:round; transition:stroke-dashoffset .95s linear, stroke .4s; }
.timer-num      { position:relative; font-size:1.15rem; font-weight:800; z-index:1; }

/* Timer config sheet */
.timer-presets  { display:flex; gap:8px; margin-bottom:14px; }
.timer-preset   { flex:1; padding:12px 8px; background:rgba(255,255,255,.07); border:1.5px solid rgba(255,255,255,.12); border-radius:10px; color:rgba(255,255,255,.65); font-size:1rem; font-weight:700; cursor:pointer; transition:all .15s; }
.timer-preset.active { background:rgba(255,215,0,.15); border-color:rgba(255,215,0,.5); color:#FFD700; }
.timer-btns { display:flex; gap:8px; }

* { -webkit-tap-highlight-color:transparent; }

/* Hero: exit for rules-intent visitors */
.hero-rules-link {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin: -8px auto 18px;
}
.hero-rules-link a { color: #ffd76a; text-decoration: underline; text-underline-offset: 3px; }
.hero-rules-link a:hover { color: #fff; }
