/* ═══════════════════════════════════════════════════════════════
   PERSIAN MINE — Design System v1.0
   Base: Deep Space / Cyber-Persian (Pockify v3.0)
   Additions: Gold Minecraft theme, Leaderboard, Carousel,
              Game Modes, Odometer, Store, Dashboard
   Font: System fallback (Tahoma has Persian support)
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Shabnam';
  src: url('fonts/Shabnam.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ───────────────────────────────────────────────── */
:root {
  /* Core palette (Pockify) */
  --bg:           #060610;
  --bg-soft:      #0b0b1a;
  --bg-card:      #0f0f20;
  --bg-alt:       #080815;

  --primary:      #818cf8;
  --primary-dim:  #6366f1;
  --primary-glow: rgba(99,102,241,.35);
  --cyan:         #22d3ee;
  --cyan-glow:    rgba(34,211,238,.25);
  --green:        #34d399;
  --green-glow:   rgba(52,211,153,.25);
  --red:          #f87171;
  --red-glow:     rgba(248,113,113,.25);
  --yellow:       #fbbf24;
  --purple:       #a78bfa;

  /* PersianMine gold accents */
  --gold:         #f5c85b;
  --gold2:        #ffe6a0;
  --gold-dim:     #d4a520;
  --gold-glow:    rgba(245,200,91,.30);
  --mc-blue:      #4da3ff;
  --mc-blue-glow: rgba(77,163,255,.25);

  --text:         #e2e8f0;
  --text-soft:    #94a3b8;
  --muted:        #475569;

  --glass:        rgba(255,255,255,.04);
  --glass-hover:  rgba(255,255,255,.07);
  --glass-border: rgba(255,255,255,.08);
  --glass-border-hover: rgba(255,255,255,.16);

  --radius:       14px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --radius-xl:    28px;

  --shadow:       0 4px 24px rgba(0,0,0,.4);
  --shadow-lg:    0 8px 48px rgba(0,0,0,.6);
  --shadow-primary: 0 0 32px var(--primary-glow);
  --shadow-gold:  0 0 32px var(--gold-glow);

  --header-h:     68px;
  --transition:   all .22s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Vazirmatn', 'Shabnam', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
}

/* Animated grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: -50%; right: -20%;
  width: 70vw; height: 70vw;
  background: radial-gradient(ellipse, rgba(99,102,241,.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: nebula 18s ease-in-out infinite alternate;
}

@keyframes nebula {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-5%,3%) scale(1.08); }
}

main { position: relative; z-index: 1; }

/* ── Container ───────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Typography ─────────────────────────────────────────────── */
h1,h2,h3,h4 { font-weight: 800; line-height: 1.25; }
h1 { font-size: clamp(1.8rem,4vw,2.8rem); }
h2 { font-size: clamp(1.4rem,3vw,2rem); }
h3 { font-size: 1.2rem; }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--cyan); }

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gold-text {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 50%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gold-blue-text {
  background: linear-gradient(135deg, var(--gold) 0%, var(--mc-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.muted-text, .muted { color: var(--text-soft); font-size: .875rem; }
.mini-title {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(99,102,241,.12);
  padding: 4px 14px;
  border-radius: 99px;
  border: 1px solid rgba(99,102,241,.2);
  margin-bottom: 16px;
}
.mini-title.gold {
  color: var(--gold);
  background: rgba(245,200,91,.1);
  border-color: rgba(245,200,91,.2);
}

/* ── Glass Card ─────────────────────────────────────────────── */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--glass-hover);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-align: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .15s;
}
.btn:hover::after { background: rgba(255,255,255,.05); }
.btn:hover { transform: scale(1.03) translateY(-1px); }
.btn:active { transform: scale(.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dim), var(--purple));
  color: #fff;
  border-color: rgba(129,140,248,.3);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 0 24px var(--primary-glow), 0 4px 16px rgba(0,0,0,.3);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: #1a0f00;
  border-color: rgba(245,200,91,.3);
  font-weight: 700;
}
.btn-gold:hover {
  color: #1a0f00;
  box-shadow: 0 0 28px var(--gold-glow), 0 4px 20px rgba(0,0,0,.35);
}

.btn-glow { box-shadow: 0 0 0 var(--primary-glow); }
.btn-glow:hover { box-shadow: 0 0 28px var(--primary-glow), 0 4px 20px rgba(0,0,0,.35); }
.btn-gold-glow { box-shadow: 0 0 0 var(--gold-glow); }
.btn-gold-glow:hover { box-shadow: 0 0 28px var(--gold-glow); }

.btn-glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-glass:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border-hover);
  color: var(--text);
}

.btn-secondary {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--glass-border);
  color: var(--text-soft);
}
.btn-secondary:hover { color: var(--text); background: rgba(255,255,255,.1); }

.btn-danger {
  background: rgba(248,113,113,.15);
  border: 1px solid rgba(248,113,113,.25);
  color: var(--red);
}
.btn-danger:hover { background: rgba(248,113,113,.25); box-shadow: 0 0 16px var(--red-glow); color: var(--red); }

.btn-success {
  background: rgba(52,211,153,.12);
  border: 1px solid rgba(52,211,153,.22);
  color: var(--green);
}
.btn-success:hover { background: rgba(52,211,153,.22); box-shadow: 0 0 16px var(--green-glow); color: var(--green); }

.btn-sm { padding: 6px 14px; font-size: .8rem; border-radius: 6px; }
.full { width: 100%; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(6,6,16,.88);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 20px;
}

.brand {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--gold2) !important;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(245,200,91,.2), rgba(77,163,255,.15));
  border: 1px solid rgba(245,200,91,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 16px var(--gold-glow);
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-soft) !important;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.nav-link:hover { background: var(--glass-hover); color: var(--text) !important; }
.nav-link.active { background: rgba(99,102,241,.1); color: var(--primary) !important; border: 1px solid rgba(99,102,241,.15); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.header-actions .btn { padding: 7px 16px; font-size: .82rem; }

/* User avatar dropdown */
.user-menu-wrap {
  position: relative;
}
.user-avatar-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(245,200,91,.4);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-avatar-btn:hover { border-color: var(--gold); box-shadow: 0 0 12px var(--gold-glow); }
.user-avatar-btn img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 200px;
  background: rgba(10,10,25,.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(.97);
  pointer-events: none;
  transition: var(--transition);
  z-index: 200;
}
.user-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.user-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  font-size: .82rem;
  color: var(--text-soft);
}
.user-dropdown-header strong { display: block; color: var(--text); font-size: .9rem; }
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: .85rem;
  color: var(--text-soft);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  text-align: right;
}
.user-dropdown-item:hover { background: var(--glass-hover); color: var(--text); }
.user-dropdown-item.danger { color: var(--red); }
.user-dropdown-item.danger:hover { background: rgba(248,113,113,.1); }
.user-dropdown-item .item-icon { font-size: 1rem; }

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

@media (max-width: 900px) {
  .mobile-menu-btn { display: flex; }
  .header-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(6,6,16,.97);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 24px;
    align-items: stretch;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s;
    z-index: 99;
    gap: 4px;
  }
  body.nav-open .header-nav { transform: translateY(0); opacity: 1; }
  body.nav-open .mobile-menu-btn span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
  body.nav-open .mobile-menu-btn span:nth-child(2) { opacity: 0; }
  body.nav-open .mobile-menu-btn span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  position: relative;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(245,200,91,.08) 0%,
    rgba(77,163,255,.06) 30%,
    rgba(99,102,241,.04) 60%,
    transparent 70%);
  pointer-events: none;
  animation: heroPulse 6s ease-in-out infinite;
}
@keyframes heroPulse {
  0%,100% { transform: translate(-50%,-50%) scale(1); opacity: .8; }
  50%      { transform: translate(-50%,-50%) scale(1.1); opacity: 1; }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0;
}
@media (max-width:768px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding: 60px 0; }
  .hero-visual { display: none; }
}

.hero-content { position: relative; z-index: 1; }
.hero-content h1 { margin: 14px 0 20px; letter-spacing: -.025em; line-height: 1.15; }
.hero-title-main { font-size: clamp(2.5rem,6vw,4.5rem); font-weight: 900; }
.hero-text { font-size: 1.05rem; color: var(--text-soft); max-width: 520px; margin-bottom: 32px; line-height: 1.85; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-actions .btn { padding: 13px 28px; font-size: .95rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 99px;
  background: rgba(245,200,91,.1);
  border: 1px solid rgba(245,200,91,.25);
  color: var(--gold);
  letter-spacing: .04em;
}

.hero-stats {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  width: fit-content;
  gap: 0;
}
.hero-stat-item { display: flex; flex-direction: column; align-items: center; padding: 0 24px; }
.hero-stat-item strong { font-size: 1.5rem; font-weight: 900; color: var(--gold); }
.hero-stat-item span { font-size: .78rem; color: var(--text-soft); margin-top: 2px; }
.hero-stat-divider { width: 1px; height: 40px; background: var(--glass-border); }

/* Hero visual cards */
.hero-visual { display: flex; flex-direction: column; gap: 16px; }
.hero-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius);
}
.hero-card:nth-child(1) { animation: cardFloat1 4s ease-in-out infinite; margin-right: 24px; }
.hero-card:nth-child(2) { animation: cardFloat2 4.5s ease-in-out infinite; }
.hero-card:nth-child(3) { animation: cardFloat3 3.8s ease-in-out infinite; margin-right: 24px; }

@keyframes cardFloat1 { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes cardFloat2 { 0%,100%{transform:translateY(-4px)} 50%{transform:translateY(4px)} }
@keyframes cardFloat3 { 0%,100%{transform:translateY(-2px)} 50%{transform:translateY(6px)} }

.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
}
.card-icon.blue   { background: rgba(34,211,238,.15); color: var(--cyan); border: 1px solid rgba(34,211,238,.2); }
.card-icon.purple { background: rgba(167,139,250,.15); color: var(--purple); border: 1px solid rgba(167,139,250,.2); }
.card-icon.green  { background: rgba(52,211,153,.15); color: var(--green); border: 1px solid rgba(52,211,153,.2); }
.card-icon.gold   { background: rgba(245,200,91,.15); color: var(--gold); border: 1px solid rgba(245,200,91,.2); }

.card-text { display: flex; flex-direction: column; }
.card-text strong { font-size: .95rem; font-weight: 700; }
.card-text span   { font-size: .78rem; color: var(--text-soft); margin-top: 2px; }

/* ── Sections ───────────────────────────────────────────────── */
.section { padding: 96px 0; position: relative; }
.alt-section { background: linear-gradient(180deg, transparent 0%, rgba(99,102,241,.03) 50%, transparent 100%); }
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; }
.section-head h2 { margin-bottom: 12px; }
.section-head p  { color: var(--text-soft); font-size: 1rem; }

/* ── Server Status Bar ───────────────────────────────────────── */
.server-status-section {
  padding: 48px 0;
  background: linear-gradient(135deg, rgba(245,200,91,.04) 0%, rgba(77,163,255,.03) 100%);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}
.server-status-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.server-status-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.server-status-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: var(--transition);
}
.server-status-dot.online  { background: var(--green); box-shadow: 0 0 14px var(--green), 0 0 5px var(--green); animation: livePulse 2s infinite; }
.server-status-dot.offline { background: var(--red); box-shadow: 0 0 8px var(--red-glow); }
@keyframes livePulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(1.3)} }

.server-ip-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--glass);
  border: 1px solid rgba(245,200,91,.2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.server-ip-badge:hover { border-color: rgba(245,200,91,.4); box-shadow: 0 0 12px var(--gold-glow); }
.server-ip-badge .ip-text { font-size: 1.1rem; font-weight: 800; color: var(--gold); direction: ltr; font-family: monospace; letter-spacing: .04em; }
.server-ip-badge .port-text { font-size: .8rem; color: var(--text-soft); direction: ltr; }
.copy-icon { font-size: .85rem; color: var(--text-soft); margin-right: auto; }

.server-players-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 24px;
  background: rgba(52,211,153,.07);
  border: 1px solid rgba(52,211,153,.2);
  border-radius: var(--radius);
  min-width: 120px;
}
.server-players-badge .players-num { font-size: 1.8rem; font-weight: 900; color: var(--green); }
.server-players-badge .players-label { font-size: .75rem; color: var(--text-soft); margin-top: 2px; }

.server-copy-toast {
  position: fixed;
  bottom: 28px; left: 50%; transform: translateX(-50%) translateY(60px);
  background: rgba(52,211,153,.2);
  border: 1px solid rgba(52,211,153,.35);
  color: var(--green);
  padding: 10px 24px;
  border-radius: 99px;
  font-size: .88rem;
  font-weight: 600;
  z-index: 999;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .35s;
  opacity: 0;
}
.server-copy-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── Game Modes Grid ─────────────────────────────────────────── */
.game-modes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width:1000px) { .game-modes-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:480px)  { .game-modes-grid { grid-template-columns: 1fr; } }

.game-mode-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  aspect-ratio: 4/3;
  background: var(--bg-soft);
  border: 1px solid var(--glass-border);
}
.game-mode-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(245,200,91,.3);
  box-shadow: 0 16px 48px rgba(0,0,0,.5), 0 0 20px var(--gold-glow);
}
.game-mode-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.game-mode-card:hover img { transform: scale(1.07); }
.game-mode-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}
.game-mode-overlay h3 { font-size: 1rem; color: #fff; margin-bottom: 4px; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.game-mode-overlay p  { font-size: .78rem; color: rgba(255,255,255,.7); line-height: 1.4; }
.game-mode-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: #1a0f00;
  font-size: .68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
}

/* ── Leaderboard ─────────────────────────────────────────────── */
.leaderboard-wrap {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(245,200,91,.04);
}
.leaderboard-header h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.leaderboard-header h3 .trophy { font-size: 1.3rem; }

.leaderboard-table { width: 100%; border-collapse: collapse; }
.leaderboard-table th {
  padding: 12px 16px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-soft);
  text-align: right;
  border-bottom: 1px solid var(--glass-border);
  letter-spacing: .04em;
}
.leaderboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  font-size: .88rem;
  vertical-align: middle;
}
.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-table tbody tr {
  transition: var(--transition);
}
.leaderboard-table tbody tr:hover td { background: rgba(245,200,91,.04); }

.lb-rank {
  font-weight: 900;
  font-size: 1.05rem;
  width: 48px;
  text-align: center;
  color: var(--muted);
}
.lb-rank-1 { color: var(--gold); font-size: 1.3rem; }
.lb-rank-2 { color: #c0c0c0; }
.lb-rank-3 { color: #cd7f32; }

.lb-player {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lb-avatar {
  width: 36px; height: 36px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
  background: var(--bg-soft);
  image-rendering: pixelated;
}
.lb-avatar img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.lb-name { font-weight: 600; font-size: .9rem; }

.lb-balance {
  font-weight: 800;
  color: var(--gold);
  direction: ltr;
  font-size: .92rem;
}
.lb-balance-unit { font-size: .72rem; color: var(--text-soft); font-weight: 400; margin-right: 4px; }
.leaderboards-section::before {
  content: '';
  position: absolute;
  inset: 10% 0 auto;
  height: 340px;
  background:
    radial-gradient(circle at 30% 40%, rgba(245,200,91,.11), transparent 30%),
    radial-gradient(circle at 70% 50%, rgba(34,211,238,.10), transparent 32%);
  filter: blur(20px);
  pointer-events: none;
}
.leaderboards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 22px;
  position: relative;
}
@media (max-width:768px) { .leaderboards-grid { grid-template-columns: 1fr; } }
.leaderboard-wrap {
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
.leaderboard-money { border-color: rgba(245,200,91,.18); }
.leaderboard-playtime { border-color: rgba(34,211,238,.18); }
.leaderboard-header.playtime {
  background: linear-gradient(135deg, rgba(34,211,238,.08), rgba(77,163,255,.04));
}
.leaderboard-playtime .leaderboard-table tbody tr:hover td { background: rgba(34,211,238,.045); }
.lb-avatar-time { border-color: rgba(34,211,238,.26); box-shadow: 0 0 14px rgba(34,211,238,.12); }
.lb-time {
  font-weight: 850;
  color: var(--cyan);
  white-space: nowrap;
  font-size: .88rem;
}
.leaderboard-empty {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.leaderboard-empty div { font-size: 2.3rem; }

@media (max-width:480px) {
  .leaderboard-header { padding: 16px; }
  .leaderboard-table th, .leaderboard-table td { padding: 11px 10px; font-size: .78rem; }
  .lb-avatar { width: 32px; height: 32px; border-radius: 7px; }
  .lb-name { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lb-time, .lb-balance { font-size: .78rem; }
}

/* ── Gallery Carousel ────────────────────────────────────────── */
.gallery-section { padding: 80px 0; overflow: hidden; }
.gallery-track-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.gallery-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 8px 4px;
  -webkit-overflow-scrolling: touch;
}
.gallery-track::-webkit-scrollbar { display: none; }

.gallery-thumb {
  flex-shrink: 0;
  width: 280px;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-soft);
}
.gallery-thumb:hover {
  transform: scale(1.03);
  border-color: rgba(245,200,91,.35);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-thumb:hover img { transform: scale(1.08); }

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}
.gallery-nav-btns { display: flex; gap: 8px; }
.gallery-nav-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.gallery-nav-btn:hover { background: rgba(245,200,91,.12); border-color: rgba(245,200,91,.3); color: var(--gold); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: absolute;
  top: 20px; left: 20px;
  width: 40px; height: 40px;
  border-radius: 50%; background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text); font-size: 1.2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.lightbox-close:hover { background: rgba(248,113,113,.2); color: var(--red); }

/* ── Economy Odometer Footer ─────────────────────────────────── */
.economy-footer {
  background: linear-gradient(135deg, rgba(245,200,91,.06) 0%, rgba(77,163,255,.04) 100%);
  border-top: 1px solid rgba(245,200,91,.15);
  padding: 48px 0;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.economy-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(245,200,91,.05), transparent 70%);
  pointer-events: none;
}
.economy-inner {
  text-align: center;
  position: relative;
}
.economy-label {
  font-size: .85rem;
  color: var(--text-soft);
  margin-bottom: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
}
.economy-total-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}
.odometer {
  display: flex;
  align-items: center;
  gap: 2px;
  direction: ltr;
}
.odometer-digit-wrap {
  overflow: hidden;
  height: 3.5rem;
  width: 2.2rem;
  background: rgba(245,200,91,.07);
  border: 1px solid rgba(245,200,91,.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.odometer-digit {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  font-family: monospace;
}
.odometer-sep {
  font-size: 2rem;
  font-weight: 900;
  color: rgba(245,200,91,.4);
  padding: 0 2px;
  font-family: monospace;
}
.economy-currency {
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 700;
  margin-right: 8px;
}
.economy-sub {
  font-size: .82rem;
  color: var(--text-soft);
}

/* ── Site Footer ─────────────────────────────────────────────── */
.site-footer {
  background:
    linear-gradient(180deg, rgba(245,200,91,.045), rgba(6,6,16,.98) 34%),
    var(--bg-soft);
  border-top: 1px solid var(--glass-border);
  padding: 56px 0 26px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(77,163,255,.10), transparent 28%),
    radial-gradient(circle at 18% 0%, rgba(245,200,91,.10), transparent 30%);
  pointer-events: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
@media (max-width:700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { }
.footer-brand .brand { margin-bottom: 12px; display: inline-flex; }
.footer-brand p { font-size: .85rem; color: var(--text-soft); line-height: 1.7; max-width: 260px; }
.footer-server-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(245,200,91,.08);
  border: 1px solid rgba(245,200,91,.18);
  cursor: pointer;
  direction: ltr;
  font-family: monospace;
  color: var(--gold2);
  transition: var(--transition);
}
.footer-server-chip b {
  direction: rtl;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-size: .72rem;
  color: #1a0f00;
  background: var(--gold);
  border-radius: 999px;
  padding: 2px 8px;
}
.footer-server-chip:hover { transform: translateY(-2px); box-shadow: 0 0 20px var(--gold-glow); }
.footer-col h4 { font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.footer-col a { display: block; font-size: .83rem; color: var(--text-soft); margin-bottom: 8px; }
.footer-col a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.social-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--text-soft);
  transition: var(--transition);
  text-decoration: none;
}
.social-btn:hover { border-color: rgba(245,200,91,.3); color: var(--gold); background: rgba(245,200,91,.08); }
.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 1;
}

/* ── Enamad Badge ──────────────────────────────────────────── */
.enamad-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(77,163,255,.06);
  border: 1px solid rgba(77,163,255,.18);
  text-decoration: none;
  transition: var(--transition);
  flex-shrink: 0;
}
.enamad-badge:hover {
  background: rgba(77,163,255,.12);
  border-color: rgba(77,163,255,.35);
  box-shadow: 0 0 20px rgba(77,163,255,.15);
  transform: translateY(-2px);
}
.enamad-logo {
  height: 44px;
  width: auto;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(77,163,255,.25);
  transition: var(--transition);
}
.enamad-badge:hover .enamad-logo {
  border-color: rgba(77,163,255,.5);
  box-shadow: 0 0 12px rgba(77,163,255,.2);
}
@media (max-width: 600px) {
  .enamad-badge { padding: 4px 10px; }
  .enamad-logo { height: 36px; }
}

/* ── Inner Pages ─────────────────────────────────────────────── */
.inner-page {
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 80px;
  min-height: 100vh;
}
.page-header {
  margin-bottom: 40px;
}
.page-header h1 { margin-bottom: 8px; }
.page-header p { color: var(--text-soft); font-size: .95rem; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text-soft); }

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  outline: none;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(99,102,241,.5);
  background: rgba(99,102,241,.05);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
input::placeholder { color: var(--muted); }
textarea { resize: vertical; min-height: 100px; }
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
}

.form-error   { color: var(--red);   font-size: .85rem; padding: 10px 14px; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.2); border-radius: var(--radius-sm); margin-bottom: 16px; }
.form-success { color: var(--green); font-size: .85rem; padding: 10px 14px; background: rgba(52,211,153,.1);  border: 1px solid rgba(52,211,153,.2);  border-radius: var(--radius-sm); margin-bottom: 16px; }

/* Auth card */
.auth-card {
  max-width: 460px;
  margin: 0 auto;
  padding: 44px 40px;
  border-radius: var(--radius-xl);
  text-align: center;
}
@media (max-width:480px) { .auth-card { padding: 32px 20px; } }
.auth-card h1 { margin-bottom: 6px; font-size: 1.8rem; }
.auth-sub { color: var(--text-soft); font-size: .9rem; margin-bottom: 32px; }
.auth-form { text-align: right; }
.auth-link { margin-top: 20px; font-size: .85rem; color: var(--text-soft); }

/* Wizard steps */
.wizard-steps {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  position: relative;
}
.wizard-steps::before {
  content: '';
  position: absolute;
  top: 50%; right: 16px; left: 16px;
  height: 1px;
  background: var(--glass-border);
  z-index: 0;
  transform: translateY(-50%);
}
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
  z-index: 1;
}
.wizard-step-number {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; color: var(--muted);
  transition: var(--transition);
}
.wizard-step.active .wizard-step-number {
  background: linear-gradient(135deg, var(--primary-dim), var(--purple));
  border-color: transparent; color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}
.wizard-step.done .wizard-step-number {
  background: linear-gradient(135deg, var(--green), #059669);
  border-color: transparent; color: #fff;
}
.wizard-step-title { font-size: .72rem; color: var(--muted); font-weight: 600; }
.wizard-step.active .wizard-step-title { color: var(--primary); }
.flow-step { display: none; }
.flow-step.active { display: block; }

/* ── Dashboard ───────────────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width:768px) { .dashboard-layout { grid-template-columns: 1fr; } }

.player-profile-card {
  padding: 32px 24px;
  border-radius: var(--radius-xl);
  text-align: center;
  background: linear-gradient(180deg, rgba(245,200,91,.07) 0%, var(--glass) 100%);
  border: 1px solid rgba(245,200,91,.2);
  position: sticky;
  top: calc(var(--header-h) + 20px);
}
.player-head-wrap {
  width: 88px; height: 88px;
  border-radius: 16px;
  border: 3px solid rgba(245,200,91,.4);
  overflow: hidden;
  margin: 0 auto 16px;
  box-shadow: 0 0 24px var(--gold-glow);
  background: var(--bg-soft);
}
.player-head-wrap img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.player-name { font-size: 1.3rem; font-weight: 900; margin-bottom: 6px; color: var(--gold2); }
.player-rank-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-dim), var(--purple));
  color: #fff;
  margin-bottom: 20px;
}
.player-stats-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}
.player-stat-mini {
  padding: 12px 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  text-align: center;
}
.player-stat-mini .val { font-size: 1.1rem; font-weight: 900; color: var(--gold); }
.player-stat-mini .lbl { font-size: .7rem; color: var(--text-soft); margin-top: 3px; }

.dash-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width:480px) { .dash-cards { grid-template-columns: 1fr; } }

.dash-stat-card {
  padding: 24px 20px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}
.dash-stat-card:hover { border-color: var(--glass-border-hover); transform: translateY(-2px); }
.dash-stat-icon { font-size: 1.5rem; margin-bottom: 12px; }
.dash-stat-value { font-size: 1.6rem; font-weight: 900; letter-spacing: -.02em; margin-bottom: 4px; }
.dash-stat-label { font-size: .78rem; color: var(--text-soft); }
.dash-stat-card.money  .dash-stat-value { color: var(--gold); }
.dash-stat-card.coins  .dash-stat-value { color: var(--cyan); }
.dash-stat-card.prem   .dash-stat-value { color: var(--green); }
.dash-stat-card.job    .dash-stat-value { color: var(--purple); font-size: 1.1rem; }

.skin-showcase {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: center;
  padding: 26px;
  margin-bottom: 24px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(245,200,91,.08), rgba(77,163,255,.05) 50%, rgba(52,211,153,.04)),
    var(--glass);
}
.skin-showcase::before {
  content: '';
  position: absolute;
  inset: auto -10% -35% auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(245,200,91,.18), transparent 68%);
  pointer-events: none;
}
.skin-showcase-copy { position: relative; z-index: 2; }
.skin-showcase-copy h2 { margin-bottom: 10px; font-size: clamp(1.2rem,2.6vw,1.7rem); }
.skin-showcase-copy p { color: var(--text-soft); max-width: 520px; font-size: .92rem; line-height: 1.9; }
.skin-sync-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 7px 12px;
  border-radius: 99px;
  color: var(--green);
  background: rgba(52,211,153,.10);
  border: 1px solid rgba(52,211,153,.20);
  font-size: .76rem;
  font-weight: 800;
}
.skin-sync-state::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: livePulse 1.8s infinite;
}
.skin-stage {
  height: 330px;
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(245,200,91,.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), transparent),
    radial-gradient(circle at 50% 76%, rgba(245,200,91,.18), transparent 35%),
    rgba(3,7,18,.42);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.skin-stage:active { cursor: grabbing; }
.skin-stage::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 20px;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at center, #000 20%, transparent 78%);
  pointer-events: none;
}
#skinViewerCanvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.skin-stage-glow {
  position: absolute;
  left: 50%;
  bottom: 32px;
  width: 110px;
  height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(245,200,91,.35), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

@media (max-width:768px) {
  .skin-showcase { grid-template-columns: 1fr; text-align: center; padding: 22px; }
  .skin-showcase-copy p { margin: 0 auto; }
  .skin-stage { height: 360px; max-width: 360px; width: 100%; margin: 0 auto; }
}
@media (max-width:480px) {
  .skin-showcase { padding: 18px; border-radius: var(--radius-lg); }
  .skin-stage { height: 310px; }
}

/* ── Store ───────────────────────────────────────────────────── */
.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width:768px) { .store-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:480px) { .store-grid { grid-template-columns: 1fr; } }

.store-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  position: relative;
}
.store-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245,200,91,.3);
  box-shadow: 0 16px 48px rgba(0,0,0,.4), 0 0 24px var(--gold-glow);
}
.store-card-img {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(34,211,238,.1));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}
.store-card-img img { width: 100%; height: 100%; object-fit: cover; }
.store-card-body { padding: 20px; }
.store-card-body h3 { margin-bottom: 6px; font-size: 1rem; }
.store-card-body p { font-size: .82rem; color: var(--text-soft); margin-bottom: 16px; line-height: 1.5; }
.store-coin-amount {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--cyan);
}
.store-coin-amount .coin-icon { font-size: 1.5rem; }
.store-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 16px;
}

/* ── Blog Cards ──────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width:768px) { .blog-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:480px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}
.blog-card:hover { transform: translateY(-4px); border-color: var(--glass-border-hover); box-shadow: var(--shadow); }
.blog-card-img {
  width: 100%; height: 180px;
  background: var(--bg-soft);
  overflow: hidden;
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-body { padding: 20px; }
.blog-card-body h3 { font-size: .95rem; margin-bottom: 8px; line-height: 1.4; }
.blog-card-body p { font-size: .82rem; color: var(--text-soft); margin-bottom: 16px; line-height: 1.5; }
.blog-card-meta { font-size: .75rem; color: var(--muted); display: flex; gap: 12px; align-items: center; }

/* ── Tables (fancy, admin, leaderboard) ──────────────────────── */
.fancy-table, .admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
  text-align: right;
}
.fancy-table th, .admin-table th {
  padding: 12px 16px;
  color: var(--text-soft);
  font-weight: 600;
  font-size: .78rem;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
  letter-spacing: .04em;
}
.fancy-table td, .admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  vertical-align: middle;
}
.fancy-table tr:last-child td, .admin-table tr:last-child td { border-bottom: none; }
.fancy-table tr:hover td, .admin-table tr:hover td { background: var(--glass); }
.action-cell { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.table-wrap { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); overflow: hidden; }

/* ── Admin Layout ────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  min-height: calc(100vh - var(--header-h) - 96px);
  align-items: start;
}
@media (max-width:800px) { .admin-layout { grid-template-columns: 1fr; } }

.admin-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}
.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  text-align: right;
  font-family: inherit;
  text-decoration: none;
}
.admin-sidebar-link:hover { background: var(--glass-hover); color: var(--text); }
.admin-sidebar-link.active {
  background: rgba(99,102,241,.12);
  color: var(--primary);
  border: 1px solid rgba(99,102,241,.2);
}
.admin-sidebar-link .icon { font-size: 1rem; }

.admin-main { min-width: 0; }
.admin-tab { display: none; }
.admin-tab.active { display: block; }
.admin-tab h2 { margin-bottom: 24px; font-size: 1.3rem; }

.stat-boxes {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-bottom: 28px;
}
@media (max-width:768px) { .stat-boxes { grid-template-columns: repeat(2,1fr); } }
.stat-box {
  padding: 18px 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  text-align: center;
}
.stat-box .val { font-size: 1.6rem; font-weight: 900; }
.stat-box .lbl { font-size: .75rem; color: var(--text-soft); margin-top: 4px; }

/* Form row */
.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
}
.form-row input, .form-row select { flex: 1; min-width: 140px; }

/* ── Badges / Status ─────────────────────────────────────────── */
.badge-green { background: rgba(52,211,153,.12); color: var(--green); border: 1px solid rgba(52,211,153,.2); border-radius: 99px; padding: 3px 10px; font-size: .72rem; font-weight: 700; }
.badge-red   { background: rgba(248,113,113,.12); color: var(--red);   border: 1px solid rgba(248,113,113,.2); border-radius: 99px; padding: 3px 10px; font-size: .72rem; font-weight: 700; }
.badge-gold  { background: rgba(245,200,91,.12); color: var(--gold);   border: 1px solid rgba(245,200,91,.2); border-radius: 99px; padding: 3px 10px; font-size: .72rem; font-weight: 700; }
.badge-blue  { background: rgba(77,163,255,.12); color: var(--mc-blue); border: 1px solid rgba(77,163,255,.2); border-radius: 99px; padding: 3px 10px; font-size: .72rem; font-weight: 700; }

/* ── Upload zone ─────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: rgba(99,102,241,.4);
  background: rgba(99,102,241,.05);
}
.upload-zone p { color: var(--text-soft); font-size: .88rem; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeInScale { from{opacity:0;transform:scale(.96)} to{opacity:1;transform:scale(1)} }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.animate-fade {
  opacity: 0;
  animation: fadeIn .7s cubic-bezier(.4,0,.2,1) forwards;
}
.animate-fade:nth-child(1) { animation-delay: .05s; }
.animate-fade:nth-child(2) { animation-delay: .15s; }
.animate-fade:nth-child(3) { animation-delay: .25s; }
.animate-fade:nth-child(4) { animation-delay: .35s; }
.animate-fade:nth-child(5) { animation-delay: .45s; }

/* ── Misc ────────────────────────────────────────────────────── */
::selection { background: rgba(99,102,241,.3); color: var(--text); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.empty-state {
  padding: 48px 32px;
  text-align: center;
  color: var(--text-soft);
}

/* ── Announcement bar ─────────────────────────────────────────── */
.announcement-bar {
  background: linear-gradient(90deg, var(--primary-dim), var(--purple));
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 600;
  position: relative;
  z-index: 101;
}

/* ── Payment status pages ─────────────────────────────────────── */
.payment-result-card {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 40px;
  text-align: center;
  border-radius: var(--radius-xl);
}
.payment-result-icon { font-size: 4rem; margin-bottom: 20px; }
.payment-result-card h2 { margin-bottom: 12px; }
.payment-result-card p { color: var(--text-soft); margin-bottom: 24px; }
.ref-id { font-family: monospace; direction: ltr; font-size: 1rem; color: var(--cyan); background: rgba(34,211,238,.08); padding: 8px 16px; border-radius: var(--radius-sm); display: inline-block; margin-bottom: 20px; }

@media (max-width:480px) {
  :root { --header-h: 64px; }
  .container { padding: 0 16px; }
  .brand span { display: none; }
  .header-actions .btn-sm { padding: 6px 10px; }
  .hero { min-height: auto; }
  .hero-grid { padding: 56px 0 44px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { width: 100%; justify-content: space-between; padding: 16px 10px; }
  .hero-stat-item { padding: 0 10px; }
  .server-status-inner, .server-status-info { align-items: stretch; width: 100%; }
  .server-ip-badge, .server-players-badge { width: 100%; justify-content: center; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 34px; }
  .gallery-controls { flex-direction: column; align-items: stretch; gap: 12px; }
  .gallery-nav-btns { justify-content: center; }
  .odometer-digit-wrap { width: 1.55rem; height: 2.7rem; }
  .odometer-digit { font-size: 1.55rem; }
  .odometer-sep { font-size: 1.35rem; }
  .economy-total-wrap { flex-wrap: wrap; }
  .table-wrap { overflow-x: auto; }
  .admin-table, .fancy-table { min-width: 640px; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ── 2026 responsive gamer refresh ───────────────────────────── */
:root {
  --bg: #050806;
  --bg-soft: #0a100d;
  --bg-card: #101812;
  --bg-alt: #07100b;
  --primary: #46e07e;
  --primary-dim: #16a34a;
  --primary-glow: rgba(70,224,126,.28);
  --cyan: #45d6ff;
  --cyan-glow: rgba(69,214,255,.18);
  --green: #4ade80;
  --green-glow: rgba(74,222,128,.26);
  --purple: #60a5fa;
  --gold: #f6c453;
  --gold2: #ffe7a3;
  --gold-dim: #c98f1a;
  --gold-glow: rgba(246,196,83,.28);
  --text: #edf7ef;
  --text-soft: #a6b9ac;
  --muted: #65766a;
  --glass: rgba(255,255,255,.055);
  --glass-hover: rgba(255,255,255,.085);
  --glass-border: rgba(221,255,226,.10);
  --glass-border-hover: rgba(221,255,226,.20);
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(circle at 78% 8%, rgba(70,224,126,.10), transparent 30rem),
    radial-gradient(circle at 8% 18%, rgba(246,196,83,.09), transparent 28rem),
    linear-gradient(180deg, #050806 0%, #07100b 44%, #050806 100%);
  font-family: 'Vazirmatn', 'Shabnam', Tahoma, sans-serif;
}

body::before {
  background-image:
    linear-gradient(rgba(74,222,128,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246,196,83,.030) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}

body::after {
  right: auto;
  left: -18%;
  background:
    radial-gradient(ellipse, rgba(70,224,126,.09) 0%, transparent 64%),
    radial-gradient(ellipse, rgba(246,196,83,.07) 0%, transparent 70%);
}

img, svg, video, canvas {
  max-width: 100%;
}

button, input, textarea, select {
  font-family: inherit;
}

.container {
  width: min(100% - 32px, 1200px);
  padding-left: 0;
  padding-right: 0;
}

.item-icon,
.icon,
.trophy,
.copy-icon,
.coin-icon,
.dash-stat-icon,
.client-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: -.12em;
  flex: 0 0 auto;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

.btn,
.badge,
.nav-link,
.user-dropdown-item,
.admin-sidebar-link,
.badge-green,
.badge-red,
.badge-gold,
.badge-blue {
  line-height: 1.45;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .62;
  transform: none !important;
  box-shadow: none !important;
}

.site-header {
  background:
    linear-gradient(180deg, rgba(5,8,6,.94), rgba(5,8,6,.82)),
    rgba(5,8,6,.92);
  box-shadow: 0 12px 40px rgba(0,0,0,.24);
}

.header-inner,
.header-actions {
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav-link.active {
  background: rgba(70,224,126,.12);
  color: var(--green) !important;
  border-color: rgba(70,224,126,.22);
}

.brand-icon,
.card-icon,
.social-btn,
.gallery-nav-btn,
.lightbox-close {
  line-height: 1;
}

/* Client download section */
.client-download-section {
  padding-top: 104px;
  padding-bottom: 104px;
  overflow: hidden;
}

.download-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 36px;
  align-items: center;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid rgba(246,196,83,.18);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(246,196,83,.10), rgba(70,224,126,.07) 46%, rgba(69,214,255,.06)),
    rgba(255,255,255,.045);
  box-shadow: 0 28px 90px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.08);
  position: relative;
}

.download-shell::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(246,196,83,.22), transparent),
    radial-gradient(circle at 18% 18%, rgba(70,224,126,.16), transparent 26%);
  pointer-events: none;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  padding: 1px;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.download-intro {
  position: relative;
  z-index: 1;
}

.download-intro h2 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 4vw, 3rem);
}

.download-intro p {
  max-width: 680px;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 2;
  margin-bottom: 28px;
}

.download-toggle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.download-device {
  display: grid;
  place-items: center;
  min-height: 350px;
  position: relative;
}

.phone-frame {
  width: 210px;
  height: 336px;
  border-radius: 34px;
  padding: 12px;
  background: linear-gradient(145deg, #1f2a22, #050806);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 70px rgba(0,0,0,.45), 0 0 36px rgba(70,224,126,.18);
  transform: rotate(-5deg);
  animation: phoneFloat 5.5s ease-in-out infinite;
}

@keyframes phoneFloat {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50% { transform: rotate(-2deg) translateY(-12px); }
}

.phone-notch {
  width: 64px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  margin: 0 auto 10px;
}

.phone-screen {
  height: calc(100% - 16px);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(180deg, rgba(69,214,255,.26) 0 38%, transparent 38%),
    linear-gradient(180deg, #314a2f 38% 52%, #6b4b2a 52% 100%);
  image-rendering: pixelated;
}

.pixel-sun {
  position: absolute;
  top: 26px;
  left: 28px;
  width: 34px;
  height: 34px;
  background: var(--gold);
  box-shadow: 0 0 24px rgba(246,196,83,.5);
}

.pixel-block {
  position: absolute;
  width: 54px;
  height: 54px;
  right: 28px;
  bottom: 96px;
}

.pixel-block.grass {
  background: linear-gradient(#52b45e 0 34%, #7a4d2e 34%);
}

.pixel-block.dirt {
  right: 82px;
  bottom: 42px;
  background: #7a4d2e;
  box-shadow: inset 0 0 0 10px rgba(0,0,0,.07);
}

.phone-title,
.phone-ip {
  position: absolute;
  right: 18px;
  left: 18px;
  text-align: center;
  direction: ltr;
}

.phone-title {
  bottom: 58px;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}

.phone-ip {
  bottom: 34px;
  color: var(--gold2);
  font-size: .72rem;
  font-family: monospace;
}

.client-options {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.client-options.open {
  display: grid;
  animation: fadeIn .45s ease both;
}

.client-card {
  padding: 26px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035)),
    rgba(6,12,8,.72);
  box-shadow: 0 22px 70px rgba(0,0,0,.28);
  position: relative;
  overflow: visible;
}

.client-card::before {
  content: '';
  position: absolute;
  inset: -30% auto auto -18%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(246,196,83,.12);
  filter: blur(10px);
  pointer-events: none;
}

.client-card.clone::before {
  background: rgba(69,214,255,.12);
}

.client-card.original {
  border-color: rgba(246,196,83,.25);
}

.client-card.clone {
  border-color: rgba(69,214,255,.20);
}

.client-card.launcher {
  border-color: rgba(246,196,83,.35);
}

.client-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  position: relative;
}

.client-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 1.6rem;
  background: rgba(246,196,83,.12);
  border: 1px solid rgba(246,196,83,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.client-card.clone .client-icon {
  background: rgba(69,214,255,.12);
  border-color: rgba(69,214,255,.22);
}

.client-card.launcher .client-icon {
  background: linear-gradient(135deg, rgba(246,196,83,.18), rgba(245,158,11,.15));
  border-color: rgba(246,196,83,.35);
}

.client-kicker {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: .72rem;
  font-weight: 800;
}

.client-card.clone .client-kicker {
  color: var(--cyan);
}

.client-card.launcher .client-kicker {
  color: var(--gold);
  text-shadow: 0 0 8px rgba(246,196,83,.4);
}

.client-card h3 {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.client-card h3 small {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: .76rem;
  font-weight: 700;
}

.client-desc {
  color: var(--text-soft);
  line-height: 1.95;
  font-size: .92rem;
  margin-bottom: 18px;
}

.client-detail-list {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.client-detail-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text);
  font-size: .86rem;
  line-height: 1.7;
}

.client-detail-list li::before {
  content: '';
  width: 9px;
  height: 9px;
  margin-top: .62em;
  border-radius: 3px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--gold), var(--green));
  box-shadow: 0 0 12px rgba(246,196,83,.25);
}

.client-card.clone .client-detail-list li::before {
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.client-card.launcher .client-detail-list li::before {
  background: linear-gradient(135deg, var(--gold), #f59e0b);
  box-shadow: 0 0 12px rgba(246,196,83,.4);
}

.client-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: .78rem;
}

/* Dashboard refactor */
.dashboard-page-header {
  margin-bottom: 20px;
}

.dashboard-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(70,224,126,.18);
  background:
    radial-gradient(circle at 12% 18%, rgba(246,196,83,.11), transparent 28%),
    linear-gradient(135deg, rgba(70,224,126,.12), rgba(69,214,255,.045)),
    var(--glass);
  box-shadow: 0 22px 70px rgba(0,0,0,.26);
}

.panel-eyebrow {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--green);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dashboard-hero-panel h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.9rem);
  margin-bottom: 4px;
}

.dashboard-hero-panel p {
  color: var(--text-soft);
  font-size: .9rem;
}

.dashboard-ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(246,196,83,.22);
  border-radius: 16px;
  background: rgba(246,196,83,.08);
  color: var(--gold2);
  padding: 11px 14px;
  cursor: pointer;
  direction: ltr;
  font-family: monospace;
  transition: var(--transition);
}

.dashboard-ip-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 26px var(--gold-glow);
}

.dashboard-ip-chip b {
  direction: rtl;
  font-family: 'Vazirmatn', 'Shabnam', Tahoma, sans-serif;
  font-size: .72rem;
  color: #1a1200;
  background: var(--gold);
  border-radius: 999px;
  padding: 2px 8px;
}

.dashboard-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid rgba(248,113,113,.24);
  color: var(--red);
  background: rgba(248,113,113,.10);
}

.dashboard-live-pill.online {
  border-color: rgba(74,222,128,.24);
  color: var(--green);
  background: rgba(74,222,128,.10);
}

.dashboard-live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: livePulse 1.8s infinite;
}

.player-profile-card,
.skin-showcase,
.dash-stat-card {
  box-shadow: 0 22px 70px rgba(0,0,0,.22);
}

.dash-stat-card {
  min-width: 0;
}

.dash-stat-value {
  overflow-wrap: anywhere;
}

/* Admin download editor */
.download-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 18px;
}

.download-admin-card {
  padding: 22px;
  border-radius: var(--radius-xl);
}

.admin-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-card-title h3 {
  margin-bottom: 2px;
}

.admin-card-title p,
.field-hint,
.download-admin-actions p {
  color: var(--text-soft);
  font-size: .8rem;
}

.field-hint {
  display: block;
  margin-top: 8px;
}

.download-admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
}

#downloadsMsg {
  font-size: .86rem;
  font-weight: 800;
}

/* Responsive hardening */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-main,
.dashboard-layout > div,
.skin-showcase,
.download-shell,
.client-card {
  min-width: 0;
}

@media (max-width: 1050px) {
  .header-inner {
    gap: 12px;
  }

  .nav-link {
    padding-inline: 10px;
  }
}

@media (max-width: 920px) {
  .download-shell {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .download-intro p {
    margin-left: auto;
    margin-right: auto;
  }

  .download-toggle-actions {
    justify-content: center;
  }

  .download-device {
    min-height: 280px;
  }

  .client-options,
  .download-admin-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-ip-chip,
  .dashboard-live-pill {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 28px, 1200px);
  }

  .site-header {
    height: var(--header-h);
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .btn {
    padding: 7px 10px;
    font-size: .78rem;
  }

  .header-nav {
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .hero-title-main {
    font-size: clamp(2.15rem, 13vw, 3.4rem);
  }

  .hero-text,
  .download-intro p,
  .client-desc {
    font-size: .9rem;
  }

  .download-shell,
  .client-card,
  .dashboard-hero-panel,
  .download-admin-card {
    border-radius: 22px;
  }

  .phone-frame {
    width: 184px;
    height: 292px;
  }

  .download-toggle-actions .btn,
  .download-admin-actions .btn {
    width: 100%;
  }

  .download-admin-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .client-card-top {
    align-items: flex-start;
  }

  .client-meta-row {
    flex-direction: column;
  }

  .player-profile-card {
    position: relative;
    top: auto;
  }

  .dash-cards {
    gap: 12px;
  }

  .footer-server-chip {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 430px) {
  .container {
    width: min(100% - 22px, 1200px);
  }

  .brand-icon {
    width: 34px;
    height: 34px;
  }

  .header-actions a.btn-gold {
    display: none;
  }

  .header-actions .btn {
    padding-inline: 9px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-stat-divider {
    display: none;
  }

  .server-status-section,
  .client-download-section,
  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .download-shell,
  .client-card,
  .skin-showcase,
  .dashboard-hero-panel {
    padding: 18px;
  }

  .client-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .admin-table,
  .fancy-table {
    min-width: 620px;
  }
}

/* ═══════════════════════════════════════════════════════════
   ENHANCED MOBILE RESPONSIVENESS
 ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  /* Header fixes */
  .brand span {
    display: none;
  }
  
  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .header-actions .btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  
  .user-avatar-btn {
    width: 32px;
    height: 32px;
  }
  
  /* Hero section */
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 20px);
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 0;
  }
  
  .hero-visual {
    display: none;
  }
  
  .hero-title-main {
    font-size: 2rem;
  }
  
  .hero-text {
    font-size: 0.95rem;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .hero-stats {
    width: 100%;
    flex-wrap: wrap;
    padding: 16px 12px;
  }
  
  .hero-stat-item {
    padding: 0 12px;
    min-width: 80px;
  }
  
  .hero-stat-item strong {
    font-size: 1.2rem;
  }
  
  /* Server status */
  .server-status-inner {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .server-ip-badge,
  .server-players-badge {
    width: 100%;
    justify-content: center;
  }
  
  /* Download section */
  .download-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .download-device {
    display: none;
  }
  
  .download-toggle-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .download-toggle-actions .btn {
    width: 100%;
  }
  
  .client-options {
    grid-template-columns: 1fr;
  }
  
  .client-card {
    padding: 20px;
  }
  
  .client-icon {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
  
  /* Game modes */
  .game-modes-grid {
    grid-template-columns: 1fr;
  }
  
  /* Leaderboards */
  .leaderboards-grid {
    grid-template-columns: 1fr;
  }
  
  .leaderboard-table {
    font-size: 0.8rem;
  }
  
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 10px 8px;
  }
  
  .lb-avatar {
    width: 28px;
    height: 28px;
  }
  
  .lb-name {
    font-size: 0.8rem;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Gallery */
  .gallery-thumb {
    width: 240px;
    height: 160px;
  }
  
  .gallery-controls {
    flex-direction: column;
    gap: 12px;
  }
  
  /* Economy odometer */
  .odometer-digit-wrap {
    width: 1.8rem;
    height: 2.8rem;
  }
  
  .odometer-digit {
    font-size: 1.8rem;
  }
  
  /* Dashboard */
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  
  .player-profile-card {
    position: static;
  }
  
  .dashboard-hero-panel {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .dashboard-ip-chip {
    width: 100%;
  }
  
  .skin-showcase {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  
  .skin-stage {
    height: 300px;
    max-width: 100%;
  }
  
  .dash-cards {
    grid-template-columns: 1fr;
  }
  
  /* Store */
  .store-grid {
    grid-template-columns: 1fr;
  }
  
  /* Admin */
  .admin-layout {
    grid-template-columns: 1fr;
  }
  
  .admin-sidebar {
    position: static;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .admin-sidebar-link {
    display: inline-block;
    width: auto;
    padding: 10px 16px;
  }
  
  .download-admin-grid {
    grid-template-columns: 1fr;
  }
  
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .admin-table,
  .fancy-table {
    min-width: 600px;
  }
  
  /* Forms */
  .form-row {
    flex-direction: column;
  }
  
  .form-row .form-group {
    width: 100% !important;
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.6rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  .section {
    padding: 48px 0;
  }
  
  .section-head {
    margin-bottom: 28px;
  }
  
  .hero-title-main {
    font-size: 1.75rem;
  }
  
  .hero-stat-item {
    padding: 0 8px;
  }
  
  .client-card-top h3 {
    font-size: 1rem;
  }
  
  .client-detail-list {
    font-size: 0.8rem;
  }
  
  .leaderboard-header {
    padding: 16px;
  }
  
  .lb-avatar {
    width: 24px;
    height: 24px;
  }
  
  .gallery-thumb {
    width: 200px;
    height: 140px;
  }
  
  .odometer-digit-wrap {
    width: 1.5rem;
    height: 2.4rem;
  }
  
  .odometer-digit {
    font-size: 1.5rem;
  }
  
  .skin-stage {
    height: 260px;
  }
  
  .player-head-wrap {
    width: 72px;
    height: 72px;
  }
  
  .player-name {
    font-size: 1.1rem;
  }
  
  .dash-stat-value {
    font-size: 1.3rem;
  }
  
  .auth-card {
    padding: 28px 16px;
  }
  
  .btn {
    padding: 10px 18px;
    font-size: 0.85rem;
  }
  
  .btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* Landscape mobile fixes */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: auto;
  }
  
  .skin-stage {
    height: 240px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .container {
    padding: 0 12px;
  }
  
  .hero-title-main {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: 9px 14px;
    font-size: 0.8rem;
  }
  
  .client-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .odometer-digit-wrap {
    width: 1.3rem;
    height: 2.2rem;
  }
  
  .odometer-digit {
    font-size: 1.3rem;
  }
}

/* Additional mobile fixes for perfect responsiveness */
@media (max-width: 768px) {
  /* Prevent horizontal overflow */
  body {
    overflow-x: hidden;
    width: 100%;
  }
  
  /* Fix any wide elements */
  * {
    max-width: 100%;
  }
  
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Tables responsive */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Form inputs */
  input, textarea, select {
    max-width: 100%;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Cards and sections */
  .card, .section {
    margin: 12px 0;
  }
  
  /* Grid layouts to single column */
  .grid, .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  /* Flex wrapping */
  .flex {
    flex-wrap: wrap;
  }
  
  /* Navigation */
  nav {
    flex-direction: column;
  }
  
  /* Modal/lightbox full screen on mobile */
  .modal, .lightbox {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  
  /* Text sizing */
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.2rem;
  }
  
  p, li {
    font-size: 0.95rem;
  }
  
  /* Padding adjustments */
  .container {
    padding: 0 16px;
  }
  
  section {
    padding: 32px 0;
  }
  
  /* Button sizing */
  .btn {
    width: 100%;
    max-width: 100%;
  }
  
  .btn-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-group .btn {
    width: 100%;
  }
}

/* ── Player Search / Public Profiles / Garage ───────────────── */
.player-search-shell { margin-top: 22px; max-width: 540px; position: relative; z-index: 5; }
.player-search-card {
  position: relative;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(245,200,91,.13), rgba(77,163,255,.08)), rgba(255,255,255,.045);
  border: 1px solid rgba(245,200,91,.22);
  box-shadow: 0 18px 60px rgba(0,0,0,.32);
  overflow: visible;
}
.player-search-card label {
  display: block;
  margin: 0 4px 8px;
  font-size: .75rem;
  font-weight: 900;
  color: var(--gold2);
}
.search-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 20% 0%, rgba(245,200,91,.26), transparent 35%);
  pointer-events: none;
}
.player-search-input-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  background: rgba(4,7,18,.72);
  border: 1px solid rgba(255,255,255,.09);
  padding: 4px 12px 4px 6px;
}
.player-search-input-row input {
  width: 100%;
  height: 44px;
  background: transparent;
  border: 0;
  color: var(--text);
  outline: 0;
  font-family: inherit;
}
.player-search-input-row span { color: var(--gold); font-size: 1.1rem; }
.player-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  padding: 8px;
  border-radius: 18px;
  background: rgba(8,11,27,.96);
  border: 1px solid rgba(245,200,91,.2);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}
.player-search-results.open { display: grid; gap: 6px; }
.player-search-result {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 13px;
  color: var(--text);
}
.player-search-result:hover { background: rgba(245,200,91,.09); color: var(--gold2); }
.player-search-result img,
.friend-mini-card img,
.dashboard-friend-row img {
  image-rendering: pixelated;
}
.player-search-result img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}
.player-search-result span { font-weight: 900; direction: ltr; text-align: right; }
.player-search-result small, .search-state { color: var(--text-soft); font-size: .78rem; }
.search-state { padding: 12px; text-align: center; }
.lb-player-link { color: inherit; text-decoration: none; border-radius: 12px; }
.lb-player-link:hover .lb-name { color: var(--gold2); }

.public-profile-page .container { max-width: 1180px; }
.profile-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 24px;
  margin-bottom: 22px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 10% 10%, rgba(245,200,91,.18), transparent 28%),
    linear-gradient(135deg, rgba(77,163,255,.08), rgba(52,211,153,.05));
}
.profile-identity { display: flex; align-items: center; gap: 16px; }
.profile-head-3d {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  padding: 6px;
  background: linear-gradient(135deg, var(--gold), var(--mc-blue));
  box-shadow: 0 0 30px rgba(245,200,91,.22);
}
.profile-head-3d img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  image-rendering: pixelated;
  background: #111827;
}
.online-ring {
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border: 3px solid #080815;
  border-radius: 50%;
}
.online-ring.online { background: var(--green); box-shadow: 0 0 16px var(--green); }
.online-ring.offline { background: var(--red); }
.profile-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.profile-quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(95px, 1fr));
  gap: 10px;
}
.profile-quick-stats div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--glass-border);
  text-align: center;
}
.profile-quick-stats strong { display: block; color: var(--gold2); font-size: 1.05rem; }
.profile-quick-stats span { color: var(--text-soft); font-size: .74rem; }
.public-profile-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 22px;
  margin-bottom: 22px;
}
.profile-skin-panel { margin-bottom: 0; }
.profile-data-panel {
  padding: 24px;
  border-radius: var(--radius-xl);
}
.profile-data-panel h3 { margin-bottom: 16px; }
.profile-info-list { display: grid; gap: 10px; }
.profile-info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
}
.profile-info-list span { color: var(--text-soft); font-size: .78rem; }
.profile-info-list strong { color: var(--text); font-size: .86rem; text-align: left; direction: ltr; }
.profile-lower-grid, .dashboard-modules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.profile-section-card, .dashboard-module-card {
  padding: 22px;
  border-radius: var(--radius-xl);
}
.section-head.inline, .module-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head.inline h2, .module-card-head h3 { margin: 0; }
.section-head.inline > strong {
  min-width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(245,200,91,.11);
  border: 1px solid rgba(245,200,91,.22);
  color: var(--gold);
  font-size: 1.25rem;
}
.profile-car-list { display: grid; gap: 10px; }
.profile-car-row {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 180px);
  gap: 14px;
  align-items: center;
  padding: 13px;
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
}
.profile-car-row strong { display: block; }
.profile-car-row span { color: var(--text-soft); font-size: .77rem; }
.damage-meter {
  position: relative;
  height: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.damage-meter i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--green), var(--yellow), var(--red));
}
.damage-meter b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .74rem;
}
.friend-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 10px; }
.friend-mini-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 16px;
  color: var(--text);
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
}
.friend-mini-card:hover { color: var(--gold2); transform: translateY(-2px); }
.friend-mini-card img { width: 48px; height: 48px; border-radius: 12px; }
.friend-mini-card i, .dashboard-friend-row i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px rgba(248,113,113,.35);
}
.friend-mini-card i { position: absolute; top: 12px; left: 12px; }
.friend-mini-card i.online, .dashboard-friend-row i.online { background: var(--green); box-shadow: 0 0 14px var(--green-glow); }
.empty-state.compact {
  padding: 18px;
  text-align: center;
  color: var(--text-soft);
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 16px;
}

.dash-stat-card.clickable-card {
  width: 100%;
  color: inherit;
  text-align: right;
  font-family: inherit;
  cursor: pointer;
}
.dash-stat-card.cars .dash-stat-value { color: var(--mc-blue); }
.dash-stat-card.join-date .dash-stat-value.small { font-size: .98rem; color: var(--gold2); direction: ltr; text-align: right; }
.dashboard-module-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245,200,91,.08), rgba(77,163,255,.045)), var(--glass);
}
.module-card-head .btn,
.car-controls .btn,
.garage-modal .btn { width: auto; }
.dashboard-module-card::after {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  left: -70px;
  bottom: -90px;
  background: radial-gradient(circle, rgba(245,200,91,.16), transparent 66%);
  pointer-events: none;
}
.module-big-number {
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  line-height: 1;
  font-weight: 950;
  color: var(--gold2);
}
.dashboard-module-card p { color: var(--text-soft); font-size: .85rem; margin: 8px 0 16px; }
.module-preview-list, .dashboard-friends-list { display: grid; gap: 8px; }
.module-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.035);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.module-preview-row:hover { border-color: rgba(245,200,91,.24); background: rgba(245,200,91,.07); }
.module-preview-row b { color: var(--red); font-size: .75rem; direction: ltr; }
.friend-count-pill {
  padding: 7px 12px;
  border-radius: 99px;
  color: var(--green);
  background: rgba(52,211,153,.10);
  border: 1px solid rgba(52,211,153,.20);
  font-size: .76rem;
  font-weight: 900;
}
.dashboard-friend-row {
  display: grid;
  grid-template-columns: 44px 1fr 10px;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
}
.dashboard-friend-row:hover { color: var(--gold2); background: rgba(245,200,91,.055); }
.dashboard-friend-row img { width: 44px; height: 44px; border-radius: 12px; }
.dashboard-friend-row strong { display: block; direction: ltr; text-align: right; }
.dashboard-friend-row span { display: block; color: var(--text-soft); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

body.modal-open { overflow: hidden; }
.garage-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  padding: 18px;
}
.garage-modal.open { display: grid; place-items: center; }
.garage-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(245,200,91,.16), transparent 34%),
    rgba(0,0,0,.78);
  backdrop-filter: blur(14px);
}
.garage-modal-panel {
  position: relative;
  width: min(1180px, 100%);
  max-height: min(88vh, 840px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(12,18,33,.98), rgba(6,8,18,.98));
  border: 1px solid rgba(245,200,91,.22);
  box-shadow: 0 28px 90px rgba(0,0,0,.62);
}
.garage-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.garage-modal-head h2 { margin: 0; }
.modal-x {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}
.modal-x:hover { border-color: rgba(248,113,113,.35); color: var(--red); }
.garage-modal-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  overflow: hidden;
}
.garage-list-panel {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  border-left: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
}
.garage-total {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(245,200,91,.15), rgba(77,163,255,.08));
  border: 1px solid rgba(245,200,91,.18);
}
.garage-total strong { color: var(--gold2); font-size: 2rem; line-height: 1; }
.garage-total span { color: var(--text-soft); font-size: .8rem; }
.garage-list { display: grid; gap: 9px; }
.garage-list-item {
  width: 100%;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 15px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  text-align: right;
  font-family: inherit;
  cursor: pointer;
}
.garage-list-item:hover, .garage-list-item.active {
  background: rgba(245,200,91,.09);
  border-color: rgba(245,200,91,.28);
}
.garage-list-item span { display: block; font-weight: 900; }
.garage-list-item small { display: block; margin-top: 4px; color: var(--text-soft); direction: ltr; text-align: right; }
.garage-viewer-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}
.car-viewer-stage {
  position: relative;
  height: min(48vh, 520px);
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 55%, rgba(245,200,91,.18), transparent 28%),
    linear-gradient(180deg, rgba(77,163,255,.10), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.09);
}
.car-viewer-stage::after {
  content: '';
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 11%;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.45), transparent 70%);
  pointer-events: none;
}
#carViewerCanvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.car-viewer-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-weight: 900;
  pointer-events: none;
}
.car-viewer-empty.hidden { display: none; }
.car-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}
.car-controls label {
  display: grid;
  gap: 5px;
  color: var(--text-soft);
  font-size: .72rem;
  font-weight: 900;
  direction: ltr;
}
.car-controls input { accent-color: var(--gold); }
.car-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.car-telemetry-grid div {
  padding: 13px;
  border-radius: 15px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.car-telemetry-grid span { display: block; color: var(--text-soft); font-size: .72rem; margin-bottom: 3px; }
.car-telemetry-grid strong { display: block; color: var(--gold2); direction: ltr; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 920px) {
  .public-profile-grid,
  .profile-lower-grid,
  .dashboard-modules-grid,
  .garage-modal-grid {
    grid-template-columns: 1fr;
  }
  .profile-hero { align-items: stretch; flex-direction: column; }
  .garage-list-panel {
    border-left: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    max-height: 250px;
  }
  .garage-modal-panel { max-height: 94vh; border-radius: 22px; }
  .car-controls { grid-template-columns: 1fr; }
  .car-telemetry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .player-search-result { grid-template-columns: 38px 1fr; }
  .player-search-result small { display: none; }
  .profile-identity { align-items: flex-start; }
  .profile-head-3d { width: 76px; height: 76px; border-radius: 18px; }
  .profile-quick-stats { grid-template-columns: 1fr; }
  .profile-car-row { grid-template-columns: 1fr; }
  .friend-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .garage-modal { padding: 8px; }
  .garage-modal-head { padding: 14px; }
  .garage-viewer-panel, .garage-list-panel { padding: 12px; }
  .car-viewer-stage { min-height: 260px; height: 38vh; border-radius: 18px; }
  .car-telemetry-grid { grid-template-columns: 1fr; }
}
