/* Admin User Management Esports Theme (scoped to body.admin-users-page) */
body.admin-users-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 16px #39FF14;
  --danger: #FF4444;
  --warn: #FFD54F;
  --safe: #39FF14;
  --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 Navigation */
.admin-nav {
  background: var(--bg-2) !important;
  padding: 1rem 0;
  transform: translateZ(0);
}

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

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

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

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

.btn-group .btn-outline-primary {
  background: transparent;
  border: 1px solid rgba(57,255,20,0.3);
  color: var(--text-secondary);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.1);
}

.btn-group .btn-outline-primary:hover {
  background: rgba(57,255,20,0.1);
  border-color: var(--primary-neon);
  color: var(--primary-neon);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.2);
}

.btn-group .btn-outline-primary.active {
  background: rgba(57,255,20,0.15);
  border-color: var(--primary-neon);
  color: var(--primary-neon);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.3);
}

/* Main Content */
.admin-content {
  background: var(--bg-1);
  padding: 2rem 0;
  transform: translateZ(0);
}

/* Filter Bar */
.filter-bar {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid var(--card-border);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transform: translateZ(0);
  will-change: transform;
}

.filter-bar .form-control {
  background: #050505;
  border: 1px solid rgba(57,255,20,0.35);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  min-height: 44px;
}

.filter-bar .form-control:focus {
  background: #0a0a0a;
  border-color: var(--primary-neon);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.5);
  color: var(--text-primary);
  outline: none;
}

.filter-btn {
  border-radius: 8px;
  font-weight: 500;
  min-height: 44px;
  transform: translateZ(0);
  transition: all 0.2s ease;
  will-change: transform;
  margin: 0 2px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
}

.filter-btn:hover {
  transform: translateY(-2px);
  background: rgba(57,255,20,0.1);
  border-color: rgba(57,255,20,0.3);
  color: var(--primary-neon);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.2);
}

.filter-btn.active {
  background: rgba(57,255,20,0.2);
  border-color: var(--primary-neon);
  color: var(--primary-neon);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.3);
}

/* Cards */
.card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  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;
  margin-bottom: 1.5rem;
}

.card-header {
  background: rgba(57,255,20,0.1);
  border-bottom: 1px solid rgba(57,255,20,0.2);
  padding: 1rem 1.25rem;
  transform: translateZ(0);
}

.card-header h5 {
  color: var(--primary-neon);
  font-weight: 600;
  margin: 0;
  transform: translateZ(0);
}

.card-body {
  padding: 1.5rem;
}

/* 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 tr {
  border: 1px solid var(--card-border);
  transition: all 0.2s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
}

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

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

/* User Row Animation */
.user-row {
  animation: fadeInUp 0.3s ease forwards;
  transform: translateZ(0);
}

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

/* User Avatar */
.user-avatar {
  border: 2px solid var(--primary-neon);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
  transition: all 0.2s ease;
}

.user-avatar:hover {
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.5);
  transform: scale(1.05);
}

/* Status Pills */
.status-pill {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
  transform: translateZ(0);
}

.status-pill.active {
  background: var(--safe) !important;
  color: #000;
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
  animation: pulseGlow 1.5s ease-in-out infinite;
}

.status-pill.banned {
  background: var(--danger) !important;
  color: #000;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

.status-pill.pending {
  background: var(--warn) !important;
  color: #000;
  box-shadow: 0 0 8px rgba(255, 213, 79, 0.5);
}

.status-pill.admin {
  background: var(--danger) !important;
  color: #000;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

.status-pill.moderator {
  background: var(--warn) !important;
  color: #000;
  box-shadow: 0 0 8px rgba(255, 213, 79, 0.5);
}

.status-pill.user {
  background: var(--primary-neon) !important;
  color: #000;
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
  }
  50% {
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.8);
  }
  100% {
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
  }
}

/* Action Buttons */
.action-btn {
  background: rgba(57,255,20,0.1);
  border: 1px solid rgba(57,255,20,0.3);
  color: var(--primary-neon);
  border-radius: 8px;
  padding: 0.5rem;
  transition: all 0.2s ease;
  transform: translateZ(0);
  will-change: transform;
  box-shadow: 0 0 6px rgba(57, 255, 20, 0.2);
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background: rgba(57,255,20,0.2);
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.action-btn.danger {
  background: rgba(255,68,68,0.1);
  border: 1px solid rgba(255,68,68,0.3);
  color: var(--danger);
  box-shadow: 0 0 6px rgba(255, 68, 68, 0.2);
}

.action-btn.danger:hover {
  background: rgba(255,68,68,0.2);
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

/* User Details Modal */
.modal-content {
  background: linear-gradient(180deg, rgba(10,10,10,0.95), rgba(10,10,10,0.85));
  color: var(--text-primary);
  border: 1px solid rgba(57,255,20,0.2);
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(57,255,20,0.2);
  transform: translateZ(0);
}

.modal-header {
  border-bottom: 1px solid rgba(57,255,20,0.2);
  background: rgba(57,255,20,0.05);
}

.modal-footer {
  border-top: 1px solid rgba(57,255,20,0.2);
  background: rgba(57,255,20,0.05);
}

.modal-content .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.user-details-avatar {
  border: 3px solid var(--primary-neon);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
  animation: softPulse 2s ease-in-out infinite;
}

@keyframes softPulse {
  0% {
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
  }
  50% {
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.6);
  }
  100% {
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
  }
}

/* Form Controls */
.form-control, .form-select {
  background: #050505;
  border: 1px solid rgba(57,255,20,0.35);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  min-height: 44px;
}

.form-control:focus, .form-select:focus {
  background: #0a0a0a;
  border-color: var(--primary-neon);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.5);
  color: var(--text-primary);
  outline: none;
}

.form-control:disabled, .form-control[readonly] {
  background: rgba(10,10,10,0.5);
  color: var(--text-secondary);
}

.form-label {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
  transform: translateZ(0);
}

.form-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transform: translateZ(0);
}

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

/* 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);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  animation: fadeIn 0.5s ease forwards;
}

.empty-state i {
  font-size: 3rem;
  color: var(--primary-neon);
  margin-bottom: 1rem;
  text-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

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

/* Mobile Optimization */
@media (max-width: 768px) {
  .page-header {
    padding: 1.5rem 0;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .admin-content {
    padding: 1rem 0;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .filter-bar {
    padding: 1rem;
  }
  
  .form-control, .form-select {
    padding: 0.75rem;
    min-height: 44px;
  }
  
  textarea.form-control {
    min-height: 100px;
  }
  
  .btn {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .table-dark td, .table-dark th {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .user-row {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
  }
  
  .user-row > div {
    margin-bottom: 0.5rem;
  }
  
  .user-row .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .action-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 0.4rem;
    font-size: 0.9rem;
  }
  
  /* Reduce glow intensity on small screens */
  .card:hover {
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.15);
  }
  
  .table-dark tr:hover {
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.15);
  }
  
  .action-btn:hover {
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.2);
  }
  
  .action-btn.danger:hover {
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.2);
  }
}

/* Navigation Glow */
.navbar-nav .nav-link[href="admin-users.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;
  }
  
  .user-row {
    animation: none;
  }
  
  .page-header::before {
    animation: none;
  }
  
  .status-pill.active {
    animation: none;
  }
  
  .user-details-avatar {
    animation: none;
  }
  
  .empty-state {
    animation: none;
  }
}