:root {
  --bg: #0a0a0f;
  --bg-elevated: #131318;
  --bg-card: #16161d;
  --red: #e50914;
  --red-bright: #ff2a3a;
  --gold: #f5c518;
  --text: #f5f5f7;
  --text-dim: #b3b3bd;
  --text-faint: #7a7a88;
  --border: rgba(255,255,255,0.08);
  --border-soft: rgba(255,255,255,0.05);
  --radius: 14px;
  --font-body: 'Vazirmatn', sans-serif;
  --font-display: 'Lalezar', 'Vazirmatn', sans-serif;
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.55);
}

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

html { scroll-behavior: smooth; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.75;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > main { flex: 1 0 auto; }
body > .site-header, body > .site-footer { flex-shrink: 0; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
input { font-family: inherit; }

h1, h2, h3, .brand-text, .hero-title, .detail-hero-content h1 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.3px;
}

::selection { background: var(--red); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a34; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9,9,13,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  order: 10;
  margin-inline-start: auto;
}

.brand-icon { width: 36px; height: 36px; border-radius: 9px; }

.brand-text {
  font-size: 25px;
  color: var(--text);
  letter-spacing: 0.5px;
}

.main-nav {
  display: flex;
  gap: 26px;
  align-items: center;
}

.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s;
  position: relative;
  padding: 8px 0;
}

.main-nav a:hover, .main-nav a.active { color: var(--text); }

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  justify-content: flex-end;
}

/* Search */
.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 9px 14px;
  color: var(--text-faint);
  transition: all 0.25s;
  cursor: text;
}
.search-trigger:focus-within {
  border-color: var(--red);
  background: rgba(255,255,255,0.09);
  color: var(--text);
}
.search-trigger input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  width: 130px;
  transition: width 0.25s;
}
.search-trigger:focus-within input { width: 190px; }
.search-trigger input::placeholder { color: var(--text-faint); }

.mobile-menu-btn {
  display: none;
  background: transparent;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 12px 20px 20px;
  gap: 4px;
  border-top: 1px solid var(--border);
}
.mobile-nav a, .mobile-nav button {
  padding: 12px 8px;
  color: var(--text-dim);
  background: transparent;
  text-align: right;
  width: 100%;
  font-size: 15px;
}
.mobile-nav.open { display: flex; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(.2,.8,.2,1);
  white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(229,9,20,0.28); }
.btn-primary:hover { background: var(--red-bright); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(229,9,20,0.4); }
.btn-primary:disabled { background: #3a1a1e; color: var(--text-faint); cursor: not-allowed; box-shadow: none; transform: none; }
.btn-secondary { background: rgba(255,255,255,0.1); color: var(--text); }
.btn-secondary:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; justify-content: center; }
.inline-form { display: inline-block; }

/* User menu */
.user-menu { position: relative; }
.user-avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.user-dropdown {
  display: none;
  position: absolute;
  top: 48px;
  left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 210px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
}
.user-dropdown.open { display: block; }
.user-dropdown-name {
  padding: 10px 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.user-dropdown a, .logout-btn {
  display: block;
  width: 100%;
  text-align: right;
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--text-dim);
  background: transparent;
  font-size: 14px;
}
.user-dropdown a:hover, .logout-btn:hover { background: rgba(255,255,255,0.07); color: var(--text); }

/* ===== Hero ===== */
.hero, .detail-hero {
  position: relative;
  min-height: 66vh;
  display: flex;
  align-items: flex-end;
  padding: 60px 28px 84px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
}

.hero-watermark {
  position: absolute;
  left: -60px;
  top: -60px;
  width: 420px;
  height: 420px;
  opacity: 0.06;
  filter: blur(1px);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 4%, rgba(10,10,15,0.55) 50%, rgba(10,10,15,0.2) 100%),
              linear-gradient(to left, rgba(8,8,12,0.75), rgba(8,8,12,0.25) 45%, transparent 75%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.hero-content, .detail-hero-content {
  max-width: 660px;
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}
.badge-soon { background: var(--gold); color: #1a1400; }
.badge-outline { background: rgba(255,255,255,0.08); color: var(--text-dim); border: 1px solid var(--border); }
.badge-age { background: rgba(255,255,255,0.1); color: var(--text); border: 1px solid var(--border); font-family: var(--font-body); }

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #1a1400;
  box-shadow: 0 0 0 0 rgba(26,20,0,0.6);
  animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(26,20,0,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(26,20,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(26,20,0,0); }
}

.hero-title, .detail-hero-content h1 {
  font-size: 60px;
  margin-bottom: 12px;
  color: var(--text);
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.hero-tagline, .detail-tagline {
  font-size: 19px;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 600;
}
.hero-desc, .detail-desc {
  font-size: 15.5px;
  color: var(--text-dim);
  max-width: 580px;
  margin-bottom: 28px;
}
.hero-actions, .detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.detail-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.notify-count {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 22px;
}
.notify-count strong { color: var(--gold); }

.notified-tag {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
}

/* Gradient variants for game covers */
.hero-gradient-monopoly, .cover-gradient-monopoly, .detail-gradient-monopoly { background: radial-gradient(circle at 75% 25%, #2f8f58, transparent 55%), linear-gradient(150deg, #123321, #08150e); background-color: #0e2718; }
.hero-gradient-openfront, .cover-gradient-openfront, .detail-gradient-openfront { background: radial-gradient(circle at 75% 25%, #3f7fc4, transparent 55%), linear-gradient(150deg, #16304d, #08151f); background-color: #102338; }
.hero-gradient-stranger, .cover-gradient-stranger, .detail-gradient-stranger { background: radial-gradient(circle at 75% 25%, #d8402e, transparent 55%), linear-gradient(150deg, #3a0d0d, #150505); background-color: #240707; }
.hero-gradient-gtfo, .cover-gradient-gtfo, .detail-gradient-gtfo { background: radial-gradient(circle at 75% 25%, #5c46a8, transparent 55%), linear-gradient(150deg, #191933, #08081a); background-color: #131328; }
.hero-gradient-valheim, .cover-gradient-valheim, .detail-gradient-valheim { background: radial-gradient(circle at 75% 25%, #4f9270, transparent 55%), linear-gradient(150deg, #1f3d2e, #0c1a14); background-color: #17291f; }
.hero-gradient-among, .cover-gradient-among, .detail-gradient-among { background: radial-gradient(circle at 75% 25%, #a344c9, transparent 55%), linear-gradient(150deg, #38124a, #140620); background-color: #260e33; }
.hero-gradient-1, .cover-gradient-1, .detail-gradient-1 { background: radial-gradient(circle at 75% 25%, #a84343, transparent 55%), linear-gradient(150deg, #351414, #140707); background-color: #260f0f; }
.hero-gradient-gta, .cover-gradient-gta, .detail-gradient-gta { background: radial-gradient(circle at 75% 25%, #2a9d8f, transparent 55%), linear-gradient(150deg, #2c1a3d, #0d0714); background-color: #1c1226; }
.hero-gradient-stronghold, .cover-gradient-stronghold, .detail-gradient-stronghold { background: radial-gradient(circle at 75% 25%, #b8862f, transparent 55%), linear-gradient(150deg, #3a2b12, #160f06); background-color: #2a1f0c; }
.hero-gradient-repo, .cover-gradient-repo, .detail-gradient-repo { background: radial-gradient(circle at 75% 25%, #7a5cc9, transparent 55%), linear-gradient(150deg, #1c1730, #08070f); background-color: #171226; }
.hero-gradient-escapists, .cover-gradient-escapists, .detail-gradient-escapists { background: radial-gradient(circle at 75% 25%, #d4972f, transparent 55%), linear-gradient(150deg, #3d2c10, #170f05); background-color: #2b1e0a; }

.detail-hero { min-height: 52vh; padding-bottom: 54px; }

/* ===== Stats bar ===== */
.stats-bar {
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.stats-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.stat-item strong {
  font-family: var(--font-display);
  font-size: 32px;
  background: linear-gradient(90deg, var(--gold), var(--red-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-item span { font-size: 13px; color: var(--text-faint); }
.stat-divider { width: 1px; height: 34px; background: var(--border); }

/* ===== Content rows ===== */
.rows-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 44px 28px 90px;
}

.flash-stack { margin-bottom: 20px; }
.flash {
  padding: 13px 18px;
  border-radius: 9px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
}
.flash-success { background: rgba(46,204,113,0.14); color: #4fd97f; border: 1px solid rgba(46,204,113,0.28); }
.flash-error { background: rgba(229,9,20,0.14); color: #ff6b73; border: 1px solid rgba(229,9,20,0.28); }

/* Category rail */
.category-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 40px;
  padding-bottom: 4px;
}
.category-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 11px 18px;
  border-radius: 100px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 0.2s;
}
.category-chip:hover { border-color: var(--red); color: var(--text); transform: translateY(-2px); }
.category-chip-all { background: linear-gradient(90deg, var(--red), #b3050d); color: #fff; border-color: transparent; }
.category-chip-icon { font-size: 16px; }

.row-section { margin-bottom: 48px; }
.row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}
.row-head h2 { font-size: 25px; }
.row-more { font-size: 13px; color: var(--text-dim); transition: color 0.2s; }
.row-more:hover { color: var(--red-bright); }

.card-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 20px 2px 22px;
  scrollbar-width: thin;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding-top: 12px;
}

.game-card {
  position: relative;
  z-index: 1;
  flex: 0 0 250px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s, border-color 0.3s;
  will-change: transform;
  backface-visibility: hidden;
}
.grid-cards .game-card { flex: unset; }
.game-card:hover {
  z-index: 4;
  transform: translateY(-6px) scale(1.03);
  box-shadow: var(--shadow-lg);
  border-color: rgba(229,9,20,0.45);
}

.game-card-cover {
  position: relative;
  aspect-ratio: 16/10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.game-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,6,9,0.88) 0%, rgba(6,6,9,0.25) 55%, rgba(6,6,9,0.05) 100%);
}
.game-card-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.12) 45%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.game-card:hover .game-card-shine { transform: translateX(100%); }
.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gold);
  color: #1a1400;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 100px;
  z-index: 2;
}
.card-fav-icon {
  position: absolute;
  top: 10px;
  left: 10px;
  color: var(--red-bright);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
  z-index: 2;
}
.game-card-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.game-card-platform {
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.45);
  padding: 4px 11px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}
.game-card-play {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.25s;
}
.game-card:hover .game-card-play { opacity: 1; transform: scale(1); }
.game-card-info { padding: 15px 16px 17px; }
.game-card-info h3 { font-size: 16px; margin-bottom: 5px; font-family: var(--font-body); font-weight: 700; }
.game-card-info p {
  font-size: 13px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Why section */
.why-section { margin-bottom: 52px; }
.why-head { text-align: center; margin-bottom: 28px; }
.why-head h2 { font-size: 28px; margin-bottom: 8px; }
.why-head p { color: var(--text-dim); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.why-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.25s, border-color 0.25s;
}
.why-card:hover { transform: translateY(-4px); border-color: rgba(245,197,24,0.35); }
.why-icon { font-size: 30px; margin-bottom: 14px; }
.why-card h3 { font-size: 17px; margin-bottom: 8px; font-family: var(--font-body); font-weight: 700; }
.why-card p { font-size: 13.5px; color: var(--text-faint); }

.promo-banner {
  position: relative;
  margin-top: 8px;
  padding: 46px 40px;
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(229,9,20,0.16), rgba(245,197,24,0.07));
  border: 1px solid rgba(229,9,20,0.25);
  text-align: center;
  overflow: hidden;
}
.promo-glow {
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(245,197,24,0.25), transparent 70%);
  top: -100px; right: -60px;
  pointer-events: none;
}
.promo-content { position: relative; z-index: 1; }
.promo-content .badge { margin-bottom: 14px; }
.promo-content h3 { font-size: 27px; margin-bottom: 10px; color: var(--text); }
.promo-content p { color: var(--text-dim); margin-bottom: 24px; max-width: 500px; margin-inline: auto; }

/* ===== Page header (games/favorites) ===== */
.page-header {
  max-width: 1440px;
  margin: 0 auto;
  padding: 52px 28px 8px;
}
.page-header h1 { font-size: 36px; margin-bottom: 8px; }
.page-header p { color: var(--text-dim); }

.games-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  color: var(--text-faint);
  transition: border-color 0.2s;
}
.games-search:focus-within { border-color: var(--red); }
.games-search input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
}
.games-search input::placeholder { color: var(--text-faint); }
.search-clear { font-size: 13px; color: var(--red-bright); flex-shrink: 0; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 13px; color: var(--text-faint); margin-left: 4px; font-weight: 600; }
.chip {
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 13px;
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.chip:hover { background: rgba(255,255,255,0.12); }
.chip-active { background: var(--red); color: #fff; }

.results-meta {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.empty-state {
  text-align: center;
  padding: 90px 20px;
  color: var(--text-faint);
}
.empty-state-icon { font-size: 42px; margin-bottom: 14px; }
.empty-state .btn { margin-top: 16px; }

/* ===== Coming soon / play page ===== */
.coming-soon-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}
.coming-soon-box {
  text-align: center;
  max-width: 480px;
}
.coming-soon-icon { font-size: 60px; margin-bottom: 16px; }
.coming-soon-box h1 { font-size: 28px; margin: 10px 0 14px; }
.coming-soon-box p { color: var(--text-dim); margin-bottom: 24px; }
.progress-track {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 100px;
}
.progress-label { font-size: 13px; color: var(--text-faint); margin-bottom: 24px; }

/* ===== Auth pages ===== */
.auth-body { background: var(--bg); min-height: 100vh; }
.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.auth-visual {
  position: relative;
  background: radial-gradient(circle at 30% 20%, #2a0a10, transparent 55%),
              radial-gradient(circle at 80% 80%, #1a1000, transparent 55%),
              var(--bg);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-left: 1px solid var(--border-soft);
}
.auth-visual-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 75%);
}
.auth-visual-text { position: relative; z-index: 1; max-width: 420px; }
.auth-visual-text h2 { font-size: 30px; margin-bottom: 12px; }
.auth-visual-text p { color: var(--text-dim); font-size: 15px; }

.auth-brand { display: inline-flex; align-items: center; gap: 9px; position: relative; z-index: 1; }
.auth-brand-mobile { display: none; margin-bottom: 24px; }

.auth-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-faint); font-size: 14px; margin-bottom: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
}
.auth-form input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 13px 14px;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
}
.auth-form input:focus { outline: none; border-color: var(--red); background: rgba(255,255,255,0.03); }
.auth-form button { margin-top: 8px; }
.auth-switch { margin-top: 22px; text-align: center; font-size: 14px; color: var(--text-dim); }
.auth-switch a { color: var(--red-bright); font-weight: 600; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 52px 28px 30px;
  margin-top: 40px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015));
}
.footer-inner { max-width: 1440px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-col h4 { font-size: 14px; color: var(--text); margin-bottom: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-logout-form button {
  font-size: 13.5px;
  color: var(--text-faint);
  transition: color 0.2s;
  background: transparent;
  text-align: right;
  padding: 0;
}
.footer-col a:hover, .footer-logout-form button:hover { color: var(--red-bright); }
.footer-logout-form { display: contents; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-brand .brand-icon { width: 26px; height: 26px; }
.footer-brand .brand-text { font-size: 19px; }
.footer-text { color: var(--text-faint); font-size: 13px; margin-bottom: 16px; max-width: 280px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: border-color 0.2s, transform 0.2s;
}
.footer-social a:hover { border-color: var(--red); transform: translateY(-2px); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.footer-copy, .footer-madewith { font-size: 12px; color: var(--text-faint); }
.footer-credit { color: var(--text-dim); font-weight: 600; }
.footer-credit:hover { color: var(--red-bright); }

/* ===== Confetti ===== */
.confetti-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: 0; }
}

/* ===== Game detail layout ===== */
.detail-layout {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 32px;
  margin-bottom: 52px;
  align-items: start;
}
.detail-block { margin-bottom: 32px; }
.detail-block h2 { font-size: 21px; margin-bottom: 14px; }
.detail-long-desc { color: var(--text-dim); font-size: 15px; line-height: 1.9; white-space: pre-line; }

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.detail-side {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: 90px;
}
.detail-side h3 { font-size: 15px; margin-bottom: 16px; color: var(--text-dim); font-family: var(--font-body); font-weight: 700; }
.spec-list { display: flex; flex-direction: column; gap: 12px; }
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
}
.spec-row:last-child { border-bottom: none; padding-bottom: 0; }
.spec-row dt { color: var(--text-faint); }
.spec-row dd { color: var(--text); font-weight: 600; text-align: left; }

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}

/* ===== Static pages (about/terms) ===== */
.static-page { max-width: 820px; }
.static-block { margin-bottom: 34px; }
.static-block h2 { font-size: 20px; margin-bottom: 12px; }
.static-block p { color: var(--text-dim); font-size: 15px; line-height: 1.9; }
.static-block a { color: var(--red-bright); font-weight: 600; }
.static-block .why-grid { margin-top: 18px; }

/* ===== Contact page ===== */
.contact-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
  align-items: start;
  max-width: 980px;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.contact-form input, .contact-form textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14.5px;
  font-family: var(--font-body);
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--red); }
.contact-info-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.contact-info-card h3 { font-size: 15px; margin-bottom: 14px; }
.contact-info-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; color: var(--text-dim); }
.contact-note { font-size: 13px; color: var(--text-faint); }

@media (max-width: 780px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-brand-mobile { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav, .header-actions { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero-title, .detail-hero-content h1 { font-size: 38px; }
  .hero, .detail-hero { min-height: 52vh; padding: 40px 20px 50px; }
  .header-inner { padding: 12px 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .stats-inner { gap: 20px; }
  .stat-item strong { font-size: 26px; }
}