/* ============================================================================
   RANGLISTEN & GEGNER-LISTE: DYSTOPISCHES NEON-REDESIGN
   Style Guide: SC GW Paderborn – Neon Cyan (#00FFC6) Primary, Dark Industrial
   Pattern: Login-Page ist Referenz (Neon Dark, Orbitron/Exo2, Glas/Holo Panels)
   ============================================================================ */

/* ============================================================================
   1. DESIGN TOKENS – WEISSTÖNE ENTFERNT, NEON-CYAN DOMINANZ
   ============================================================================ */

:root {
  /* === NEON CYAN PRIMARY (statt Grün) === */
  --neon-cyan: #00FFC6;
  --neon-cyan-bright: #00FFD9;
  --neon-cyan-dim: #00C2A0;
  --neon-cyan-rgb: 0, 255, 198;
  
  /* === ELECTRIC BLUE SECONDARY === */
  --electric-blue: #00C2FF;
  --electric-blue-dim: #0099CC;
  --electric-blue-rgb: 0, 194, 255;
  
  /* === DARK INDUSTRIAL SURFACES (kein Weiß!) === */
  --surface-darkest: #0a0e12;     /* Basis-BG (fast schwarz, blaustichig) */
  --surface-darker: #0f1419;      /* Panels Hintergrund */
  --surface-dark: #141a20;        /* Hover/Active States */
  --surface-mid: #1a2229;         /* Elevated Surfaces */
  --surface-light: #212930;       /* Borders/Dividers */
  
  /* === METALLISCHE AKZENTE === */
  --metal-silver: #8a9099;        /* Text Muted */
  --metal-chrome: #b0b8c0;        /* Text Secondary */
  --metal-bright: #d4dce4;        /* Text Primary */
  
  /* === GLOW-EFFEKTE === */
  --glow-cyan: 0 0 8px rgba(var(--neon-cyan-rgb), 0.5),
               0 0 16px rgba(var(--neon-cyan-rgb), 0.3),
               0 0 24px rgba(var(--neon-cyan-rgb), 0.15);
  
  --glow-blue: 0 0 8px rgba(var(--electric-blue-rgb), 0.4),
               0 0 16px rgba(var(--electric-blue-rgb), 0.2);
  
  --glow-subtle: 0 0 4px rgba(var(--neon-cyan-rgb), 0.2);
  
  /* === HOLOGRAPHIC PANEL BORDER === */
  --holo-border: linear-gradient(135deg, 
    rgba(var(--neon-cyan-rgb), 0.3) 0%,
    rgba(var(--electric-blue-rgb), 0.2) 50%,
    rgba(var(--neon-cyan-rgb), 0.3) 100%);
  
  /* === GLASS MORPHISM === */
  --glass-bg: rgba(20, 26, 32, 0.7);
  --glass-border: rgba(var(--neon-cyan-rgb), 0.15);
  --glass-highlight: rgba(255, 255, 255, 0.05);
}

/* ============================================================================
   2. RANGLISTE – NEON CARD DESIGN (MOBILE FIRST)
   ============================================================================ */

.ranking-table-wrapper {
  overflow-x: visible;
  padding: 0;
}

.ranking-table tbody {
  display: grid;
  gap: 14px;
}

.ranking-table tbody tr {
  /* Layout */
  display: grid;
  grid-template-columns: 56px 1fr auto;
  grid-template-rows: auto auto;
  gap: 10px 12px;
  padding: 16px;
  
  /* Dark Glass Panel */
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--neon-cyan);
  border-radius: 12px;
  
  /* Metall-Kante (innen) */
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.03),
    inset -1px -1px 0 rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.4);
  
  /* Transition für Hover */
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Relative für Pseudo-Elemente */
  position: relative;
  overflow: hidden;
}

/* Holographic Scan-Line Effect (optional) */
.ranking-table tbody tr::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(var(--neon-cyan-rgb), 0.4) 50%,
    transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ranking-table tbody tr:hover::before {
  opacity: 1;
}

/* Hover: Intensivierter Glow */
.ranking-table tbody tr:hover {
  border-left-width: 4px;
  border-left-color: var(--neon-cyan-bright);
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.05),
    inset -1px -1px 0 rgba(0, 0, 0, 0.3),
    0 6px 24px rgba(0, 0, 0, 0.6),
    var(--glow-subtle);
  transform: translateY(-1px);
}

/* Current User: Electric Blue Highlight */
.ranking-table tbody tr.current-user {
  border-left-color: var(--electric-blue);
  border-left-width: 5px;
  background: linear-gradient(135deg,
    rgba(var(--electric-blue-rgb), 0.08) 0%,
    var(--glass-bg) 100%);
  box-shadow: 
    inset 1px 1px 0 rgba(var(--electric-blue-rgb), 0.1),
    inset -1px -1px 0 rgba(0, 0, 0, 0.3),
    0 6px 24px rgba(var(--electric-blue-rgb), 0.25),
    var(--glow-blue);
}

.ranking-table tbody tr.current-user:hover {
  box-shadow: 
    inset 1px 1px 0 rgba(var(--electric-blue-rgb), 0.15),
    inset -1px -1px 0 rgba(0, 0, 0, 0.4),
    0 8px 32px rgba(var(--electric-blue-rgb), 0.35),
    var(--glow-blue);
}

/* ============================================================================
   3. RANGLISTE ZELLEN – TYPOGRAFIE & FARBEN
   ============================================================================ */

/* Rang Badge (Neon Numeric) */
.ranking-table tbody tr td:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
  
  /* Typografie */
  font-family: var(--font-display, 'Orbitron', monospace);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  
  /* Farbe: Neon Cyan Gradient */
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--electric-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  
  /* Text Glow */
  filter: drop-shadow(0 0 4px rgba(var(--neon-cyan-rgb), 0.6));
  
  align-self: center;
}

/* Top 3 Ränge: Intensivierter Glow */
.ranking-table tbody tr td.rank-col.top-3 {
  font-size: 2rem;
  filter: drop-shadow(0 0 8px rgba(var(--neon-cyan-rgb), 0.8))
          drop-shadow(0 0 16px rgba(var(--electric-blue-rgb), 0.5));
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { 
    filter: drop-shadow(0 0 8px rgba(var(--neon-cyan-rgb), 0.8))
            drop-shadow(0 0 16px rgba(var(--electric-blue-rgb), 0.5));
  }
  50% { 
    filter: drop-shadow(0 0 12px rgba(var(--neon-cyan-rgb), 1))
            drop-shadow(0 0 24px rgba(var(--electric-blue-rgb), 0.7));
  }
}

/* Name (Spieler) */
.ranking-table tbody tr td:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
  
  /* Typografie */
  font-family: var(--font-body, 'Exo 2', sans-serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  
  /* Farbe: Helles Metall */
  color: var(--metal-bright);
  
  align-self: center;
}

/* Actions Button */
.ranking-table tbody tr td:last-child {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  text-align: right;
}

/* Punkte / Statistiken */
.ranking-table tbody tr td:nth-child(3),
.ranking-table tbody tr td:nth-child(4),
.ranking-table tbody tr td:nth-child(5) {
  grid-column: 2 / -1;
  grid-row: 2;
  
  /* Typografie */
  font-family: var(--font-body, 'Exo 2', sans-serif);
  font-size: 0.85rem;
  font-weight: 500;
  
  /* Farbe: Gedämpftes Metall */
  color: var(--metal-silver);
  
  /* Spacing */
  display: inline-block;
  margin-right: 14px;
}

/* Punkte-Wert Highlight */
.ranking-table tbody tr td:nth-child(3) strong,
.ranking-table tbody tr td:nth-child(3) .points-value {
  color: var(--neon-cyan);
  font-weight: 700;
  text-shadow: 0 0 4px rgba(var(--neon-cyan-rgb), 0.5);
}

/* Thead verstecken auf Mobile */
.ranking-table thead {
  display: none;
}

/* ============================================================================
   4. DESKTOP TABLE LAYOUT (ab 641px)
   ============================================================================ */

@media (min-width: 641px) {
  .ranking-table thead {
    display: table-header-group;
  }
  
  .ranking-table thead th {
    /* Typografie */
    font-family: var(--font-display, 'Orbitron', monospace);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    
    /* Farbe */
    color: var(--neon-cyan);
    
    /* Layout */
    padding: 14px 12px;
    text-align: left;
    
    /* Background: Dunkler Gradient */
    background: linear-gradient(180deg,
      var(--surface-darker) 0%,
      var(--surface-darkest) 100%);
    
    /* Border: Neon Divider */
    border-bottom: 1px solid var(--glass-border);
    
    /* Metall-Kante */
    box-shadow: inset 0 1px 0 rgba(var(--neon-cyan-rgb), 0.1);
  }
  
  .ranking-table tbody {
    display: table-row-group;
    gap: 0;
  }
  
  .ranking-table tbody tr {
    display: table-row;
    border-left: 3px solid transparent;
    border-radius: 0;
    
    /* Zeilen-Divider */
    border-bottom: 1px solid rgba(var(--neon-cyan-rgb), 0.08);
    
    /* Kein Box-Shadow (zu viel für Table) */
    box-shadow: none;
    
    /* ALTERNIERENDE DUNKLE GRAUTÖNE (gut lesbar) */
    background: rgba(20, 26, 32, 0.45); /* Dunkler Grauton 1 */
    transition: all 0.2s ease;
  }
  
  .ranking-table tbody tr:nth-child(even) {
    /* Zweiter Grauton (etwas heller) */
    background: rgba(26, 34, 42, 0.55);
  }
  
  .ranking-table tbody tr:hover {
    /* Hover: Leichter Neon Glow */
    background: linear-gradient(90deg,
      rgba(var(--neon-cyan-rgb), 0.12) 0%,
      rgba(26, 34, 42, 0.6) 100%);
    border-left: 3px solid rgba(var(--neon-cyan-rgb), 0.4);
  }
  
  .ranking-table tbody tr.current-user {
    /* CURRENT USER: NEON CYAN HIGHLIGHT */
    border-left: 4px solid var(--neon-cyan) !important;
    background: linear-gradient(90deg,
      rgba(var(--neon-cyan-rgb), 0.18) 0%,
      rgba(var(--neon-cyan-rgb), 0.08) 50%,
      transparent 100%) !important;
    box-shadow: 
      inset 0 0 0 1px rgba(var(--neon-cyan-rgb), 0.25),
      0 0 16px rgba(var(--neon-cyan-rgb), 0.15);
  }
  
  .ranking-table tbody tr.current-user:hover {
    /* Current User Hover: Stärkerer Glow */
    background: linear-gradient(90deg,
      rgba(var(--neon-cyan-rgb), 0.25) 0%,
      rgba(var(--neon-cyan-rgb), 0.12) 50%,
      rgba(26, 34, 42, 0.6) 100%) !important;
    box-shadow: 
      inset 0 0 0 1px rgba(var(--neon-cyan-rgb), 0.35),
      0 0 20px rgba(var(--neon-cyan-rgb), 0.25);
  }
  
  .ranking-table tbody tr td {
    display: table-cell;
    padding: 16px 12px;
    vertical-align: middle;
    
    /* GUT LESBARE SCHRIFT (Hell, hoher Kontrast) */
    color: #d4dce4; /* Metal Bright */
    font-size: 15px;
    font-weight: 500;
  }
  
  /* Name Column (noch heller für bessere Lesbarkeit) */
  .ranking-table tbody tr td:nth-child(2) {
    color: #e8f0f8;
    font-weight: 600;
  }
  
  /* Punkte Column (Neon Highlight) */
  .ranking-table tbody tr td:nth-child(3) {
    color: var(--neon-cyan);
    font-weight: 700;
    text-shadow: 0 0 4px rgba(var(--neon-cyan-rgb), 0.3);
  }
  
  /* Rank Column */
  .ranking-table tbody tr td:nth-child(1) {
    color: #a8b8c8;
    font-weight: 600;
    font-family: var(--font-display, 'Orbitron', monospace);
  }
  
  /* Reset Grid-spezifische Styles */
  .ranking-table tbody tr td:nth-child(1),
  .ranking-table tbody tr td:nth-child(2),
  .ranking-table tbody tr td:nth-child(3),
  .ranking-table tbody tr td:nth-child(4),
  .ranking-table tbody tr td:nth-child(5),
  .ranking-table tbody tr td:last-child {
    grid-column: auto;
    grid-row: auto;
    margin-right: 0;
  }
  
  /* Rang Column */
  .ranking-table tbody tr td:nth-child(1) {
    width: 8%;
    min-width: 60px;
    max-width: 80px;
    text-align: center;
  }
  
  /* Name Column (flexibel, nimmt verfügbaren Platz) */
  .ranking-table tbody tr td:nth-child(2),
  .ranking-table thead th:nth-child(2) {
    width: auto;
    min-width: 140px;
  }
  
  /* Punkte Column (rechtsbündig für Zahlen) */
  .ranking-table tbody tr td:nth-child(3),
  .ranking-table thead th:nth-child(3) {
    width: 12%;
    min-width: 80px;
    max-width: 120px;
    text-align: right;
    font-weight: 700;
    color: var(--neon-cyan);
  }
  
  /* Siege/Niederlagen Columns (gleich breit, zentriert) */
  .ranking-table tbody tr td:nth-child(4),
  .ranking-table tbody tr td:nth-child(5),
  .ranking-table thead th:nth-child(4),
  .ranking-table thead th:nth-child(5) {
    width: 10%;
    min-width: 70px;
    max-width: 100px;
    text-align: center;
  }
  
  /* Challenge Button Column (rechtsbündig) */
  .ranking-table tbody tr td:last-child,
  .ranking-table thead th:last-child {
    width: 15%;
    min-width: 100px;
    max-width: 140px;
    text-align: right;
    padding-right: 16px;
  }
}

/* Tablet-Optimierung: Kompaktere Abstände, kleinere Schrift */
@media (min-width: 641px) and (max-width: 1024px) {
  .ranking-table tbody tr td,
  .ranking-table thead th {
    padding: 12px 8px;
    font-size: 14px;
  }
  
  .ranking-table tbody tr td:nth-child(3) {
    font-size: 15px; /* Punkte bleiben gut lesbar */
  }
  
  /* Kompaktere Spaltenbreiten auf Tablet */
  .ranking-table tbody tr td:nth-child(1),
  .ranking-table thead th:nth-child(1) {
    width: 60px;
    min-width: 50px;
  }
  
  .ranking-table tbody tr td:nth-child(4),
  .ranking-table tbody tr td:nth-child(5),
  .ranking-table thead th:nth-child(4),
  .ranking-table thead th:nth-child(5) {
    width: 70px;
    min-width: 60px;
  }
}

/* iPhone 13/12/11 Optimierung (390-428px): Optimale Balance */
@media (max-width: 428px) {
  .ranking-table {
    font-size: 11px;
  }
  
  .ranking-table tbody tr td,
  .ranking-table thead th {
    padding: 8px 4px;
    font-size: 11px;
  }
  
  /* Rang: Ultra kompakt */
  .ranking-table tbody tr td:nth-child(1),
  .ranking-table thead th:nth-child(1) {
    width: 38px;
    min-width: 35px;
    max-width: 42px;
    padding: 8px 3px;
  }
  
  /* Name: Flexibel, aber enger */
  .ranking-table tbody tr td:nth-child(2),
  .ranking-table thead th:nth-child(2) {
    min-width: 85px;
    font-size: 12px;
    padding-left: 6px;
  }
  
  /* Punkte: Kompakter */
  .ranking-table tbody tr td:nth-child(3),
  .ranking-table thead th:nth-child(3) {
    width: 55px;
    min-width: 50px;
    max-width: 60px;
    font-size: 12px;
    padding: 8px 4px;
  }
  
  /* Siege/Niederlagen: Sehr eng */
  .ranking-table tbody tr td:nth-child(4),
  .ranking-table tbody tr td:nth-child(5),
  .ranking-table thead th:nth-child(4),
  .ranking-table thead th:nth-child(5) {
    width: 42px;
    min-width: 38px;
    max-width: 48px;
    font-size: 11px;
    padding: 8px 3px;
  }
  
  /* Challenge Button: Kompakt */
  .ranking-table tbody tr td:last-child,
  .ranking-table thead th:last-child {
    width: 72px;
    min-width: 68px;
    max-width: 80px;
    padding: 8px 4px;
  }
  
  .ranking-table .btn-challenge {
    font-size: 10px;
    padding: 5px 6px;
    letter-spacing: 0.02em;
  }
  
  .ranking-table thead th {
    font-size: 10px;
    padding: 8px 4px;
  }
  
  .ranking-toolbar {
    padding: 12px 8px;
  }
  
  .ranking-meta .text-sm {
    font-size: 10px;
  }
}

/* Mobile-Optimierung: Ultra-kompakt, kleinere Schrift, weniger Padding */
@media (max-width: 640px) {
  .ranking-table {
    font-size: 12px;
  }
  
  .ranking-table tbody tr td,
  .ranking-table thead th {
    padding: 10px 6px;
    font-size: 12px;
  }
  
  /* Rang Column: Sehr kompakt */
  .ranking-table tbody tr td:nth-child(1),
  .ranking-table thead th:nth-child(1) {
    width: 45px;
    min-width: 40px;
    max-width: 50px;
    padding: 10px 4px;
  }
  
  /* Name Column: Flexibel, min 100px */
  .ranking-table tbody tr td:nth-child(2),
  .ranking-table thead th:nth-child(2) {
    min-width: 100px;
    font-size: 13px;
  }
  
  /* Punkte Column: Kompakt aber lesbar */
  .ranking-table tbody tr td:nth-child(3),
  .ranking-table thead th:nth-child(3) {
    width: 60px;
    min-width: 55px;
    max-width: 70px;
    font-size: 13px;
    padding-right: 8px;
  }
  
  /* Siege/Niederlagen: Sehr kompakt */
  .ranking-table tbody tr td:nth-child(4),
  .ranking-table tbody tr td:nth-child(5),
  .ranking-table thead th:nth-child(4),
  .ranking-table thead th:nth-child(5) {
    width: 50px;
    min-width: 45px;
    max-width: 60px;
    font-size: 12px;
  }
  
  /* Challenge Button: Kompakt */
  .ranking-table tbody tr td:last-child,
  .ranking-table thead th:last-child {
    width: 80px;
    min-width: 75px;
    max-width: 90px;
    padding-right: 8px;
  }
  
  .ranking-table .btn-challenge {
    font-size: 11px;
    padding: 6px 8px;
    letter-spacing: 0.03em;
  }
  
  /* Table Header: Kleiner */
  .ranking-table thead th {
    font-size: 11px;
    padding: 10px 6px;
  }
  
  /* Toolbar: Stack vertically on mobile */
  .ranking-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .ranking-meta {
    width: 100%;
  }
  
  .ranking-actions {
    width: 100%;
  }
  
  .ranking-title {
    font-size: 1rem;
  }
}

/* Extra small screens: Ultra-kompakt */
@media (max-width: 480px) {
  .ranking-table {
    font-size: 11px;
  }
  
  .ranking-table tbody tr td,
  .ranking-table thead th {
    padding: 8px 4px;
    font-size: 11px;
  }
  
  .ranking-table tbody tr td:nth-child(1),
  .ranking-table thead th:nth-child(1) {
    width: 40px;
    min-width: 35px;
  }
  
  .ranking-table tbody tr td:nth-child(2),
  .ranking-table thead th:nth-child(2) {
    min-width: 80px;
    font-size: 12px;
  }
  
  .ranking-table .btn-challenge {
    font-size: 10px;
    padding: 5px 6px;
  }
}

/* ============================================================================
   5. GEGNER-LISTE (OPPONENTS) – CARD DESIGN
   ============================================================================ */

.panel-table,
#opponentsList,
#sentChallengesList,
#receivedChallengesList {
  display: grid;
  gap: 12px;
  padding: 0;
}

.panel-table .opponent-card,
.panel-table .challenge-item {
  /* Layout */
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  
  /* Dark Glass Panel */
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--neon-cyan);
  border-radius: 10px;
  
  /* Metall-Kante */
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.02),
    0 3px 12px rgba(0, 0, 0, 0.3);
  
  /* Transition */
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  
  position: relative;
  overflow: hidden;
}

.panel-table .opponent-card:hover,
.panel-table .challenge-item:hover {
  border-left-width: 4px;
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.04),
    0 5px 18px rgba(0, 0, 0, 0.5),
    var(--glow-subtle);
  transform: translateX(2px);
}

/* Avatar Styling */
.panel-table .opponent-card .avatar,
.panel-table .challenge-item .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 8px rgba(var(--neon-cyan-rgb), 0.4);
  object-fit: cover;
}

/* Name & Info */
.panel-table .opponent-card .info,
.panel-table .challenge-item .info {
  flex: 1;
}

.panel-table .opponent-card .info .name,
.panel-table .challenge-item .info .name {
  font-family: var(--font-body, 'Exo 2', sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--metal-bright);
  margin-bottom: 4px;
}

.panel-table .opponent-card .info .meta,
.panel-table .challenge-item .info .meta {
  font-size: 0.85rem;
  color: var(--metal-silver);
}

/* Action Button */
.panel-table .opponent-card .btn,
.panel-table .challenge-item .btn {
  flex-shrink: 0;
}

/* ============================================================================
   6. BUTTONS – NEON STYLING (überschreibt Defaults)
   ============================================================================ */

.btn.primary.neon,
.ranking-table .btn.primary,
.panel-table .btn.primary {
  /* Background: Neon Cyan Gradient */
  background: linear-gradient(135deg,
    var(--neon-cyan) 0%,
    var(--neon-cyan-dim) 100%);
  
  /* Text */
  color: var(--surface-darkest);
  font-family: var(--font-display, 'Orbitron', monospace);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  
  /* Border & Shadow */
  border: 1px solid var(--neon-cyan-bright);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 12px rgba(var(--neon-cyan-rgb), 0.5),
    0 4px 16px rgba(0, 0, 0, 0.4);
  
  /* Transition */
  transition: all 0.2s ease;
}

.btn.primary.neon:hover,
.ranking-table .btn.primary:hover,
.panel-table .btn.primary:hover {
  background: linear-gradient(135deg,
    var(--neon-cyan-bright) 0%,
    var(--neon-cyan) 100%);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 18px rgba(var(--neon-cyan-rgb), 0.7),
    0 6px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.btn.secondary.neon,
.ranking-table .btn.secondary,
.panel-table .btn.secondary {
  /* Background: Transparent mit Neon Border */
  background: rgba(var(--neon-cyan-rgb), 0.08);
  
  /* Text */
  color: var(--neon-cyan);
  font-family: var(--font-body, 'Exo 2', sans-serif);
  font-weight: 600;
  
  /* Border */
  border: 1px solid var(--glass-border);
  box-shadow: 
    inset 0 0 0 1px rgba(var(--neon-cyan-rgb), 0.2),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn.secondary.neon:hover,
.ranking-table .btn.secondary:hover,
.panel-table .btn.secondary:hover {
  background: rgba(var(--neon-cyan-rgb), 0.15);
  border-color: var(--neon-cyan);
  box-shadow: 
    inset 0 0 0 1px rgba(var(--neon-cyan-rgb), 0.4),
    var(--glow-subtle),
    0 3px 12px rgba(0, 0, 0, 0.4);
}

/* ============================================================================
   7. CONTENT-BOX / PANELS – NEON CONTAINER
   ============================================================================ */

.content-box.panel-neon,
.ranking-shell,
.challenge-header {
  /* Background: Dark Glass mit Metall-Kante */
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  
  /* Border: Holographic Gradient */
  border: 1px solid;
  border-image-source: var(--holo-border);
  border-image-slice: 1;
  border-radius: 14px;
  
  /* Metall-Kante (innen) + Outer Glow */
  box-shadow: 
    inset 0 1px 0 rgba(var(--neon-cyan-rgb), 0.08),
    inset 1px 0 0 var(--glass-highlight),
    inset -1px 0 0 rgba(0, 0, 0, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.5);
  
  /* Padding */
  padding: 20px;
  
  /* Z-Index: MUST be low to stay behind Mobile User Panel (9999) */
  position: relative;
  z-index: 1;
}

/* Ranking Toolbar (Header mit Tabs) */
.ranking-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  
  /* Border: Neon Divider */
  border-bottom: 1px solid rgba(var(--neon-cyan-rgb), 0.15);
}

.ranking-title {
  font-family: var(--font-display, 'Orbitron', monospace);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(var(--neon-cyan-rgb), 0.6);
}

/* ============================================================================
   8. TABS – NEON DESIGN
   ============================================================================ */

.tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(var(--neon-cyan-rgb), 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  position: relative;
}

.tab-btn {
  /* Layout */
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  
  /* Typografie */
  font-family: var(--font-display, 'Orbitron', monospace);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  
  /* Farbe */
  color: var(--metal-silver);
  background: transparent;
  
  /* Transition */
  transition: all 0.2s ease;
  
  cursor: pointer;
}

.tab-btn:hover {
  color: var(--metal-bright);
  background: rgba(var(--neon-cyan-rgb), 0.08);
}

.tab-btn.active {
  color: var(--surface-darkest);
  background: linear-gradient(135deg,
    var(--neon-cyan) 0%,
    var(--neon-cyan-dim) 100%);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 12px rgba(var(--neon-cyan-rgb), 0.5);
}

/* Inkbar (optional – wenn JS setzt) */
.tabs .inkbar {
  position: relative;
  height: 2px;
  background: transparent;
  margin-top: 4px;
}

.tabs .inkbar-indicator {
  position: absolute;
  height: 2px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(var(--neon-cyan-rgb), 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   9. LOADING STATES – SKELETON SCREENS NEON
   ============================================================================ */

.skeleton-table .skeleton-list-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-left: 3px solid rgba(var(--neon-cyan-rgb), 0.3);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}

.skeleton {
  background: linear-gradient(90deg,
    rgba(var(--neon-cyan-rgb), 0.08) 0%,
    rgba(var(--neon-cyan-rgb), 0.15) 50%,
    rgba(var(--neon-cyan-rgb), 0.08) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(var(--neon-cyan-rgb), 0.2);
}

.skeleton-text {
  height: 18px;
  width: 70%;
  margin-bottom: 6px;
}

.skeleton-text-sm {
  height: 14px;
  width: 50%;
}

.skeleton-button {
  width: 90px;
  height: 36px;
  border-radius: 8px;
}

/* ============================================================================
   10. ACCESSIBILITY & REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  .ranking-table tbody tr,
  .panel-table .opponent-card,
  .btn,
  .tab-btn,
  .skeleton {
    transition: none;
    animation: none;
  }
  
  .ranking-table tbody tr td.rank-col.top-3 {
    animation: none;
  }
}

/* ============================================================================
   11. FOCUS STATES – ACCESSIBILITY
   ============================================================================ */

.ranking-table tbody tr:focus,
.panel-table .opponent-card:focus,
.tab-btn:focus,
.btn:focus {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
  box-shadow: 
    var(--glow-cyan),
    0 6px 24px rgba(0, 0, 0, 0.6);
}

/* ============================================================================
   12. RESPONSIVE TWEAKS
   ============================================================================ */

@media (max-width: 640px) {
  .ranking-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .tab-btn {
    white-space: nowrap;
    min-width: fit-content;
  }
}

/* ============================================================================
   13. CHALLENGE-SPECIFIC ELEMENTS
   ============================================================================ */

.challenge-header {
  margin-bottom: 18px;
}

.challenge-header p {
  color: var(--metal-silver);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 8px 0;
}

.challenge-meta {
  font-size: 0.8rem;
  color: var(--metal-silver);
  opacity: 0.7;
}

.challenge-tabs {
  margin-bottom: 18px;
}

.challenge-panel {
  padding: 0;
}

.eligibility-hint {
  padding: 12px 14px;
  margin-bottom: 14px;
  background: rgba(var(--electric-blue-rgb), 0.08);
  border-left: 3px solid var(--electric-blue);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--metal-chrome);
}

/* ============================================================================
   END OF NEON REDESIGN
   ============================================================================ */
