/* Wallet Esports Theme (scoped to body.wallet-page) */
body.wallet-page {
  --bg-1: #050505;
  --bg-2: #0A0A0A;
  --glass: rgba(255,255,255,0.05);
  --text: #ffffff;
  --muted: #9CA3AF;
  --grey-green: #9FFFB7;
  --primary-neon: #39FF14;
  --accent-green: #00FF7F;
  --neon-orange: #FF8F39;
  --card-bg: rgba(15,15,15,0.8);
  background: var(--bg-1);
  color: var(--text);
  font-family: 'Roboto', sans-serif;
}

/* Wallet Header */
.wallet-header {
  background: linear-gradient(135deg, var(--primary-neon), var(--accent-green)) !important;
  color: #000 !important;
  padding: 2rem 0;
}

.wallet-header h1 {
  text-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.wallet-balance-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(57,255,20,0.25);
  box-shadow: 0 0 12px rgba(57,255,20,0.3);
  padding: 1.5rem !important;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  animation: pulseGlow 3s ease-in-out infinite;
}

.wallet-balance-card:hover {
  box-shadow: 0 0 22px rgba(57,255,20,0.5);
  transform: scale(1.01);
}

.wallet-balance-card .text-muted {
  color: var(--grey-green) !important;
}

.wallet-balance-card h2 {
  color: var(--primary-neon);
  text-shadow: 0 0 8px rgba(57,255,20,0.5);
  font-weight: 700;
  transform: translateZ(0);
  will-change: transform, opacity;
  animation: subtlePulse 2s ease-in-out infinite;
}

/* Current Balance Text Styling */
.current-balance-label {
  color: #FFFFFF !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem !important;
  text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
     -1px 1px 0 #000,
     1px 1px 0 #000,
     0 0 5px rgba(0, 0, 0, 0.8) !important;
}

.current-balance-amount {
  color: #FFFFFF !important;
  text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
     -1px 1px 0 #000,
     1px 1px 0 #000,
     0 0 10px rgba(0, 0, 0, 0.9) !important;
  font-weight: 800 !important;
  font-size: 2.5rem !important;
}

#walletBalance {
  color: #FFFFFF !important;
  text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
     -1px 1px 0 #000,
     1px 1px 0 #000,
     0 0 10px rgba(0, 0, 0, 0.9) !important;
}

/* Wallet Actions */
.wallet-actions {
  padding: 2rem 0;
}

.wallet-actions .card-title {
  color: #FFFFFF !important;
  font-weight: 600;
  text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
     -1px 1px 0 #000,
     1px 1px 0 #000,
     0 0 3px rgba(0, 0, 0, 0.8);
}

.wallet-actions .card-text {
  color: #FFFFFF !important;
  font-size: 0.9rem;
  text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
     -1px 1px 0 #000,
     1px 1px 0 #000,
     0 0 3px rgba(0, 0, 0, 0.8);
}

.wallet-actions h2 {
  color: #FFFFFF !important;
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
     -1px 1px 0 #000,
     1px 1px 0 #000,
     0 0 5px rgba(0, 0, 0, 0.8);
}

.action-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 15px;
  border: 1px solid rgba(57,255,20,0.15);
  box-shadow: 0 0 12px rgba(57,255,20,0.1);
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  height: 100%;
}

.action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(57,255,20,0.3);
}

.action-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 rgba(57,255,20,0.3);
  box-shadow: 0 0 8px rgba(57,255,20,0.2);
}

.action-icon.bg-success {
  background: rgba(57,255,20,0.1);
  border: 1px solid rgba(57,255,20,0.3);
}

.action-icon.bg-primary {
  background: rgba(0,255,127,0.1);
  border: 1px solid rgba(0,255,127,0.3);
}

.action-icon.bg-info {
  background: rgba(13,202,240,0.1);
  border: 1px solid rgba(13,202,240,0.3);
}

/* Buttons */
.btn-success {
  background: linear-gradient(135deg, var(--primary-neon), var(--accent-green));
  border: none;
  color: #000000 !important;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 0 14px rgba(57,255,20,0.4);
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  min-height: 44px;
  text-shadow: none;
}

.btn-success:hover {
  transform: scale(1.03);
  box-shadow: 0 0 22px rgba(57,255,20,0.6);
}

.btn-success:active {
  transform: scale(0.98);
}

.btn-primary {
  background: transparent;
  border: 1px solid var(--primary-neon);
  color: #FFFFFF !important;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 0 14px rgba(57,255,20,0.2);
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  min-height: 44px;
  text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
     -1px 1px 0 #000,
     1px 1px 0 #000;
}

.btn-primary:hover {
  background: rgba(57,255,20,0.1);
  transform: scale(1.03);
  box-shadow: 0 0 22px rgba(57,255,20,0.4);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-outline-info {
  border: 1px solid #0dcaf0;
  color: #FFFFFF !important;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 0 14px rgba(13,202,240,0.2);
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  min-height: 44px;
  text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
     -1px 1px 0 #000,
     1px 1px 0 #000;
}

.btn-outline-info:hover {
  background: rgba(13,202,240,0.1);
  transform: scale(1.03);
  box-shadow: 0 0 22px rgba(13,202,240,0.4);
}

.btn-outline-info:active {
  transform: scale(0.98);
}

/* Transaction History */
.transaction-history {
  padding: 2rem 0;
  background: var(--bg-2) !important;
}

.transaction-history h2 {
  color: var(--text);
  margin-bottom: 1.5rem;
}

.transaction-history .card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 15px;
  border: 1px solid rgba(57,255,20,0.15);
  box-shadow: 0 0 12px rgba(57,255,20,0.1);
  transform: translateZ(0);
  will-change: transform;
}

.table {
  color: var(--text);
  margin-bottom: 0;
}

.table thead th {
  color: var(--grey-green);
  border-bottom: 1px solid rgba(57,255,20,0.25);
  font-weight: 600;
}

.table td {
  border-top: 1px solid rgba(57,255,20,0.15);
  vertical-align: middle;
}

.table-hover tbody tr {
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: transform;
}

.table-hover tbody tr:hover {
  background: rgba(57,255,20,0.05);
  transform: translateY(-2px);
}

.transaction-amount.positive {
  color: var(--primary-neon);
  font-weight: 600;
}

.transaction-amount.negative {
  color: var(--neon-orange);
  font-weight: 600;
}

/* Transaction Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  transform: translateZ(0);
  will-change: transform;
}

.status-badge.success {
  background: rgba(57, 255, 20, 0.15);
  color: var(--primary-neon);
  border: 1px solid rgba(57, 255, 20, 0.3);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

.status-badge.pending {
  background: rgba(255, 213, 79, 0.15);
  color: var(--neon-orange);
  border: 1px solid rgba(255, 213, 79, 0.3);
  box-shadow: 0 0 8px rgba(255, 213, 79, 0.3);
}

.status-badge.failed {
  background: rgba(255, 68, 68, 0.15);
  color: #FF4444;
  border: 1px solid rgba(255, 68, 68, 0.3);
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 2rem;
}

.loading-state .spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2rem;
}

.empty-state-icon {
  font-size: 3rem;
  color: var(--primary-neon);
  margin-bottom: 1rem;
}

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

/* Modals */
.modal-content {
  background: linear-gradient(180deg, rgba(10,10,10,0.95), rgba(10,10,10,0.85));
  color: var(--text);
  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%);
}

/* Form Controls */
.form-control, .form-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(57,255,20,0.2);
  color: var(--text);
  border-radius: 8px;
  transform: translateZ(0);
}

.form-control:focus, .form-select:focus {
  background: rgba(255,255,255,0.08);
  border-color: var(--primary-neon);
  box-shadow: 0 0 0 0.25rem rgba(57,255,20,.15);
  color: var(--text);
}

.form-control:disabled, .form-control[readonly] {
  background: rgba(255,255,255,0.03);
  color: var(--muted);
}

.form-label {
  color: var(--grey-green);
  font-weight: 500;
}

.form-text {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Alerts */
.alert {
  border-radius: 8px;
  border: none;
}

.alert-warning {
  background: linear-gradient(135deg, rgba(255,143,57,0.2), rgba(255,143,57,0.1));
  color: var(--neon-orange);
  border: 1px solid rgba(255,143,57,0.3);
}

.alert-info {
  background: linear-gradient(135deg, rgba(57,255,20,0.2), rgba(0,255,127,0.1));
  color: var(--primary-neon);
  border: 1px solid rgba(57,255,20,0.3);
}

/* Divider */
.neon-divider {
  height: 1px;
  background: linear-gradient(90deg, #00FFBF, #39FF14, #00FFBF);
  margin: 1rem 0;
  border: none;
}

/* Animations */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 12px rgba(57,255,20,0.3);
  }
  50% {
    box-shadow: 0 0 22px rgba(57,255,20,0.5);
  }
  100% {
    box-shadow: 0 0 12px rgba(57,255,20,0.3);
  }
}

@keyframes subtlePulse {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.01);
  }
  100% {
    opacity: 0.9;
    transform: scale(1);
  }
}

/* Fade up animation for transaction rows */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.transaction-row {
  animation: fadeUp 0.5s ease forwards;
  transform: translateZ(0);
}

.transaction-row:nth-child(1) { animation-delay: 0.1s; }
.transaction-row:nth-child(2) { animation-delay: 0.2s; }
.transaction-row:nth-child(3) { animation-delay: 0.3s; }
.transaction-row:nth-child(4) { animation-delay: 0.4s; }
.transaction-row:nth-child(5) { animation-delay: 0.5s; }

/* Mobile Optimization */
@media (max-width: 768px) {
  .wallet-header {
    padding: 1rem 0;
  }
  
  .wallet-balance-card {
    padding: 1rem !important;
    margin-top: 1rem;
  }
  
  .wallet-balance-card h2 {
    font-size: 1.8rem;
  }
  
  .wallet-actions {
    padding: 1rem 0;
  }
  
  .wallet-actions .card {
    margin-bottom: 1rem;
  }
  
  .btn-success, .btn-primary {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .transaction-history {
    padding: 1rem 0;
  }
  
  .table thead {
    display: none;
  }
  
  .table tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid rgba(57,255,20,0.15);
    border-radius: 10px;
    padding: 1rem;
  }
  
  .table td {
    display: block;
    text-align: right;
    padding: 0.25rem 0.5rem;
    border: none;
  }
  
  .table td:before {
    content: attr(data-label) ": ";
    float: left;
    font-weight: bold;
    color: var(--grey-green);
  }
}

/* Navigation Glow */
.navbar-nav .nav-link.active {
  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;
}

/* Wallet Info in Navbar */
.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);
  will-change: transform;
}

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

/* 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;
  }
  
  .wallet-balance-card {
    animation: none;
  }
  
  .wallet-balance-card h2 {
    animation: none;
  }
  
  .transaction-row {
    animation: none;
  }
}