/* Admin Dashboard Esports Theme (scoped to body.admin-dashboard-page) */
body.admin-dashboard-page {
  --bg-1: #050505;
  --bg-2: #0A0A0A;
  --glass: rgba(255,255,255,0.04);
  --text-primary: #EDEDED;
  --text-secondary: #9CA3AF;
  --primary-neon: #39FF14;
  --accent-green: #00FF7F;
  --neon-glow: 0 0 14px #39FF14;
  --danger: #FF4444;
  --warning: #FFD54F;
  --info-blue: #00C3FF;
  --card-border: rgba(57,255,20,0.25);
  background: var(--bg-1);
  color: var(--text-primary);
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden;
  touch-action: manipulation;
  will-change: auto;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #0A0A0A, #050505) !important;
  color: var(--text-primary) !important;
  padding: 2rem 0;
  position: relative;
  border-bottom: 1px solid rgba(57,255,20,0.1);
  transform: translateZ(0);
  will-change: transform;
}

.page-header h1 {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
  font-weight: 800;
  transform: translateZ(0);
}

.page-header .lead {
  color: var(--text-secondary);
  font-weight: 500;
  transform: translateZ(0);
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,#00FF7F,#39FF14,#00FFBF);
  box-shadow: 0 0 10px var(--primary-neon);
  transform: translateZ(0);
}

/* Animated glow bar */
.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-neon), transparent);
  animation: glowBar 3s ease-in-out infinite;
  transform: translateZ(0);
}

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

/* Admin Stats */
.admin-stats {
  background: var(--bg-2) !important;
  padding: 2rem 0;
}

/* Analytics Cards */
.analytics-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 22px;
  border: 1px solid var(--card-border);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.1);
  transition: all 0.2s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  height: 100%;
}

.analytics-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.2);
}

.analytics-card .card-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid var(--card-border);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
  color: var(--primary-neon);
  font-size: 1.5rem;
  transform: translateZ(0);
  transition: all 0.2s ease;
}

.analytics-card:hover .card-icon {
  transform: scale(1.1);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.3);
}

.analytics-card h5 {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  transform: translateZ(0);
}

.analytics-card h2 {
  color: var(--primary-neon);
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-size: 2rem;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
  transform: translateZ(0);
}

.analytics-card .change-percentage {
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateZ(0);
}

.analytics-card .change-percentage.positive {
  color: var(--accent-green);
}

.analytics-card .change-percentage.negative {
  color: var(--danger);
}

/* Admin Modules */
.admin-modules {
  background: var(--bg-1);
  padding: 2rem 0;
}

.admin-modules h2 {
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 2rem;
  transform: translateZ(0);
}

.module-card {
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 15px;
  border: 1px solid var(--card-border);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.1);
  transition: all 0.2s ease;
  transform: translateZ(0);
  will-change: transform;
  margin-bottom: 1.5rem;
  height: 100%;
}

.module-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.2);
}

.module-card .card-body {
  padding: 1.5rem;
  text-align: center;
}

.module-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  transform: translateZ(0);
}

.module-card .card-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
  transform: translateZ(0);
}

.module-card .card-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  transform: translateZ(0);
}

.module-card .btn {
  border-radius: 8px;
  font-weight: 500;
  min-height: 44px;
  transform: translateZ(0);
  transition: all 0.2s ease;
  will-change: transform;
}

.module-card .btn:hover {
  transform: translateY(-2px);
}

.module-card .btn-primary {
  background: linear-gradient(90deg, #00C3FF, #00FF7F);
  border: none;
  color: #000;
  box-shadow: 0 0 12px rgba(0, 195, 255, 0.3);
}

.module-card .btn-success {
  background: linear-gradient(90deg, #00FF7F, #39FF14);
  border: none;
  color: #000;
  box-shadow: 0 0 12px rgba(0, 255, 127, 0.3);
}

.module-card .btn-warning {
  background: linear-gradient(90deg, #FFD54F, #FFA000);
  border: none;
  color: #000;
  box-shadow: 0 0 12px rgba(255, 213, 79, 0.3);
}

.module-card .btn-info {
  background: linear-gradient(90deg, #00C3FF, #03A9F4);
  border: none;
  color: #000;
  box-shadow: 0 0 12px rgba(0, 195, 255, 0.3);
}

/* Recent Activity */
.recent-activity {
  background: var(--bg-2) !important;
  padding: 2rem 0;
}

.recent-activity h2 {
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 2rem;
  transform: translateZ(0);
}

.activity-card {
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 15px;
  border: 1px solid var(--card-border);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.1);
  transform: translateZ(0);
  will-change: transform;
}

.activity-card .card-body {
  padding: 1.5rem;
}

/* Cards */
.card {
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 15px;
  border: 1px solid var(--card-border);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.1);
  transform: translateZ(0);
  will-change: transform;
}

.card-title {
  color: var(--primary-neon);
  font-weight: 700;
  transform: translateZ(0);
}

.card-body {
  padding: 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.analytics-card {
  animation: fadeInUp 0.5s ease forwards;
  transform: translateZ(0);
}

.analytics-card:nth-child(1) { animation-delay: 0.1s; }
.analytics-card:nth-child(2) { animation-delay: 0.2s; }
.analytics-card:nth-child(3) { animation-delay: 0.3s; }
.analytics-card:nth-child(4) { animation-delay: 0.4s; }

.module-card {
  animation: fadeInUp 0.5s ease forwards;
  transform: translateZ(0);
}

.module-card:nth-child(1) { animation-delay: 0.1s; }
.module-card:nth-child(2) { animation-delay: 0.2s; }
.module-card:nth-child(3) { animation-delay: 0.3s; }
.module-card:nth-child(4) { animation-delay: 0.4s; }

/* Tables */
.table-dark {
  --bs-table-bg: var(--glass);
  --bs-table-striped-bg: rgba(255,255,255,0.07);
  --bs-table-hover-bg: rgba(57,255,20,0.1);
  --bs-table-border-color: rgba(57,255,20,0.15);
  color: var(--text-primary);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(5px);
  transform: translateZ(0);
}

.table-dark thead {
  background: rgba(57,255,20,0.2);
  color: var(--text-primary);
}

.table-dark thead th {
  border-bottom: 1px solid rgba(57,255,20,0.3);
  font-weight: 600;
  text-shadow: 0 0 5px rgba(57, 255, 20, 0.3);
}

.table-dark td, .table-dark th {
  border-color: rgba(57,255,20,0.15);
  padding: 0.75rem;
}

.table-dark td {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.table-dark tr:hover {
  background: rgba(57,255,20,0.15);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

/* Pagination */
.pagination {
  --bs-pagination-color: var(--text-secondary);
  --bs-pagination-bg: var(--glass);
  --bs-pagination-border-color: rgba(57,255,20,0.2);
  --bs-pagination-hover-color: var(--primary-neon);
  --bs-pagination-hover-bg: rgba(57,255,20,0.1);
  --bs-pagination-hover-border-color: rgba(57,255,20,0.3);
  --bs-pagination-focus-color: var(--primary-neon);
  --bs-pagination-focus-bg: rgba(57,255,20,0.1);
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(57,255,20,0.25);
  --bs-pagination-active-color: #000;
  --bs-pagination-active-bg: var(--primary-neon);
  --bs-pagination-active-border-color: var(--primary-neon);
  --bs-pagination-disabled-color: var(--text-secondary);
  --bs-pagination-disabled-bg: var(--glass);
  --bs-pagination-disabled-border-color: rgba(57,255,20,0.1);
  border-radius: 8px;
  backdrop-filter: blur(5px);
  transform: translateZ(0);
}

.page-link {
  transition: all 0.2s ease;
  transform: translateZ(0);
  will-change: transform;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 500;
  min-height: 44px;
  transform: translateZ(0);
  transition: all 0.2s ease;
  will-change: transform;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(90deg, #00C3FF, #00FF7F);
  border: none;
  color: #000;
  box-shadow: 0 0 12px rgba(0, 195, 255, 0.3);
}

.btn-success {
  background: linear-gradient(90deg, #00FF7F, #39FF14);
  border: none;
  color: #000;
  box-shadow: 0 0 12px rgba(0, 255, 127, 0.3);
}

.btn-warning {
  background: linear-gradient(90deg, #FFD54F, #FFA000);
  border: none;
  color: #000;
  box-shadow: 0 0 12px rgba(255, 213, 79, 0.3);
}

.btn-danger {
  background: linear-gradient(90deg, #FF6B6B, #FF4444);
  border: none;
  color: #000;
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.3);
}

.btn-info {
  background: linear-gradient(90deg, #00C3FF, #03A9F4);
  border: none;
  color: #000;
  box-shadow: 0 0 12px rgba(0, 195, 255, 0.3);
}

.btn-accent {
  background: linear-gradient(90deg, #00FF7F, #39FF14);
  border: none;
  color: #000;
  box-shadow: 0 0 12px rgba(0, 255, 127, 0.3);
}

/* Tournament Control Buttons */
.tournament-controls .btn {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  min-width: 100px;
}

.tournament-controls .btn:last-child {
  margin-right: 0;
}

/* Purple Buttons for Brand Promotion */
.btn-purple {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  border: none;
  color: white;
  box-shadow: 0 0 12px rgba(106, 17, 203, 0.3);
}

.btn-purple:hover {
  background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(106, 17, 203, 0.5);
}

.text-purple {
  color: #6a11cb;
}

.card-icon.text-purple {
  background: rgba(106, 17, 203, 0.1);
  border: 1px solid rgba(106, 17, 203, 0.25);
  box-shadow: 0 0 10px rgba(106, 17, 203, 0.2);
  color: #6a11cb;
}

.module-card:hover .card-icon.text-purple {
  box-shadow: 0 0 14px rgba(106, 17, 203, 0.3);
}

/* Mobile Optimization */
@media (max-width: 768px) {
  .page-header {
    padding: 1.5rem 0;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .admin-stats, .admin-modules, .recent-activity {
    padding: 1rem 0;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .analytics-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .analytics-card h2 {
    font-size: 1.5rem;
  }
  
  .module-card {
    margin-bottom: 1rem;
  }
  
  .module-card .card-body {
    padding: 1rem;
  }
  
  .table-dark td, .table-dark th {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .btn {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .tournament-controls .btn {
    min-width: 80px;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }
  
  /* Reduce glow intensity on small screens */
  .analytics-card:hover {
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.15);
  }
  
  .module-card:hover {
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.15);
  }
  
  .page-link:hover {
    box-shadow: 0 0 5px rgba(57, 255, 20, 0.2);
  }
}

/* Navigation Glow */
.navbar-nav .nav-link[href="admin-dashboard.html"] {
  color: #39FF14 !important;
  text-shadow: 0 0 8px rgba(57,255,20,0.6);
  box-shadow: 0 0 12px rgba(57,255,20,0.3), 0 0 22px rgba(57,255,20,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 2px;
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
}

/* Reduce motion for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .analytics-card {
    animation: none;
  }
  
  .module-card {
    animation: none;
  }
  
  .page-header::before {
    animation: none;
  }
}