/* ============================================================================
   Loadout Reloaded — Web Frontend Styles
   Dark theme with orange/red explosive accents
   ============================================================================ */

:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #12121f;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --bg-input: #16162a;
  --border: #2a2a45;
  --border-focus: #ff4500;

  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #555577;

  --accent: #ff4500;
  --accent-hover: #ff6a33;
  --accent-glow: rgba(255, 69, 0, 0.3);
  --accent-red: #e63946;
  --accent-green: #2ecc71;
  --accent-gold: #ffd700;

  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;

  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

/* ── Noise overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ============================================================================
   Navigation
   ============================================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 18, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 1px 4px rgba(255, 69, 0, 0.3));
}

.nav-brand-text {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-support {
  color: var(--accent) !important;
  font-weight: 700 !important;
  border: 1px solid rgba(255, 69, 0, 0.4);
  background: rgba(255, 69, 0, 0.08) !important;
}

.nav-support:hover {
  background: rgba(255, 69, 0, 0.18) !important;
  border-color: var(--accent);
}

.nav-user {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.nav-user strong {
  color: var(--accent);
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-red));
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.9rem 2.5rem;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}

/* Background image layer — anchored to top so character is always visible */
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../img/hero-bg.jpg') center top / cover no-repeat;
  z-index: 0;
}

/* Dark overlay — strong at bottom to hide the baked-in logo text from the art */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(10, 10, 18, 0.25) 0%,
      rgba(10, 10, 18, 0.4) 35%,
      rgba(10, 10, 18, 0.75) 55%,
      rgba(10, 10, 18, 0.95) 80%,
      rgba(10, 10, 18, 1) 100%);
  z-index: 1;
}

/* Logo image */
.hero-logo {
  max-width: 420px;
  width: 80%;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 30px rgba(255, 69, 0, 0.4));
}

/* Text fallback when logo image is missing */
.hero-logo-fallback {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #ff6a33 0%, #e63946 50%, #b02a37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 4px 30px rgba(255, 69, 0, 0.5));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-red), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin-top: 4rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.hero-stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================================
   Server status badge
   ============================================================================ */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-badge.online {
  background: rgba(46, 204, 113, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-badge.offline {
  background: rgba(230, 57, 70, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(230, 57, 70, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-badge.online .status-dot { background: var(--accent-green); }
.status-badge.offline .status-dot { background: var(--accent-red); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================================
   Sections
   ============================================================================ */

.section {
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================================================
   Feature cards
   ============================================================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(255, 69, 0, 0.1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent-red));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================================================
   How to play steps
   ============================================================================ */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-red));
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 auto 1.25rem;
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ============================================================================
   Leaderboard table
   ============================================================================ */

.leaderboard-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
}

.leaderboard-tab {
  padding: 0.75rem 1.5rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.leaderboard-tab:hover { color: var(--text-primary); }
.leaderboard-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(42, 42, 69, 0.5);
  font-size: 0.95rem;
}

tr:hover td { background: var(--bg-card-hover); }

.rank-cell {
  font-weight: 800;
  color: var(--text-muted);
  width: 60px;
}

.rank-cell.top-1 { color: var(--accent-gold); }
.rank-cell.top-2 { color: #c0c0c0; }
.rank-cell.top-3 { color: #cd7f32; }

.player-name {
  font-weight: 600;
  color: var(--text-primary);
}

.player-name a { color: inherit; }
.player-name a:hover { color: var(--accent); }

.stat-positive { color: var(--accent-green); }
.stat-highlight { color: var(--accent); font-weight: 700; }

/* ============================================================================
   Profile page
   ============================================================================ */

.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-red));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.profile-info h1 {
  font-size: 1.75rem;
  font-weight: 800;
}

.profile-info .player-id {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.profile-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* ============================================================================
   Auth forms
   ============================================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.auth-tabs {
  display: flex;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: var(--bg-input);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.auth-tab.active {
  background: var(--accent);
  color: white;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-main);
  transition: border-color var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-error {
  color: var(--accent-red);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

.form-error.visible { display: block; }

.form-success {
  color: var(--accent-green);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
  text-align: center;
}

.form-success.visible { display: block; }

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Player ID display after registration */
.player-id-display {
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  margin: 1.5rem 0;
  display: none;
}

.player-id-display.visible { display: block; }

.player-id-display .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.player-id-display .id-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  margin: 0.5rem 0;
}

.player-id-display .hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================================
   Pagination
   ============================================================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.pagination button {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.pagination button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--text-primary);
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination .page-info {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0 0.5rem;
}

/* ============================================================================
   Search bar
   ============================================================================ */

.search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  max-width: 400px;
}

.search-bar input {
  flex: 1;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-main);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ============================================================================
   Screenshot Gallery
   ============================================================================ */

.gallery-section {
  background: var(--bg-primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(1.15);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 18, 0.7) 0%, transparent 50%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
  opacity: 0.5;
}

.gallery-caption {
  position: absolute;
  bottom: 0.6rem;
  left: 0.75rem;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

.gallery-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-featured .gallery-caption {
  font-size: 0.95rem;
  bottom: 1rem;
  left: 1.25rem;
}

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-featured { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-featured { grid-column: span 1; }
}

/* ============================================================================
   Lightbox
   ============================================================================ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 1;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 1.75rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lightbox-nav:hover {
  background: rgba(255, 69, 0, 0.3);
  border-color: var(--accent);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-caption {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================================
   Support Banner (high visibility CTA)
   ============================================================================ */

.support-banner {
  position: relative;
  padding: 3.5rem 2rem;
  background: var(--bg-primary);
  overflow: hidden;
}

.support-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 69, 0, 0.08) 0%, transparent 50%),
    linear-gradient(225deg, rgba(230, 57, 70, 0.08) 0%, transparent 50%);
}

.support-banner-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 3rem;
  background: linear-gradient(135deg, rgba(255, 69, 0, 0.06), rgba(230, 57, 70, 0.06));
  border: 1px solid rgba(255, 69, 0, 0.2);
  border-radius: var(--radius-lg);
}

.support-banner-text h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.support-banner-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 500px;
}

.support-banner .btn-donate {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .support-banner-inner {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  .support-banner-text p { max-width: 100%; }
}

/* ============================================================================
   Community & Donations
   ============================================================================ */

.community-section {
  background: var(--bg-primary);
  padding-bottom: 4rem;
}

.community-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.community-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-red), var(--accent));
}

.community-badge {
  display: inline-block;
  background: rgba(255, 69, 0, 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 69, 0, 0.25);
}

.community-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-top: 1rem;
}

.community-text strong {
  color: var(--text-primary);
}

.community-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 2.5rem 0;
}

.community-subtitle {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.donate-buttons {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  gap: 1rem;
}

.btn-donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 2.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-red));
  box-shadow: 0 4px 20px rgba(255, 69, 0, 0.35);
  transition: all 0.25s ease;
}

.btn-donate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255, 69, 0, 0.5);
  color: white;
}

.donate-icon {
  font-size: 1.2rem;
}

.community-transparency {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.transparency-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.transparency-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.transparency-item strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.transparency-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  .community-card { padding: 2rem 1.5rem; }
  .community-transparency { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ============================================================================
   Footer
   ============================================================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--accent); }

/* ============================================================================
   Loading spinner
   ============================================================================ */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--text-muted);
  gap: 0.75rem;
}

/* ============================================================================
   Toast notifications
   ============================================================================ */

.toast-container {
  position: fixed;
  top: 80px;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  max-width: 350px;
}

.toast.success { background: rgba(46, 204, 113, 0.15); color: var(--accent-green); border: 1px solid rgba(46, 204, 113, 0.3); }
.toast.error { background: rgba(230, 57, 70, 0.15); color: var(--accent-red); border: 1px solid rgba(230, 57, 70, 0.3); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 768px) {
  .nav { padding: 0 1rem; }
  .nav-links { display: none; }

  .hero { padding: 5rem 1.5rem 3rem; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }

  .hero-stats { gap: 1.5rem; }
  .hero-stat .value { font-size: 1.5rem; }

  .section { padding: 3rem 1.5rem; }
  .section-title { font-size: 1.5rem; }

  .profile-header { flex-direction: column; text-align: center; }

  .auth-card { padding: 1.5rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .nav-hamburger { display: block; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .donate-tiers { grid-template-columns: 1fr; }
}

/* ============================================================================
   Season banner
   ============================================================================ */

.season-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-card) 0%, #1a1a3a 100%);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.season-banner-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}

.season-banner-timer {
  color: var(--text-secondary);
  margin-left: 1rem;
}

.season-banner-rewards {
  color: var(--accent-gold);
  font-size: 0.9rem;
}

/* Leaderboard mode tabs (All-Time / Season) */

.leaderboard-mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.leaderboard-mode-tab {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.leaderboard-mode-tab:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.leaderboard-mode-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================================================
   Donate page
   ============================================================================ */

.donate-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.donate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all var(--transition);
}

.donate-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.donate-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.05);
}

.donate-card.featured:hover {
  transform: scale(1.05) translateY(-2px);
}

.donate-card-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  background: var(--accent);
  color: #fff;
}

.donate-card-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.donate-card-reward {
  font-size: 1.1rem;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 1rem;
}

.donate-card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.donate-btn {
  width: 100%;
}

/* Budget section */

.donate-budget {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 1.5rem auto 0;
}

.donate-budget-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.donate-budget-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.donate-budget-item h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.donate-budget-item p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Recent supporters */

.donate-recent {
  max-width: 600px;
  margin: 1rem auto 0;
}

.donate-supporter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.donate-tier-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tier-supporter { background: #2ecc71; color: #fff; }
.tier-hero { background: #3498db; color: #fff; }
.tier-legend { background: var(--accent-gold); color: #000; }

@media (max-width: 768px) {
  .donate-tiers { grid-template-columns: 1fr; }
  .donate-card.featured { transform: none; }
  .donate-card.featured:hover { transform: translateY(-2px); }
  .donate-budget { grid-template-columns: 1fr; }
  .season-banner { flex-direction: column; text-align: center; }
}

/* ============================================================================
   Admin Panel
   ============================================================================ */

.btn-admin {
  background: rgba(255, 215, 0, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 215, 0, 0.4);
  font-size: 0.75rem;
  padding: 0.35rem 0.8rem;
}

.btn-admin:hover {
  background: rgba(255, 215, 0, 0.25);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 4px;
  overflow-x: auto;
}

.admin-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
}

.admin-tab:hover { color: var(--text-primary); background: var(--bg-card); }
.admin-tab.active { background: var(--accent); color: white; }

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.admin-form .admin-form-row {
  margin-bottom: 1rem;
}

.admin-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-form input,
.admin-form select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-main);
}

.admin-form input:focus,
.admin-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.admin-stat {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-align: center;
}

.admin-stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.admin-stat-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.admin-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.admin-badge-active { background: rgba(46, 204, 113, 0.2); color: var(--accent-green); }
.admin-badge-ended { background: rgba(136, 136, 170, 0.2); color: var(--text-secondary); }

@media (max-width: 768px) {
  .admin-tabs { flex-wrap: wrap; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
