: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); }
