@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  color-scheme: dark;
  /* Slate Gray & Royal Foxes Orange Theme */
  --bg-primary: #121316;
  --bg-secondary: #181a20;
  --bg-card: rgba(25, 27, 34, 0.90);
  --bg-card-hover: rgba(34, 37, 46, 0.96);
  --bg-glass: rgba(255, 255, 255, 0.035);
  --bg-input: #1a1c23;
  
  /* Royal Foxes Orange (#ef3314) */
  --accent: #ef3314;
  --accent-light: #ff5233;
  --accent-dark: #c9250b;
  --accent-glow: rgba(239, 51, 20, 0.2);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --border: rgba(255, 255, 255, 0.09);
  --border-accent: rgba(239, 51, 20, 0.4);
  
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f97316;
  --info: #38bdf8;
  
  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 35px rgba(239, 51, 20, 0.14);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  color-scheme: dark;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: rgba(18, 19, 22, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(239, 51, 20, 0.35);
  border-radius: 10px;
  transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(239, 51, 20, 0.6);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(239, 51, 20, 0.35) rgba(18, 19, 22, 0.6);
}

/* Atmospheric Slate Gray & Orange Glow Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(239, 51, 20, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 90% 85%, rgba(255, 82, 51, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 90%, rgba(24, 26, 32, 0.9) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-light);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============================================
   SVG ICON SIZES
   ============================================ */
.icon-sm {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-md {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.icon-lg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tier-icon {
  width: 14px;
  height: 14px;
  display: inline;
  vertical-align: middle;
}

.tier-icon-lg {
  width: 20px;
  height: 20px;
  display: inline;
  vertical-align: middle;
}

.tier-display {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.empty-icon-svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.5;
  display: block;
  color: var(--text-muted);
}

.upload-icon-svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  display: block;
  color: var(--text-muted);
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.navbar {
  background: rgba(18, 19, 22, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.navbar-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(239, 51, 20, 0.4));
  transition: transform 0.2s ease;
}

.navbar-brand:hover .navbar-logo {
  transform: scale(1.05);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-slogan {
  font-size: 0.64rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  white-space: nowrap;
  opacity: 0.85;
  margin-top: 1px;
}

@media (max-width: 768px) {
  .brand-slogan {
    display: none;
  }
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: var(--border-accent);
}

/* ============================================
   HERO / SEASON INFO (Compact & Sleek)
   ============================================ */
.hero {
  padding: 14px 0 10px;
}

.hero-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.page-main-heading {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 2px;
  line-height: 1.2;
  color: var(--text-primary);
}

.hero .subtitle {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-bottom: 0;
  line-height: 1.2;
}

.season-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.season-badge .countdown {
  color: var(--text-secondary);
  font-weight: 400;
}

/* ============================================
   SCORING SUMMARY BAR (Compact)
   ============================================ */
.scoring-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 6px 0 12px;
  flex-wrap: wrap;
}

.scoring-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
}

.scoring-chip .chip-value {
  color: var(--accent);
  font-weight: 700;
}

.wide-container {
  max-width: 1480px;
  width: 96%;
  margin: 0 auto;
  padding: 0 12px;
}

/* ============================================
   LEADERBOARD (Clean Esports Horizontal Rows)
   ============================================ */
.leaderboard-clean-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 30px;
}

.lb-row {
  display: grid;
  grid-template-columns: 46px 1fr 140px 140px 1px 95px;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  animation: rowSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--delay, 0s);
}

@keyframes rowSlideIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.lb-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 18px rgba(239, 51, 20, 0.15);
}

/* Rank 1 special styling (Pulsing Glow & Gold Accent) */
.lb-row.rank-1 {
  border-color: rgba(239, 51, 20, 0.55);
  background: linear-gradient(90deg, rgba(239, 51, 20, 0.16) 0%, rgba(25, 27, 36, 0.95) 100%);
  box-shadow: 0 4px 26px rgba(239, 51, 20, 0.22), inset 0 0 15px rgba(239, 51, 20, 0.06);
  position: relative;
}

.lb-row.rank-1::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #ff8c00, var(--accent));
  border-radius: 12px 0 0 12px;
}

.lb-row.rank-1:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(239, 51, 20, 0.35), inset 0 0 20px rgba(239, 51, 20, 0.1);
}

.leader-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.2), rgba(239, 51, 20, 0.2));
  border: 1px solid rgba(255, 140, 0, 0.5);
  color: #ffaa33;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Rank Number Badge */
.lb-cell-rank {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-badge-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.92rem;
  background: #1e2029;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: monospace;
}

.rank-badge-num.rank-gold {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(239, 51, 20, 0.55);
}

/* Player Identity Cell */
.lb-cell-player {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.lb-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  object-fit: cover;
  background: #000;
  flex-shrink: 0;
}

.lb-player-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.lb-player-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.2;
}

.badge.lvl {
  background: var(--accent);
  color: #fff;
}

.rank-pos-badge {
  background: rgba(239, 51, 20, 0.14);
  border: 1px solid rgba(239, 51, 20, 0.45);
  color: #ff6242;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(239, 51, 20, 0.2);
}

.badge.elo {
  background: #1c1e27;
  border: 1px solid var(--border);
  color: #cbd5e1;
}

.kd-badge {
  background: #161821;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.kd-badge.stat-good {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
}

.kd-badge.stat-mid {
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.4);
  background: rgba(234, 179, 8, 0.08);
}

.kd-badge.stat-bad {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

/* Challenge Columns (Prominent & Large) */
.lb-cell-challenge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1px;
}

.lb-ch-tag {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.lb-ch-points {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.1;
}

.lb-ch-p-unit {
  font-size: 0.85rem;
  font-weight: 700;
  margin-left: 1px;
  opacity: 0.85;
}

.lb-ch-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Vertical Divider */
.lb-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Total Points Cell */
.lb-cell-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.lb-total-pts {
  font-size: 1.65rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 40%, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  line-height: 1;
}

.lb-total-lbl {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Win Rate Bar (from ornek tracker) */
.winbar-wrap {
  margin-bottom: 14px;
}

.winbar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.wb-pct {
  font-size: 0.84rem;
  font-weight: 900;
  font-family: monospace;
}

.winbar {
  position: relative;
  height: 22px;
  background: rgba(239, 68, 68, 0.16);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.winbar-fill {
  height: 100%;
  background: linear-gradient(90deg, #15803d, #22c55e);
  border-radius: var(--radius-sm);
  transition: width 0.5s ease;
}

.winbar-numbers {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 900;
  font-family: monospace;
}

.wn-w, .wn-l {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* Responsive adjustments */
@media (max-width: 850px) {
  .lb-row {
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
    padding: 10px 14px;
  }
  .lb-cell-challenge, .lb-divider {
    display: none;
  }
}

/* Points bar */
.points-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 140px;
}

.points-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-glass);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

.points-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.points-bar-fill.faceit {
  background: linear-gradient(90deg, var(--info), #60a5fa);
}

.points-bar-fill.dm {
  background: linear-gradient(90deg, var(--success), #4ade80);
}

/* ============================================
   CARDS / PANELS
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-glass);
  color: var(--text-primary);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(239, 51, 20, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 6px 20px rgba(239, 51, 20, 0.4);
  color: #ffffff;
}

.btn-success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.btn-success:hover {
  background: rgba(34, 197, 94, 0.25);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  color-scheme: dark;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 4px 16px rgba(0, 0, 0, 0.2);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

/* ============================================
   CUSTOM SELECT DROPDOWN COMPONENT
   ============================================ */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  user-select: none;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-trigger:hover,
.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.custom-select-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-select-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  object-fit: cover;
}

.custom-select-name {
  font-weight: 600;
  color: var(--text-primary);
}

.custom-select-placeholder {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.custom-select-arrow {
  width: 18px;
  height: 18px;
  color: var(--accent);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.custom-select-wrapper.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #181a22;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(239, 51, 20, 0.15);
  z-index: 200;
  display: none;
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(20px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.custom-select-dropdown::-webkit-scrollbar {
  width: 4px;
}

.custom-select-dropdown::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.custom-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.custom-select-wrapper.open .custom-select-dropdown {
  display: block;
  animation: dropdownSlide 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.custom-select-item:hover {
  background: rgba(239, 51, 20, 0.12);
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}

.custom-select-item.selected {
  background: rgba(239, 51, 20, 0.18);
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}

.custom-select-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-select-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.custom-select-level-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  flex-shrink: 0;
}

/* ============================================
   CUSTOM DATEPICKER CALENDAR COMPONENT
   ============================================ */
.custom-datepicker-wrapper {
  position: relative;
  width: 100%;
  z-index: 10;
}

.custom-datepicker-wrapper:has(.custom-calendar-popup.open) {
  z-index: 99999;
}

#tab-season .card:first-of-type {
  position: relative;
  z-index: 50;
}

.date-input-modern {
  cursor: pointer;
  color-scheme: dark;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
}

.date-input-modern::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(35%) sepia(85%) saturate(3000%) hue-rotate(345deg) brightness(98%) contrast(95%);
  opacity: 0.9;
  transition: transform 0.2s ease, opacity 0.2s ease;
  padding: 4px;
}

.date-input-modern::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.2);
  opacity: 1;
}

.custom-datepicker-input {
  cursor: pointer;
  padding-right: 42px;
}

.datepicker-calendar-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--accent);
  pointer-events: none;
}

.custom-calendar-popup {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 295px;
  background: #14161f;
  border: 1px solid rgba(239, 51, 20, 0.45);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(239, 51, 20, 0.25);
  z-index: 99999;
  display: none;
  backdrop-filter: blur(24px);
}

.custom-calendar-popup.open {
  display: block;
  animation: dropdownSlide 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.calendar-month-year {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.calendar-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1e2029;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.calendar-nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 6px;
}

.calendar-weekday {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 4px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
  border: 1px solid transparent;
}

.calendar-day:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--border);
}

.calendar-day.other-month {
  color: #4b5563;
  opacity: 0.5;
}

.calendar-day.today {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.calendar-day.selected {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(239, 51, 20, 0.4);
}

.calendar-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.calendar-footer button {
  padding: 4px 10px;
  font-size: 0.75rem;
}

/* ============================================
   SCREENSHOT UPLOAD
   ============================================ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  background: rgba(255, 255, 255, 0.015);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.08);
}

.upload-zone.has-file {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.05);
}

.upload-zone .upload-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.upload-zone .upload-text {
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 500;
}

.upload-zone .upload-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 8px;
}

.upload-preview {
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--radius-md);
  margin-top: 16px;
  display: none;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.upload-preview.visible {
  display: inline-block;
}

/* ============================================
   SUBMISSION CARDS (Admin)
   ============================================ */
.submission-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.submission-card.pending {
  border-left: 3px solid var(--warning);
}

.submission-card.approved {
  border-left: 3px solid var(--success);
}

.submission-card.rejected {
  border-left: 3px solid var(--danger);
  opacity: 0.6;
}

.submission-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.submission-player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.submission-player img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.submission-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}

.submission-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.submission-stat .stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.submission-stat .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.submission-screenshot {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s;
  background: var(--bg-glass);
}

.submission-screenshot:hover {
  transform: scale(1.02);
}

.submission-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-approved {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-count {
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--danger);
  color: white;
}

/* ============================================
   TABS
   ============================================ */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.tab.active {
  color: #000;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
  font-weight: 700;
}

.tab.active .badge-count {
  background: #000;
  color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* Filter buttons */
.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.filter-btn.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

/* ============================================
   LOGIN FORM
   ============================================ */
.login-container {
  max-width: 400px;
  margin: 80px auto;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}

.login-card h2 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.login-card .login-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 32px;
}

/* ============================================
   ALERTS / TOAST
   ============================================ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(20px);
  animation: slideInRight 0.3s ease-out, fadeOut 0.3s ease-in 3s forwards;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
}

.toast-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.toast-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.toast-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--info);
}

/* ============================================
   LIGHTBOX (Screenshot full view)
   ============================================ */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
}

.loading-overlay.active {
  display: flex;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--accent-glow); }
  50% { box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(245, 158, 11, 0.05); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .player-card {
    grid-template-columns: 36px 1fr;
    gap: 12px;
    padding: 16px;
  }

  .player-scores {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
  }

  .score-breakdown {
    gap: 10px;
  }

  .scoring-bar {
    flex-direction: column;
    align-items: center;
  }

  .navbar .container {
    flex-direction: column;
    gap: 12px;
  }

  .navbar-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .submission-stats {
    flex-wrap: wrap;
  }

  .points-bar-container {
    width: 100px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .player-info {
    gap: 10px;
  }

  .player-avatar {
    width: 36px;
    height: 36px;
  }

  .total-score .points {
    font-size: 1.3rem;
  }
}

/* ============================================
   MAP PERFORMANCE GRID
   ============================================ */
/* ============================================
   MAP PERFORMANCE GRID
   ============================================ */
.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.map-card {
  background: #14161f;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  min-height: 108px;
}

.map-card:hover {
  border-color: rgba(239, 51, 20, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 20px rgba(239, 51, 20, 0.25);
}

.map-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.38;
  filter: saturate(1.2) contrast(1.1);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.map-card:hover .map-bg {
  transform: scale(1.08);
  opacity: 0.62;
}

.map-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 15, 22, 0.85) 0%, rgba(20, 22, 30, 0.68) 100%);
  pointer-events: none;
}

.map-content {
  position: relative;
  z-index: 2;
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.map-card-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.map-card-matches {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.map-card-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.map-card-stat-item {
  display: flex;
  flex-direction: column;
}

.map-card-stat-lbl {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}

.map-card-stat-val {
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--text-primary);
}

/* ============================================
   MATCH FILTER TOOLBAR
   ============================================ */
.match-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-pill {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: #161822;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover, .filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================
   HISTORY TABS (FACEIT / DM Toggle)
   ============================================ */
.history-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.history-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  bottom: -1px;
}

.history-tab:hover {
  color: var(--text-secondary);
}

.history-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.history-tab-count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

.history-tab.active .history-tab-count {
  background: rgba(239, 51, 20, 0.2);
  color: var(--accent-light);
}

/* ============================================
   DM SUBMISSIONS GRID (Thumbnails)
   ============================================ */
.dm-submissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 10px;
  padding-top: 4px;
}

.dm-sub-card {
  background: #14161f;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

.dm-sub-card:hover {
  border-color: rgba(239, 51, 20, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.dm-sub-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
  background: #0e0f14;
}

.dm-sub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.dm-sub-thumb:hover img {
  transform: scale(1.06);
  filter: brightness(1.1);
}

.dm-sub-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dm-sub-thumb:hover .dm-sub-zoom {
  opacity: 1;
}

.dm-sub-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: rgba(18, 19, 26, 0.8);
}

.dm-sub-info {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dm-sub-kills {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent);
}

.dm-sub-time {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-muted);
}

.map-select-filter {
  background: #161822;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  padding: 6px 32px 6px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  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='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  min-width: 140px;
}

.map-select-filter:hover {
  border-color: rgba(239, 51, 20, 0.5);
  background-color: #1a1d2a;
}

.map-select-filter:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(239, 51, 20, 0.15);
}

.map-select-filter option {
  background: #161822;
  color: var(--text-primary);
  font-weight: 600;
  padding: 8px 12px;
}

/* ============================================
   LIVE SCORE CALCULATOR PREVIEW (Submit page)
   ============================================ */
.live-calc-box {
  background: rgba(239, 51, 20, 0.06);
  border: 1px solid rgba(239, 51, 20, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

.live-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.84rem;
}

.live-calc-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.live-calc-val {
  font-weight: 800;
  color: var(--text-primary);
  font-family: monospace;
}

.live-calc-val.highlight {
  color: var(--accent);
  font-size: 1rem;
}

.live-calc-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 0;
}

/* ============================================
   LIGHTBOX MODAL (Image Zoom)
   ============================================ */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 35px rgba(239, 51, 20, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  object-fit: contain;
  transform: scale(0.94);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-modal.open .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s;
}

/* ============================================
   MVP HIGHLIGHTS GRID
   ============================================ */
.mvp-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.mvp-card {
  background: linear-gradient(135deg, rgba(25, 27, 36, 0.95) 0%, rgba(18, 19, 26, 0.95) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.mvp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
}

.mvp-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 51, 20, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(239, 51, 20, 0.15);
  background: #191b26;
}

.mvp-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
  background: #000;
}

.mvp-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mvp-badge {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-light);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mvp-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mvp-stat {
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
  font-family: monospace;
}

.lightbox-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.08);
}

/* ============================================
   MODALS (Centered Dialogs)
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.visible, .modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  background: #181a24;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 30px rgba(239, 51, 20, 0.18);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.visible .modal-content, .modal.open .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--accent);
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(30, 32, 42, 0.8);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent 100%
  );
  animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-row {
  height: 68px;
  margin-bottom: 8px;
}

.skeleton-mvp {
  height: 62px;
}

.skeleton-hero {
  height: 110px;
  margin-bottom: 20px;
}

.skeleton-card {
  height: 180px;
  margin-bottom: 20px;
}

/* ============================================
   FLOATING PARTICLES (Pure CSS)
   ============================================ */
.particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(239, 51, 20, 0.25);
  animation: floatUp linear infinite;
  opacity: 0;
}

.particle:nth-child(odd) {
  background: rgba(255, 255, 255, 0.12);
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) scale(1);
  }
}

/* ============================================
   ANIMATED COUNTER
   ============================================ */
.counter-anim {
  display: inline-block;
  transition: opacity 0.3s;
}

/* ============================================
   PLAYER HERO BANNER (Cinematic)
   ============================================ */
.player-hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #12131a 0%, #181a24 100%);
  min-height: 160px;
}

.player-hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(239, 51, 20, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 120, 50, 0.08) 0%, transparent 50%);
  animation: heroGlow 6s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

.player-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px;
  gap: 24px;
}

.hero-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
}

.hero-back-btn:hover {
  background: rgba(239, 51, 20, 0.15);
  border-color: rgba(239, 51, 20, 0.5);
  color: #fff;
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 10px rgba(239, 51, 20, 0.15);
}

.hero-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-avatar {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  border: 2px solid var(--accent);
  object-fit: cover;
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(239, 51, 20, 0.2);
}

.hero-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-nickname {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-score-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  background: rgba(239, 51, 20, 0.1);
  border: 1px solid rgba(239, 51, 20, 0.35);
  border-radius: var(--radius-md);
  min-width: 95px;
}

.hero-score-val {
  font-size: 2.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 30%, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.hero-score-lbl {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Hero banner separator line */
.player-hero-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 5%;
  width: 90%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239, 51, 20, 0.3), transparent);
}

@media (max-width: 640px) {
  .player-hero-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 16px;
  }

  .hero-avatar {
    width: 64px;
    height: 64px;
  }

  .hero-nickname {
    font-size: 1.3rem;
  }

  .hero-right {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   CUSTOM NUMBER STEPPER CONTROLS
   ============================================ */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.stepper-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.stepper-input {
  text-align: center;
  padding: 10px 42px !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  color: #fff !important;
  letter-spacing: 0.5px;
}

.stepper-btn {
  position: absolute;
  top: 5px;
  bottom: 5px;
  width: 32px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  z-index: 2;
}

.stepper-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(239, 51, 20, 0.4);
}

.stepper-btn:active {
  transform: scale(0.92);
}

/* ============================================
   ADMIN LIVE SYSTEM & API STATUS CARDS
   ============================================ */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: linear-gradient(145deg, rgba(26, 28, 38, 0.9), rgba(16, 17, 23, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.admin-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(239, 51, 20, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(239, 51, 20, 0.15);
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0.9;
}

.admin-stat-card.stat-green::before {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.admin-stat-card.stat-orange::before {
  background: #ef3314;
  box-shadow: 0 0 10px rgba(239, 51, 20, 0.5);
}

.admin-stat-card.stat-blue::before {
  background: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.admin-stat-card.stat-purple::before {
  background: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.admin-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.admin-stat-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-stat-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.admin-stat-val {
  font-size: 1.55rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-stat-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px #22c55e;
  animation: pulse 1.8s infinite;
  display: inline-block;
}

/* ============================================
   ADMIN PLAYER MANAGEMENT ROSTER
   ============================================ */
.admin-players-roster {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.admin-player-header-row {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 1.3fr 1.1fr 1.1fr 1.5fr;
  padding: 10px 18px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 2px;
}

.admin-player-row {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 1.3fr 1.1fr 1.1fr 1.5fr;
  align-items: center;
  background: rgba(22, 24, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 14px;
}

.admin-player-row:hover {
  background: rgba(28, 30, 42, 0.95);
  border-color: rgba(239, 51, 20, 0.35);
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.admin-player-row.is-passive {
  opacity: 0.55;
  filter: grayscale(0.5);
  background: rgba(18, 19, 24, 0.5);
}

.admin-player-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-player-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: #0d0e12;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.admin-player-nick-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.admin-player-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-player-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.admin-player-score {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--accent);
}

.admin-player-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-roster-action {
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.status-chip.active {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

.status-chip.passive {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* ============================================
   CUSTOM CONFIRMATION MODAL
   ============================================ */
.confirm-modal-content {
  max-width: 440px !important;
  text-align: center;
  padding: 32px 28px !important;
  border: 1px solid rgba(239, 51, 20, 0.45) !important;
  background: linear-gradient(145deg, #181a24 0%, #101117 100%) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(239, 51, 20, 0.25) !important;
  animation: modalPop 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.confirm-modal-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(239, 51, 20, 0.12);
  border: 1px solid rgba(239, 51, 20, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 20px rgba(239, 51, 20, 0.25);
}

.confirm-modal-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.confirm-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.confirm-modal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-modal-actions .btn {
  min-width: 120px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.88rem;
}

/* ============================================
   EXPANDABLE SEASON ARCHIVE CARDS
   ============================================ */
.archive-card {
  background: linear-gradient(145deg, rgba(24, 26, 36, 0.85), rgba(16, 17, 23, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.archive-card:hover {
  border-color: rgba(239, 51, 20, 0.4);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.archive-card.open {
  border-color: var(--accent);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(239, 51, 20, 0.15);
}

.archive-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.015);
  transition: background 0.2s ease;
}

.archive-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.archive-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.archive-badge-pill {
  background: rgba(239, 51, 20, 0.15);
  border: 1px solid rgba(239, 51, 20, 0.4);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.archive-name {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.2px;
}

.archive-dates {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.archive-winner-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(239, 51, 20, 0.15), rgba(255, 170, 51, 0.08));
  border: 1px solid rgba(239, 51, 20, 0.4);
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(239, 51, 20, 0.15);
}

.archive-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  transition: transform 0.25s ease;
}

.archive-card.open .archive-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.archive-body {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(14, 15, 20, 0.7);
  animation: fadeIn 0.2s ease;
}

.archive-card.open .archive-body {
  display: block;
}

.archive-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 14px;
}

.archive-roster-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archive-player-row {
  display: grid;
  grid-template-columns: 48px 2.2fr 1.2fr 1.5fr 1.5fr 1.2fr;
  align-items: center;
  background: rgba(22, 24, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  gap: 12px;
  transition: all 0.15s ease;
}

.archive-player-row:hover {
  background: rgba(30, 32, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
}

.archive-player-row.rank-1 {
  background: linear-gradient(90deg, rgba(239, 51, 20, 0.15), rgba(22, 24, 32, 0.8));
  border-color: rgba(239, 51, 20, 0.45);
  box-shadow: 0 0 15px rgba(239, 51, 20, 0.1);
}

.archive-rank-num {
  font-weight: 900;
  font-size: 0.95rem;
  text-align: center;
  color: var(--text-muted);
}

.archive-player-row.rank-1 .archive-rank-num {
  color: #ffaa33;
}

@media (max-width: 768px) {
  .archive-player-row {
    grid-template-columns: 36px 1fr 1fr;
    gap: 8px;
  }
}

/* ============================================
   TOAST & LOADING OVERLAY NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 440px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.2);
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
  backdrop-filter: blur(16px);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-success {
  background: rgba(16, 185, 129, 0.95);
  border: 1px solid #10b981;
  color: #ffffff;
}

.toast-error {
  background: rgba(239, 68, 68, 0.95);
  border: 1px solid #ef4444;
  color: #ffffff;
}

.toast-info {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.loading-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.loading-overlay .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent, #ef3314);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.spin {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   ADMIN PLAYERS ROSTER GRID (PERFECT ALIGNMENT)
   ============================================ */
.admin-players-roster {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.admin-player-header-row,
.admin-player-row {
  display: grid;
  grid-template-columns: minmax(190px, 2fr) 130px 140px 120px 110px 240px;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
}

.admin-player-header-row {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted, #7e879b);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
  margin-bottom: 4px;
}

.admin-player-row {
  background: rgba(22, 24, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.admin-player-row:hover {
  background: rgba(30, 34, 46, 0.9);
  border-color: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.admin-player-row.is-passive {
  opacity: 0.55;
  filter: grayscale(0.5);
}

.admin-player-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-player-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.admin-player-nick-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-player-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-player-meta {
  font-size: 0.75rem;
  color: var(--text-muted, #7e879b);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-player-score {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--accent, #ef3314);
}

.admin-player-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-roster-action {
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 992px) {
  .admin-players-roster {
    overflow-x: auto;
  }
  .admin-player-header-row,
  .admin-player-row {
    min-width: 840px;
  }
}

/* ============================================
   🏆 3D CINEMATIC CHAMPIONSHIP PODIUM STAGE
   ============================================ */
.podium-stage-container {
  margin-bottom: 24px;
}

.podium-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  align-items: flex-end;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto 10px auto;
}

.podium-card {
  position: relative;
  background: linear-gradient(180deg, rgba(26, 29, 39, 0.88) 0%, rgba(16, 18, 24, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px 16px 0 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(16px);
}

.podium-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* #1 Champion Special Stylings */
.podium-card.podium-rank-1 {
  background: linear-gradient(180deg, rgba(38, 30, 20, 0.9) 0%, rgba(20, 16, 12, 0.96) 100%);
  border: 1.5px solid rgba(255, 180, 50, 0.4);
  box-shadow: 0 10px 30px rgba(255, 170, 51, 0.12), inset 0 1px 0 rgba(255, 215, 0, 0.3);
  padding-top: 26px;
}

.podium-card.podium-rank-1:hover {
  border-color: rgba(255, 180, 50, 0.7);
  box-shadow: 0 24px 50px rgba(255, 170, 51, 0.25);
}

.podium-crown {
  position: absolute;
  top: -22px;
  font-size: 2rem;
  filter: drop-shadow(0 4px 12px rgba(255, 180, 0, 0.6));
  animation: crownBob 2.5s ease-in-out infinite alternate;
}

@keyframes crownBob {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-4px) scale(1.08); }
}

.podium-rank-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.podium-rank-badge.gold {
  background: linear-gradient(135deg, rgba(255, 170, 51, 0.25), rgba(255, 215, 0, 0.1));
  color: #ffc83b;
  border: 1px solid rgba(255, 200, 59, 0.4);
}

.podium-rank-badge.silver {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.podium-rank-badge.bronze {
  background: rgba(205, 127, 50, 0.15);
  color: #e2a76f;
  border: 1px solid rgba(205, 127, 50, 0.3);
}

/* Avatars */
.podium-avatar-wrap {
  position: relative;
  margin-bottom: 10px;
}

.podium-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.3s ease;
}

.podium-card:hover .podium-avatar {
  transform: scale(1.06);
}

.podium-avatar.gold-avatar {
  width: 78px;
  height: 78px;
  border: 3.5px solid #ffc83b;
  box-shadow: 0 0 25px rgba(255, 180, 0, 0.4);
}

.podium-avatar-wrap.silver-glow .podium-avatar {
  border-color: #cbd5e1;
  box-shadow: 0 0 15px rgba(203, 213, 225, 0.3);
}

.podium-avatar-wrap.bronze-glow .podium-avatar {
  border-color: #cd7f32;
  box-shadow: 0 0 15px rgba(205, 127, 50, 0.3);
}

.podium-star {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 1rem;
  background: #1a1500;
  border-radius: 50%;
  padding: 1px;
}

.podium-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.podium-name.gold-name {
  font-size: 1.25rem;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 180, 0, 0.3);
}

.podium-points {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.podium-points.gold-pts {
  font-size: 1.65rem;
  color: #ffaa33;
}

.podium-pts-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.podium-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}

.podium-chip {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* 3D Pedestal Step Base */
.podium-step {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
}

.step-number {
  font-size: 1.8rem;
  font-weight: 900;
  opacity: 0.85;
}

.step-gold {
  height: 52px;
  background: linear-gradient(180deg, rgba(255, 180, 50, 0.25) 0%, rgba(200, 130, 20, 0.1) 100%);
  border-top: 2px solid #ffaa33;
}

.step-gold .step-number {
  color: #ffc83b;
  text-shadow: 0 0 15px rgba(255, 180, 50, 0.6);
}

.step-silver {
  height: 40px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.2) 0%, rgba(100, 116, 139, 0.08) 100%);
  border-top: 2px solid #cbd5e1;
}

.step-silver .step-number {
  color: #cbd5e1;
}

.step-bronze {
  height: 32px;
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.2) 0%, rgba(150, 80, 20, 0.08) 100%);
  border-top: 2px solid #cd7f32;
}

.step-bronze .step-number {
  color: #e2a76f;
}

@media (max-width: 680px) {
  .podium-wrapper {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .podium-card.podium-rank-1 {
    order: -1;
  }
}

/* ============================================
   📈 INTERACTIVE PERFORMANCE & ELO TRENDS
   ============================================ */
.trends-form-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-momentum-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(16, 18, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 12px;
}

.form-momentum-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}

.form-chips-list {
  display: flex;
  gap: 6px;
}

.form-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
.trend-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.trend-summary-box {
  background: rgba(16, 18, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tsb-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted, #7e879b);
  text-transform: uppercase;
}

.tsb-val {
  font-size: 1.25rem;
  font-weight: 900;
}

.tsb-sub {
  font-size: 0.72rem;
  color: var(--text-secondary, #94a3b8);
  font-weight: 600;
}

.trend-chart-box {
  position: relative;
  width: 100%;
  padding: 8px 4px 0 0;
}

.trend-legend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

.trend-leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary, #cbd5e1);
}

.leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.leg-dot.green {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.leg-dot.red {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

@media (max-width: 680px) {
  .trend-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   STEPPER INPUT WRAPPER & SCORING SECTIONS
   ============================================ */
.scoring-section-block {
  margin-bottom: 20px;
  background: rgba(16, 18, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 18px 20px;
}

.scoring-section-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stepper-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.stepper-input-wrap .form-input.stepper-input {
  text-align: center;
  padding: 10px 48px;
  font-size: 1.15rem;
  font-weight: 800;
  width: 100%;
}

.stepper-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  z-index: 2;
}

.stepper-btn:hover {
  background: rgba(239, 51, 20, 0.25);
  border-color: rgba(239, 51, 20, 0.5);
  color: #ffaa33;
  transform: translateY(-50%) scale(1.05);
}

.stepper-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.stepper-btn-dec {
  left: 6px;
}

.stepper-btn-inc {
  right: 6px;
}

/* ============================================
   ADMIN PLAYERS TABLE (SEMANTIC & ALIGNED)
   ============================================ */
.admin-table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  font-size: 0.9rem;
}

.admin-table thead th {
  padding: 10px 16px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted, #7e879b);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.admin-table tbody tr {
  background: rgba(22, 24, 32, 0.75);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.admin-table tbody tr:hover {
  background: rgba(30, 34, 46, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.admin-table tbody tr.is-passive {
  opacity: 0.5;
  filter: grayscale(0.6);
}

.admin-table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-table tbody td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.admin-table tbody td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.admin-player-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-player-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.admin-player-nick-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-player-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
}

.admin-player-meta {
  font-size: 0.76rem;
  color: var(--text-muted, #7e879b);
  font-weight: 600;
}

.admin-player-score {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--accent, #ef3314);
}

.admin-player-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-roster-action {
  padding: 6px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .admin-table {
    min-width: 800px;
  }
}

/* DM Submission Note Chip */
.dm-sub-note {
  font-size: 0.74rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
