/* ============================================================
   style.css — v3 CosmicPlay theme
   ============================================================ */

/* ── Tokens ── */
:root {
  --bg:          #030810;
  --bg-2:        #050f1e;
  --card:        rgba(255,255,255,0.05);
  --card-border: rgba(0,210,255,0.10);
  --text:        #e8f4ff;
  --muted:       #5e8aaa;
  --cyan:        #00deff;
  --purple:      #a855f7;
  --gold:        #f5a623;
  --green:       #34d399;
  --danger:      #f87171;
  --shadow:      0 24px 60px rgba(0,0,0,0.55);
  --container:   1180px;

  /* Legacy aliases used by auth.js / admin */
  --accent:      #00deff;
  --accent-2:    #34d399;
  --accent-3:    #a855f7;
  --bg-soft:     #050f1e;
  --radius-xl:   16px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Exo 2', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0,222,255,0.2); border-radius: 3px; }

/* ── Skip link ── */
.skip-link {
  position: absolute; left: -9999px; top: 4px; z-index: 9999;
  padding: 8px 16px; background: var(--cyan); color: #000;
  font-weight: 700; font-size: 14px;
}
.skip-link:focus { left: 4px; }

/* ── Layout ── */
.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  position: relative; z-index: 1;
}

/* ── Ambient glows ── */
.glow-top-left {
  position: fixed; pointer-events: none; z-index: 0;
  top: -15%; left: -10%; width: 55%; height: 55%;
  background: radial-gradient(ellipse at center, rgba(168,85,247,0.13), transparent 65%);
}
.glow-bottom-right {
  position: fixed; pointer-events: none; z-index: 0;
  bottom: -10%; right: -8%; width: 50%; height: 50%;
  background: radial-gradient(ellipse at center, rgba(0,222,255,0.09), transparent 65%);
}

/* ── Star field ── */
#stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.star {
  position: absolute; border-radius: 50%; background: #fff;
  animation: twinkle var(--dur,3s) ease-in-out infinite var(--delay,0s);
}
@keyframes twinkle {
  0%,100% { opacity: var(--lo,.15); transform: scale(1); }
  50%      { opacity: 1;            transform: scale(1.5); }
}

/* ── Shooting star ── */
.shoot {
  position: fixed; z-index: 0; pointer-events: none;
  width: 1.5px; height: 90px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,222,255,.85) 55%, transparent 100%);
  top: -10%; left: 70%; transform: rotate(32deg);
  animation: shoot 8s linear infinite;
  opacity: 0;
}
.shoot:nth-child(2) { left: 30%; animation-delay: 3.5s; }
@keyframes shoot {
  0%   { top:-10%; opacity:0; }
  3%   { opacity:1; }
  38%  { opacity:0; top:60%; }
  100% { top:60%; opacity:0; }
}

/* ── TOPBAR / NAV ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  background: rgba(3,8,16,0.82);
  border-bottom: 1px solid rgba(0,222,255,0.07);
}
.nav {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 15px 0; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900; font-size: 17px; letter-spacing: 0.06em;
  color: var(--text);
}
.brand-badge {
  width: 38px; height: 38px; flex-shrink: 0;
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  font-size: 16px; font-weight: 900; color: #020810;
}
.brand img { height: 32px; width: auto; }
.nav-links {
  display: flex; gap: 26px; align-items: center;
  color: var(--muted); font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; list-style: none;
}
.nav-links a, .nav-links li a { transition: color .2s; color: var(--muted); }
.nav-links a:hover, .nav-links li a:hover { color: var(--cyan); }
.nav-links a.active, .nav-links li a.active { color: var(--text); }

.nav-auth { display: flex; gap: 10px; align-items: center; }

/* ── BURGER ── */
.burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,222,255,0.15);
  padding: 8px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: background .2s, border-color .2s;
}
.burger:hover { background: rgba(0,222,255,0.08); border-color: rgba(0,222,255,0.35); }
.burger span {
  display: block; width: 100%; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
  transform-origin: center;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU (slide-down) ── */
.mobile-menu {
  overflow: hidden;
  max-height: 0;
  transition: max-height .38s cubic-bezier(.4,0,.2,1), border-color .38s;
  border-top: 1px solid transparent;
  background: rgba(3,8,16,0.95);
}
.mobile-menu.open {
  max-height: 420px;
  border-top-color: rgba(0,222,255,0.08);
}
.mob-link {
  display: block;
  padding: 15px 0;
  color: var(--muted);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color .2s, padding-left .2s;
}
.mob-link:hover { color: var(--cyan); padding-left: 6px; }
.mob-auth {
  display: flex; gap: 10px;
  padding: 18px 0 20px;
}
.mob-auth .btn { flex: 1; justify-content: center; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center;
  justify-content: center; gap: 8px;
  border: none; cursor: pointer;
  font-family: 'Exo 2', sans-serif; font-weight: 700;
  transition: transform .18s, box-shadow .18s, opacity .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  padding: 13px 22px; font-size: 14px; color: #020810;
  background: linear-gradient(135deg, var(--cyan), #0099bb);
  box-shadow: 0 0 22px rgba(0,222,255,0.28);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.btn-primary:hover { box-shadow: 0 0 36px rgba(0,222,255,0.5); }

.btn-secondary {
  padding: 12px 20px; font-size: 14px; color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0,222,255,0.18);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.btn-secondary:hover {
  background: rgba(0,222,255,0.10);
  border-color: rgba(0,222,255,0.35);
}

.btn-ghost {
  padding: 11px 22px; font-size: 14px; color: var(--muted);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.10);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.btn-ghost:hover { color: var(--text); border-color: rgba(0,222,255,0.3); }

/* ── HERO ── */
.hero { padding: 64px 0 52px; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 22px; padding: 9px 18px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cyan);
  background: rgba(0,222,255,0.07);
  border: 1px solid rgba(0,222,255,0.18);
}

.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 900; line-height: 1.06; letter-spacing: -0.02em;
  background: linear-gradient(140deg, #fff 25%, var(--cyan) 65%, var(--purple) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 18px;
}

.hero-desc {
  margin: 0 auto 28px; max-width: 520px;
  color: var(--muted); font-size: 16px; line-height: 1.72;
}

.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 22px; justify-content: center;
}

.hero-stats {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center;
}
.hero-stat {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  font-size: 13px; color: var(--muted);
}

/* ── SECTION STRUCTURE ── */
section { padding: 48px 0 24px; }

.section-head {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 18px; margin-bottom: 24px;
}
.section-head h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 700; letter-spacing: -0.01em;
  color: var(--text);
}
.section-head p {
  margin: 8px 0 0; color: var(--muted);
  max-width: 520px; line-height: 1.65; font-size: 14px;
}

/* ── CATEGORY PILLS ── */
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.pill {
  padding: 9px 18px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted); font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; cursor: pointer; transition: all .2s;
}
.pill:hover { border-color: rgba(0,222,255,0.28); color: var(--text); }
.pill.active {
  background: rgba(0,222,255,0.10);
  border-color: rgba(0,222,255,0.30); color: var(--cyan);
}

/* ── GAME CARDS ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 18px;
}
.game-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border: 1px solid var(--card-border);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s;
  cursor: pointer;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0,222,255,0.32);
}
.game-card.locked { opacity: 0.75; }

.game-thumb {
  aspect-ratio: 16/11; position: relative;
  overflow: hidden; background: #0a1628;
  display: flex; align-items: center; justify-content: center;
}
.game-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.game-card:hover .game-thumb img { transform: scale(1.04); }

.game-thumb-overlay {
  position: absolute; inset: 0;
  background: rgba(3,8,16,0.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.game-card:hover .game-thumb-overlay { opacity: 1; }

.badge-row {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; justify-content: space-between;
}
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(3,8,16,0.78);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%);
  color: var(--text);
}

.game-card-body { padding: 14px 16px 16px; }
.game-card-meta {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 8px;
}
.game-rating { font-size: 12px; color: var(--gold); font-weight: 700; }

.game-card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.02em; margin-bottom: 10px;
  color: var(--text);
}
.game-card-desc {
  color: var(--muted); font-size: 12px; line-height: 1.5; margin-bottom: 12px;
}

/* category tags */
.hero-card-tag {
  display: inline-block; padding: 4px 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px;
  background: rgba(0,222,255,0.10); border: 1px solid rgba(0,222,255,0.22); color: var(--cyan);
}
.tag-action   { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.25);  color: #fca5a5; }
.tag-puzzle   { background: rgba(168,85,247,0.12); border-color: rgba(168,85,247,0.25); color: #d8b4fe; }
.tag-arcade   { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.25); color: #6ee7b7; }
.tag-strategy { background: rgba(245,166,35,0.12); border-color: rgba(245,166,35,0.25); color: #fcd34d; }
.tag-default  { background: rgba(0,222,255,0.10);  border-color: rgba(0,222,255,0.22);  color: var(--cyan); }

/* play button on cards */
.btn-play {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; font-size: 12px; font-weight: 700;
  color: #020810; background: linear-gradient(135deg, var(--cyan), #0099bb);
  border: none; width: 100%;
  justify-content: center;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: box-shadow .2s;
}
.btn-play:hover { box-shadow: 0 0 18px rgba(0,222,255,0.4); }

/* load-more */
.load-more-wrap {
  display: flex; justify-content: center; margin-top: 28px;
}

/* ── TRENDING ── */
.trending-row {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
}
.trend-card {
  position: relative; min-height: 280px;
  padding: 16px 18px;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  border: 1px solid rgba(0,222,255,0.08);
  background: #0b1a2f;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.trend-card:hover {
  border-color: rgba(0,222,255,0.28);
  transform: translateY(-3px);
}
.trend-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(170deg, rgba(3,8,16,0.05), rgba(3,8,16,0.88));
}
.trend-card > * { position: relative; z-index: 2; }
.trend-img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 50%; object-fit: cover; z-index: 0;
}
.trend-label {
  display: inline-flex; align-self: flex-start;
  margin-bottom: 8px; padding: 5px 10px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(245,166,35,0.90); color: #1a0e00;
  border: 1px solid rgba(245,166,35,0.60);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}
.trend-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text);
}
.trend-card .btn { font-size: 12px; padding: 8px 14px; }

/* ── ENGAGE / COMMUNITY ── */
.engagement-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 18px;
}
.engage-card {
  padding: 28px 26px;
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  min-height: 290px;
  display: flex; flex-direction: column;
  clip-path: polygon(
    22px 0%, calc(100% - 22px) 0%,
    100% 22px, 100% calc(100% - 22px),
    calc(100% - 22px) 100%, 22px 100%,
    0% calc(100% - 22px), 0% 22px
  );
}
.engage-icon {
  width: 50px; height: 50px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 22px; margin-bottom: 16px;
  background: rgba(0,222,255,0.08);
  border: 1px solid rgba(0,222,255,0.14);
  flex-shrink: 0;
}
.engage-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.01em; margin-bottom: 10px; color: var(--text);
}
.engage-card p {
  color: var(--muted); font-size: 14px;
  line-height: 1.65; flex: 1; margin-bottom: 18px;
}
.signup { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input {
  flex: 1; min-width: 140px; padding: 11px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0,222,255,0.16);
  color: var(--text); font-family: 'Exo 2', sans-serif; font-size: 14px;
  outline: none;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
.signup input::placeholder { color: var(--muted); }
.signup input:focus { border-color: rgba(0,222,255,0.4); }

/* ── INFO BOX ── */
.info-box {
  padding: 22px 28px;
  border: 1px solid var(--card-border);
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  color: var(--muted); line-height: 1.8; font-size: 14px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}
.info-box strong { color: var(--text); }
.info-box a { color: var(--cyan); }
.info-box a:hover { text-decoration: underline; }

/* ── MEMBERS SECTION ── */
#locked-games {
  background: rgba(168,85,247,0.04);
  border-top: 1px solid rgba(168,85,247,0.12);
  border-bottom: 1px solid rgba(168,85,247,0.12);
}

/* ── FOOTER ── */
.site-footer { padding: 40px 0 60px; }
.footer-grid {
  display: flex; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(0,222,255,0.07);
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--cyan); }
.footer-copy { font-size: 13px; color: var(--muted); }

/* ── GAME MODAL ── */
#game-modal {
  position: fixed; inset: 0; z-index: 1000;
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  padding: 0; border: none; margin: 0;
  background: rgba(3,8,16,0.95);
  display: none; flex-direction: column;
}
#game-modal::backdrop { background: rgba(0,0,0,0.85); }
#game-modal[open] { display: flex; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(0,222,255,0.10);
  background: rgba(5,15,30,0.9);
  flex-shrink: 0;
}
.modal-title { font-family: 'Orbitron', sans-serif; font-size: 14px; font-weight: 700; color: var(--text); }
.modal-actions { display: flex; gap: 8px; }
.modal-fullscreen-btn,
.modal-close {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(0,222,255,0.15);
  color: var(--muted); transition: color .2s, background .2s;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}
.modal-fullscreen-btn:hover, .modal-close:hover {
  color: var(--text); background: rgba(0,222,255,0.12);
}
#game-iframe {
  flex: 1; width: 100%; border: none;
  background: #000;
}
.modal-fs { position: fixed; inset: 0; z-index: 1001; }
.modal-fs #game-iframe { width: 100vw; height: 100vh; }

/* ── AUTH MODAL ── */
#auth-modal {
  display: none; position: fixed; inset: 0; z-index: 900;
  background: rgba(3,8,16,0.88);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
#auth-modal:not([hidden]) { display: flex; }
/* Explicit show/hide for auth panels (avoids UA [hidden] repaint bugs) */
[data-auth-panel]         { display: none; }
[data-auth-panel]:not([hidden]) { display: block; }

.auth-modal-panel {
  position: relative;
  width: min(440px, 100vw - 32px);
  background: #080f1e;
  border: 1px solid rgba(0,222,255,0.18);
  padding: 36px 32px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  /* force compositing layer so clip-path + backdrop-filter don't suppress child paints */
  transform: translateZ(0);
}
.auth-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--muted); transition: color .2s;
}
.auth-modal-close:hover { color: var(--text); }
.auth-modal-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.auth-modal-brand-name {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900; font-size: 16px; color: var(--text);
}
.auth-tabs {
  display: flex; margin-bottom: 22px;
  border-bottom: 1px solid rgba(0,222,255,0.12);
}
.auth-tab-btn {
  flex: 1; padding: 10px; font-size: 14px; font-weight: 700;
  background: none; border: none; color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  font-family: 'Exo 2', sans-serif;
}
.auth-tab-btn.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); margin-bottom: 6px; letter-spacing: 0.04em;
}
.auth-field input {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,222,255,0.16);
  color: var(--text); font-family: 'Exo 2', sans-serif; font-size: 14px;
  outline: none;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: border-color .2s;
}
.auth-field input:focus { border-color: rgba(0,222,255,0.45); }
.auth-error {
  padding: 10px 14px; margin-bottom: 14px; font-size: 13px;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.25);
  color: #fca5a5;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
input.auth-submit {
  width: 100%; padding: 13px; font-size: 14px; font-weight: 700;
  color: #020810; background: linear-gradient(135deg, var(--cyan), #0099bb);
  border: none; cursor: pointer;
  font-family: 'Exo 2', sans-serif;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  margin-top: 4px; transition: box-shadow .2s;
}
input.auth-submit:hover { box-shadow: 0 0 28px rgba(0,222,255,0.4); }
.auth-switch {
  margin-top: 16px; text-align: center;
  font-size: 13px; color: var(--muted);
}
.auth-switch button {
  background: none; border: none; color: var(--cyan);
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit;
}
.auth-success {
  padding: 12px 14px; margin-top: 8px; font-size: 13px;
  background: rgba(52,211,153,0.10);
  border: 1px solid rgba(52,211,153,0.25);
  color: var(--green); text-align: center;
}
.auth-verification-notice {
  padding: 12px 14px; font-size: 13px; line-height: 1.6;
  background: rgba(0,222,255,0.07);
  border: 1px solid rgba(0,222,255,0.20);
  color: var(--muted); text-align: center; margin-top: 12px;
}
.auth-modal-logo .brand-badge { font-size: 14px; width: 32px; height: 32px; }

/* ── NAV AUTH CHIP (logged in) ── */
.nav-user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0,222,255,0.18);
  font-size: 13px; font-weight: 600; color: var(--text);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.nav-logout-btn {
  background: none; border: 1px solid rgba(255,255,255,0.10);
  padding: 7px 12px; font-size: 12px; color: var(--muted);
  transition: color .2s;
}
.nav-logout-btn:hover { color: var(--danger); }

/* ── TOAST ── */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  padding: 12px 20px; font-size: 14px; font-weight: 600;
  min-width: 200px;
  background: #0d1e35;
  border: 1px solid rgba(0,222,255,0.25);
  color: var(--text);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn .25s ease;
}
.toast.success { border-color: rgba(52,211,153,0.35); color: var(--green); }
.toast.error   { border-color: rgba(248,113,113,0.35); color: #fca5a5; }
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── SUB-PAGE PROSE ── */
.prose-page { padding: 48px 0 80px; }
.prose-page h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(22px, 4vw, 38px); font-weight: 900;
  background: linear-gradient(140deg, #fff 30%, var(--cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 8px;
}
.prose-page .page-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); margin-bottom: 36px;
}
.prose-page h2 {
  font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: 700;
  color: var(--cyan); margin: 32px 0 12px; letter-spacing: 0.03em;
}
.prose-page p, .prose-page li { color: var(--muted); font-size: 15px; line-height: 1.8; margin-bottom: 14px; }
.prose-page ul { padding-left: 20px; }
.prose-page a { color: var(--cyan); }
.prose-page a:hover { text-decoration: underline; }
.prose-page strong { color: var(--text); }

/* contact form */
.contact-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; margin-top: 28px; }
.contact-form label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.05em; display: block; margin-bottom: 5px; }
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,222,255,0.16);
  color: var(--text); font-family: 'Exo 2', sans-serif; font-size: 14px;
  outline: none;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: border-color .2s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: rgba(0,222,255,0.45); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.form-success {
  padding: 14px 18px; font-size: 14px;
  background: rgba(52,211,153,0.10);
  border: 1px solid rgba(52,211,153,0.25);
  color: var(--green);
}
.form-error {
  padding: 14px 18px; font-size: 14px;
  background: rgba(248,113,113,0.10);
  border: 1px solid rgba(248,113,113,0.25);
  color: #fca5a5;
}

/* ── RESPONSIVE ── */
@media (max-width: 1080px) {
  .games-grid, .trending-row { grid-template-columns: repeat(2,1fr); }
  .engagement-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 720px) {
  .nav-links, .nav-auth { display: none; }
  .burger { display: flex; }
  .games-grid, .engagement-grid, .trending-row { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: min(300px, 100%); justify-content: center; }
  .signup { flex-direction: column; }
  .signup input, .signup .btn { width: 100%; }
}
@media (min-width: 721px) {
  .mobile-menu { display: none !important; }
}
