/* Settings Esports Theme (scoped to body.settings-page) */
body.settings-page {
  --bg-1: #050505;
  --bg-2: #0F0F0F;
  --bg-3: #1A1A1A;
  --glass: rgba(255,255,255,0.05);
  --glass-2: rgba(255,255,255,0.08);
  --text-primary: #FFFFFF;
  --text-secondary: #A7FFB5;
  --text-tertiary: #D1D5DB;
  --text-label: #D1D5DB;
  --text-toggle-active: #39FF14;
  --text-toggle-inactive: #6B7280;
  --primary-neon: #39FF14;
  --secondary: #00FFBF;
  --card-glow: 0 0 12px #39FF14;
  --button-glow: 0 0 15px #39FF14;
  --card-gradient: linear-gradient(145deg, #0F0F0F, #1A1A1A);
  --danger: #FF4444;
  --warning: #FFD700;
  --success: #39FF14;
  background: var(--bg-1);
  color: var(--text-primary);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Page Header */
.page-header {
  background: var(--card-gradient) !important;
  color: var(--text-primary) !important;
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(57,255,20,0.2);
  box-shadow: var(--card-glow);
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(57,255,20,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  z-index: 0;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-weight: 800;
  text-shadow: 0 0 10px rgba(57,255,20,0.5);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.page-header .lead {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Settings Content */
.settings-content {
  padding: 2rem 0;
}

/* Glass Cards */
.setting-section {
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 18px;
  border: 1px solid rgba(57,255,20,0.25);
  box-shadow: 0 0 12px rgba(57,255,20,0.1);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.setting-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(57,255,20,0.25);
  border-color: rgba(57,255,20,0.4);
}

.setting-section h3 {
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.setting-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-neon);
  border-radius: 3px;
  box-shadow: 0 0 8px var(--primary-neon);
}

/* Form Elements */
.form-label {
  color: var(--text-label);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.form-control, .form-select {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(57,255,20,0.25);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px rgba(57,255,20,0.1);
  height: auto;
  min-height: 44px;
}

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

.form-control::placeholder {
  color: var(--text-toggle-inactive);
  transition: opacity 0.3s ease;
}

.form-control:focus::placeholder {
  opacity: 0.7;
}

/* Toggle Switches */
.form-check-input {
  width: 2.5em;
  height: 1.5em;
  background-color: var(--text-toggle-inactive);
  border-color: var(--text-toggle-inactive);
  border-radius: 2em;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.form-check-input:checked {
  background-color: var(--primary-neon);
  border-color: var(--primary-neon);
  box-shadow: 0 0 10px rgba(57,255,20,0.5);
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(57,255,20,0.25);
  border-color: var(--primary-neon);
}

.form-check-input:checked::after {
  background-color: #000;
}

.form-check-label {
  color: var(--text-primary);
  font-weight: 500;
  margin-left: 0.5rem;
}

/* Buttons */
.btn {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary-neon), var(--secondary));
  border: none;
  color: #000 !important;
  box-shadow: 0 0 15px rgba(57,255,20,0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(57,255,20,0.6);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-outline-danger {
  border: 1px solid var(--danger);
  color: var(--danger);
  background: transparent;
}

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

.btn-danger {
  background: linear-gradient(90deg, #ff4444, #ff6b6b);
  border: none;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(255,68,68,0.4);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255,68,68,0.6);
}

/* Alert Boxes */
.alert {
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid;
}

.alert-success {
  background: rgba(57,255,20,0.1);
  border-color: rgba(57,255,20,0.3);
  color: var(--text-toggle-active);
  box-shadow: 0 0 10px rgba(57,255,20,0.2);
}

.alert-warning {
  background: rgba(255,215,0,0.1);
  border-color: rgba(255,215,0,0.3);
  color: var(--warning);
  box-shadow: 0 0 10px rgba(255,215,0,0.2);
}

/* Divider */
.divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 1.5rem 0;
}

/* 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 30px rgba(57,255,20,0.3);
}

.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%);
}

/* List Group */
.list-group-item {
  background: transparent;
  border-color: rgba(57,255,20,0.1);
  color: var(--text-primary);
  transition: all 0.3s ease;
  transform: translateZ(0);
}

.list-group-item:hover {
  background: rgba(57,255,20,0.05);
  border-color: rgba(57,255,20,0.2);
}

.list-group-item.active {
  background: rgba(57,255,20,0.15);
  border-color: rgba(57,255,20,0.3);
  color: var(--text-primary);
  box-shadow: 0 0 10px rgba(57,255,20,0.2);
}

/* Navigation */
.navbar {
  background: linear-gradient(180deg, rgba(18,24,42,0.95), rgba(18,24,42,0.8)) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.navbar-nav .nav-link.active {
  color: var(--primary-neon) !important;
  text-shadow: 0 0 8px rgba(57,255,20,0.6);
  box-shadow: 0 0 12px rgba(57,255,20,0.3);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 2px;
  transition: all 0.3s ease;
}

/* Wallet Info */
.wallet-info {
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 5px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  transform: translateZ(0);
}

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

.wallet-info i {
  color: var(--primary-neon);
}

.wallet-info span {
  font-weight: 600;
  color: var(--primary-neon);
}

/* Footer */
footer {
  background: linear-gradient(180deg, rgba(18,24,42,0.95), rgba(18,24,42,0.8)) !important;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 40px;
}

/* Animations */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

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

.pulse-animation {
  animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-header {
    padding: 1.5rem 0;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .setting-section {
    padding: 1.5rem;
  }
  
  .form-control, .form-select {
    padding: 0.8rem;
    font-size: 1rem;
  }
  
  .btn {
    padding: 0.8rem 1.2rem;
  }
  
  /* Reduce animations on mobile */
  .setting-section,
  .btn,
  .form-control,
  .form-select {
    transition: none !important;
    transform: none !important;
  }
  
  .setting-section:hover,
  .btn:hover {
    transform: none !important;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 1.75rem;
  }
  
  .setting-section {
    padding: 1.25rem;
  }
  
  .form-label {
    font-size: 0.9rem;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .page-header::before,
  .pulse-animation {
    animation: none !important;
  }
  
  .setting-section,
  .btn,
  .form-control,
  .form-select {
    transition: none !important;
  }
  
  .setting-section:hover,
  .btn:hover {
    transform: none !important;
  }
}

/* Focus Styles for Accessibility */
.form-control:focus,
.form-select:focus,
.btn:focus,
.form-check-input:focus {
  outline: 2px solid var(--primary-neon);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  body.settings-page {
    --glass: rgba(0,0,0,0.8);
  }
  
  .setting-section,
  .form-control,
  .form-select {
    border: 2px solid var(--primary-neon);
  }
}