/* ════════════════════════════════════════
   TINY KINGDOM — shared site styles
   Parchment light theme (matches in-game onboarding)
════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Fredoka:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg:        #f4eed8;
  --card:      #fffef0;
  --border:    #d4b866;
  --border-sm: rgba(212,184,102,0.4);
  --accent:    #c8960a;
  --accent2:   #7a3fbf;
  --text:      #2a1e00;
  --text-mid:  #7a5800;
  --text-dim:  #b09040;
  --green:     #3a7a3a;
  --red:       #a03030;
  --blue:      #2060a0;
  --shadow:    0 4px 20px rgba(80,50,0,0.12), 0 1px 4px rgba(80,50,0,0.08);
}
html {
  scroll-behavior: smooth;
  background: #2a1e00; /* matches footer — prevents overscroll flash at page bottom */
}
body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(212,184,102,0.25), transparent),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c8960a' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  font-family: 'Fredoka', sans-serif;
  min-height: 100vh;
}

/* ── NAV ─────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--card);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 12px rgba(80,50,0,0.10);
  padding: 0 32px;
  display: flex; align-items: center; gap: 0;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  padding: 10px 0; margin-right: 28px;
}
.nav-logo img {
  height: 44px; width: auto;
  image-rendering: pixelated;
}
.nav-logo span {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px; color: var(--text-mid);
  line-height: 1.4; letter-spacing: 1px;
  display: none;
}
.nav-links {
  display: flex; align-items: center; gap: 2px; flex: 1;
}
.nav-links a {
  font-size: 12px; font-weight: 500;
  color: var(--text-mid); text-decoration: none;
  padding: 8px 14px; border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: rgba(212,184,102,0.2); color: var(--text); }
.nav-links a.active { color: var(--accent); font-weight: 600; background: rgba(200,150,10,0.1); }
.nav-cta {
  font-family: 'Press Start 2P', monospace; font-size: 7px;
  padding: 9px 16px; border-radius: 8px;
  background: var(--accent2); color: #fff;
  text-decoration: none; letter-spacing: 0.5px;
  transition: background 0.15s; white-space: nowrap;
  margin-left: 10px;
}
.nav-cta:hover { background: #5c2ea0; }

/* ── NAV USER (login state) ──────────────── */
.nav-user {
  display: flex; align-items: center; gap: 8px;
  margin-left: 12px; flex-shrink: 0;
}
.nav-login-btn {
  font-family: 'Press Start 2P', monospace; font-size: 7px;
  padding: 8px 14px; border-radius: 8px;
  background: var(--accent); color: #fff;
  text-decoration: none; letter-spacing: 0.5px;
  box-shadow: 0 3px 0 #8a6006;
  transition: all 0.15s; white-space: nowrap;
}
.nav-login-btn:hover { background: #a87808; transform: translateY(1px); box-shadow: 0 2px 0 #8a6006; }
.nav-channel {
  font-family: 'Press Start 2P', monospace; font-size: 7px;
  color: var(--text-mid); text-decoration: none;
  padding: 7px 12px; border-radius: 8px;
  border: 1.5px solid var(--border-sm);
  white-space: nowrap; transition: all 0.15s;
}
.nav-channel:hover { background: rgba(212,184,102,0.15); color: var(--text); }
.nav-logout-btn {
  font-size: 11px; color: var(--text-dim);
  background: none; border: none; cursor: pointer;
  padding: 6px 8px; border-radius: 6px;
  font-family: 'Fredoka', sans-serif;
  transition: color 0.15s;
}
.nav-logout-btn:hover { color: var(--red); }

/* ── BUTTONS ──────────────────────────── */
.btn {
  display: inline-block;
  font-family: 'Press Start 2P', monospace; font-size: 8px;
  padding: 12px 24px; border-radius: 10px;
  text-decoration: none; cursor: pointer;
  letter-spacing: 0.5px; border: none;
  transition: all 0.15s;
}
.btn-gold {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 0 #8a6006, 0 6px 16px rgba(200,150,10,0.35);
}
.btn-gold:hover { background: #a87808; transform: translateY(1px); box-shadow: 0 3px 0 #8a6006, 0 4px 12px rgba(200,150,10,0.3); }
.btn-purple {
  background: var(--accent2); color: #fff;
  box-shadow: 0 4px 0 #4a1f80, 0 6px 16px rgba(122,63,191,0.3);
}
.btn-purple:hover { background: #5c2ea0; transform: translateY(1px); }
.btn-outline {
  background: transparent; color: var(--text-mid);
  border: 2px solid var(--border);
}
.btn-outline:hover { background: rgba(212,184,102,0.15); }

/* ── CARDS ───────────────────────────── */
.card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ── SECTION ─────────────────────────── */
.section-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px; letter-spacing: 2px;
  color: var(--text-dim); margin-bottom: 10px;
}
.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px; color: var(--text);
  line-height: 1.6; margin-bottom: 8px;
}

/* ── PILL / BADGE ────────────────────── */
.pill {
  display: inline-block; font-size: 10px;
  padding: 3px 9px; border-radius: 4px;
  font-weight: 600; white-space: nowrap;
}
.pill-gold   { background: rgba(200,150,10,0.12); color: var(--accent); border: 1px solid var(--border-sm); }
.pill-purple { background: rgba(122,63,191,0.10); color: var(--accent2); border: 1px solid rgba(122,63,191,0.3); }
.pill-green  { background: rgba(58,122,58,0.10);  color: var(--green); border: 1px solid rgba(58,122,58,0.3); }

/* ── FOOTER ──────────────────────────── */
.site-footer {
  background: #2a1e00;
  color: rgba(255,240,180,0.5);
  padding: 40px 40px 32px;
  margin-top: 80px;
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 40px; align-items: start;
}
.footer-logo img { height: 60px; opacity: 0.9; image-rendering: pixelated; }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  align-items: flex-start; padding-top: 4px;
}
.footer-links a {
  color: rgba(255,240,180,0.5); text-decoration: none;
  font-size: 12px; transition: color 0.15s;
}
.footer-links a:hover { color: rgba(255,240,180,0.9); }
.footer-copy {
  font-size: 11px; text-align: right;
  padding-top: 4px; line-height: 1.8;
}

/* ── RESPONSIVE ──────────────────────── */
@media (max-width: 768px) {
  .site-nav { padding: 0 16px; }
  .nav-links a { padding: 8px 10px; font-size: 11px; }
  .site-footer { grid-template-columns: 1fr; gap: 20px; }
  .footer-copy { text-align: left; }
}
