:root {
  --bg: #0a0e27;
  --bg-soft: #131a3a;
  --accent: #d4af37;
  --highlight: #ffd700;
  --danger: #c0392b;
  --white: #ecf0f1;
  --text-on-dark: #ffffff;
  --text-on-gold: #0a0e27;
  --header-h: 0px;
  --footer-h: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--bg);
  color: var(--text-on-dark);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---------- Header ---------- */
.ocs8-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(10, 14, 39, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.ocs8-header .logo {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--accent);
}

.ocs8-header .logo span { color: var(--white); }

.ocs8-header .brand-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--white);
  opacity: 0.55;
  border: 1px solid rgba(236, 240, 241, 0.25);
  border-radius: 4px;
  padding: 4px 8px;
}

.cta-btn {
  background: var(--accent);
  color: var(--text-on-gold);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: background 0.15s, transform 0.1s;
}

.cta-btn:hover { background: var(--highlight); }
.cta-btn:active { transform: scale(0.97); }

/* ---------- Footer ---------- */
.ocs8-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  background: rgba(10, 14, 39, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 100;
  transition: transform 0.25s ease;
}

.ocs8-footer .tg-btn {
  background: transparent;
  color: var(--white);
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid rgba(236, 240, 241, 0.3);
  font-weight: 600;
  font-size: 13px;
}

.ocs8-footer .tg-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Game pages can collapse the footer */
.ocs8-footer.collapsed { transform: translateY(calc(100% - 28px)); }
.ocs8-footer .toggle {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 14px;
  background: var(--bg);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  color: var(--accent);
  font-size: 11px;
  line-height: 14px;
  text-align: center;
  cursor: pointer;
}

/* ---------- Hub ---------- */
.hub {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
  text-align: center;
}

.hub h1 {
  font-size: 32px;
  margin-bottom: 6px;
  color: var(--accent);
  letter-spacing: 1.5px;
}

.hub h1.brand-banner {
  margin: 0 auto 18px;
  padding: 0;
  line-height: 0;
  max-width: 720px;
}

.hub h1.brand-banner a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.hub h1.brand-banner a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.18);
}

.hub h1.brand-banner img {
  display: block;
  width: 100%;
  height: auto;
}

html { scroll-behavior: smooth; }

.hub .tagline {
  color: var(--white);
  opacity: 0.7;
  font-size: 14px;
  margin-bottom: 28px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 480px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hub h1 { font-size: 42px; }
  .game-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
  }
}

.game-card {
  background: var(--bg-soft);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 12px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.game-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.15);
}

.game-card:active { transform: translateY(0); }

.game-card .emoji {
  font-size: 48px;
  line-height: 1;
}

.game-card .name {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--white);
}

.game-card .hs {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.game-card .hs.empty { color: rgba(236, 240, 241, 0.4); }

/* ---------- FAQ ---------- */
.faq {
  margin: 40px auto 0;
  max-width: 640px;
  text-align: left;
  padding: 0 4px;
}

.faq h2 {
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--accent);
  text-align: center;
  margin-bottom: 16px;
}

.faq-item {
  background: var(--bg-soft);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--white);
  list-style: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.15s;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: '\2212'; /* en-dash */
}

.faq-item summary:hover { color: var(--accent); }

.faq-body {
  padding: 0 16px 14px;
  color: var(--white);
  opacity: 0.78;
  font-size: 13px;
  line-height: 1.55;
}

@media (min-width: 768px) {
  .faq h2 { font-size: 22px; }
  .faq-item summary { font-size: 15px; padding: 16px 18px; }
  .faq-body { font-size: 14px; padding: 0 18px 16px; }
}

/* ---------- Back to arcade (game pages) ---------- */
.back-link {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 12px;
  z-index: 100;
  font-size: 12px;
  color: var(--white);
  opacity: 0.75;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(10, 14, 39, 0.6);
}

.back-link:hover { opacity: 1; color: var(--accent); }

/* ---------- Credit chip (all pages, injected by shared/credits.js) ---------- */
.credit-chip {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: 12px;
  z-index: 100;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--highlight);
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(10, 14, 39, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.credit-chip .cc-sep { opacity: 0.5; margin: 0 2px; }
.credit-chip .cc-coin { font-size: 13px; }

/* ---------- Credits + VIP panel (hub) ---------- */
.vip-panel {
  max-width: 480px;
  margin: 0 auto 24px;
  background: var(--bg-soft);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  padding: 14px 16px 16px;
}

.vp-row {
  display: flex;
  gap: 12px;
}

.vp-box { flex: 1; text-align: center; }

.vp-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--white);
  opacity: 0.55;
  margin-bottom: 4px;
}

.vp-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--highlight);
  line-height: 1.15;
}

.vp-sub {
  font-size: 11px;
  color: var(--white);
  opacity: 0.65;
  margin-top: 4px;
  min-height: 14px;
}

.vp-bar {
  margin-top: 12px;
  height: 6px;
  border-radius: 999px;
  background: rgba(236, 240, 241, 0.12);
  overflow: hidden;
}

.vp-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  transition: width 0.4s ease;
}

/* ---------- Out-of-credits lock (game pages) ---------- */
.credit-lock {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 14, 39, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.credit-lock-inner {
  max-width: 340px;
  background: var(--bg-soft);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 16px;
  padding: 28px 22px;
}

.credit-lock .cl-icon { font-size: 44px; margin-bottom: 10px; }

.credit-lock h2 {
  font-size: 20px;
  letter-spacing: 1.5px;
  color: var(--highlight);
  margin-bottom: 8px;
}

.credit-lock p {
  font-size: 13px;
  color: var(--white);
  opacity: 0.75;
}

.credit-lock .cl-timer {
  font-size: 34px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 2px;
  margin: 10px 0;
  font-variant-numeric: tabular-nums;
}

.credit-lock .cl-tip {
  font-size: 11px;
  color: var(--accent);
  opacity: 0.9;
  margin-bottom: 16px;
}

.credit-lock .cl-back {
  display: inline-block;
  background: var(--accent);
  color: var(--text-on-gold);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 8px;
}

.credit-lock .cl-back:hover { background: var(--highlight); }

/* ---------- Smaller hub logo ---------- */
.hub h1.brand-banner-sm { max-width: 220px; }

@media (min-width: 768px) {
  .hub h1.brand-banner-sm { max-width: 260px; }
}

/* ---------- VIP ranking ladder (hub) ---------- */
.vip-ladder {
  margin: 40px auto 0;
  max-width: 640px;
}

.vip-ladder h2 {
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 6px;
}

.vip-ladder .vl-sub {
  font-size: 13px;
  color: var(--white);
  opacity: 0.7;
  margin-bottom: 16px;
}

.vip-ladder .vl-sub b { color: var(--highlight); }

.vl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .vip-ladder h2 { font-size: 22px; }
  .vl-grid { grid-template-columns: repeat(4, 1fr); }
}

.vl-card {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 12px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.vl-card.current {
  border-color: var(--highlight);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.18);
}

.vl-card .vl-icon { font-size: 30px; line-height: 1.2; }

.vl-card .vl-name {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--white);
}

.vl-card .vl-req {
  font-size: 10px;
  color: var(--white);
  opacity: 0.55;
  margin-bottom: 4px;
}

.vl-card .vl-perk {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

.vl-card .vl-you {
  position: absolute;
  top: -8px;
  right: -4px;
  background: var(--highlight);
  color: var(--text-on-gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 999px;
}

/* ---------- Trust strip (hub) ---------- */
.trust-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: -14px auto 24px;
  max-width: 480px;
}

.trust-strip li {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--white);
  opacity: 0.85;
  background: var(--bg-soft);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}

.trust-strip li a { color: var(--highlight); }

/* ---------- Site note (small print above footer) ---------- */
.site-note {
  margin: 32px auto 8px;
  max-width: 640px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--white);
  opacity: 0.55;
}

.site-note a { color: var(--accent); text-decoration: underline; }

/* ---------- Legal / privacy page ---------- */
.legal { text-align: left; max-width: 640px; }

.legal h1 {
  text-align: center;
  font-size: 24px;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.legal .legal-updated {
  text-align: center;
  font-size: 12px;
  opacity: 0.5;
  margin-bottom: 24px;
}

.legal section {
  background: var(--bg-soft);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 10px;
}

.legal h2 {
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.legal p, .legal li {
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.85;
}

.legal ul { margin: 8px 0 8px 20px; }

.legal a { color: var(--highlight); }

.legal .legal-back {
  text-align: center;
  margin-top: 20px;
}

.legal .legal-back a { color: var(--accent); font-weight: 700; }

/* ---------- PLAY NOW button on game cards ---------- */
.game-card .play-now {
  margin-top: 2px;
  background: linear-gradient(180deg, var(--highlight), var(--accent));
  color: var(--text-on-gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.25);
  transition: transform 0.12s, box-shadow 0.15s;
}

.game-card:hover .play-now {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

.game-card:active .play-now { transform: scale(0.97); }
