/* ===== GAMING HUB THEME - Neon City ===== */
/* Purple/Cyan/Pink color scheme with gaming aesthetics */

/* ===== DASHBOARD LAYOUT: Main + Sidebar ===== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

.dashboard-main {
  min-width: 0;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: calc(var(--header-height, 70px) + 1.5rem);
}

@media (max-width: 1200px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
  }
}

:root {
  /* Neon City Colors */
  --neon-purple: #8b5cf6;
  --neon-purple-light: #a78bfa;
  --neon-purple-dark: #7c3aed;
  --neon-cyan: #06b6d4;
  --neon-cyan-light: #22d3ee;
  --neon-pink: #ec4899;
  --neon-pink-light: #f472b6;
  --neon-gold: #fbbf24;
  --neon-green: #22c55e;

  /* Background colors */
  --bg-void: #0a0a14;
  --bg-deep: #0d0f1a;
  --bg-card: #1a1d2e;
  --bg-card-hover: #1f2338;
  --bg-elevated: #242842;

  /* Text colors */
  --text-bright: #ffffff;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Gradients */
  --gradient-neon: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  --gradient-fire: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  --gradient-sunset: linear-gradient(135deg, var(--neon-pink), var(--neon-gold));
  --gradient-card: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(6, 182, 212, 0.05));

  /* Shadows */
  --shadow-neon-purple: 0 0 20px rgba(139, 92, 246, 0.3);
  --shadow-neon-cyan: 0 0 20px rgba(6, 182, 212, 0.3);
  --shadow-neon-pink: 0 0 20px rgba(236, 72, 153, 0.3);
  --glow-intense: 0 0 30px rgba(139, 92, 246, 0.4), 0 0 60px rgba(6, 182, 212, 0.2);
}

/* ===== HERO SECTION ===== */
.gaming-hero {
  background: var(--gradient-card);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.gaming-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-neon);
  background-size: 200% 100%;
  animation: gradient-flow 3s linear infinite;
}

.gaming-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.hero-content {
  display: flex;
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              var(--gradient-neon) border-box;
  transition: all 0.3s ease;
}

.hero-avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--glow-intense);
}

.hero-level-badge {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-neon);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: var(--shadow-neon-purple);
}

.hero-rank-name {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-main {
  flex: 1;
  min-width: 0;
}

.hero-greeting {
  margin-bottom: 0.5rem;
}

.hero-greeting h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-bright);
  margin: 0;
}

.hero-greeting p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0.25rem 0 0;
}

/* ===== XP PROGRESS BAR ===== */
.xp-progress-wrapper {
  margin: 1.25rem 0;
}

.xp-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.xp-progress-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.xp-progress-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neon-purple-light);
}

.xp-progress-bar {
  height: 10px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.xp-progress-fill {
  height: 100%;
  background: var(--gradient-neon);
  border-radius: 10px;
  position: relative;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.xp-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: shimmer-xp 2s ease-in-out infinite;
}

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

.xp-progress-glow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: var(--neon-cyan);
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.8;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: translateY(-50%) scale(1); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

/* ===== QUICK STATS ROW ===== */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero-stat {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.5s ease;
}

.hero-stat:hover::before {
  left: 100%;
}

.hero-stat:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon-purple);
}

.hero-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--neon-purple-light);
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* Stat variations */
.hero-stat--xp .hero-stat-value { color: var(--neon-purple-light); }
.hero-stat--level .hero-stat-value { color: var(--neon-cyan); }
.hero-stat--wins .hero-stat-value { color: var(--neon-gold); }
.hero-stat--streak .hero-stat-value { color: var(--neon-pink); }

/* ===== TAB NAVIGATION ===== */
.gaming-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.5rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.gaming-tab {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.gaming-tab:hover {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.1);
}

.gaming-tab.active {
  background: var(--gradient-neon);
  color: white;
  box-shadow: var(--shadow-neon-purple);
}

.gaming-tab i {
  font-size: 1rem;
}

/* ===== TAB CONTENT ===== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* ===== ACTIVITY FEED ===== */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.activity-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateX(4px);
}

.activity-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-card);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

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

.activity-xp {
  font-weight: 700;
  color: var(--neon-green);
  font-size: 0.9rem;
  white-space: nowrap;
}

.activity-xp.negative {
  color: var(--neon-pink);
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.quick-action-btn:hover {
  background: var(--gradient-card);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateX(4px);
  box-shadow: var(--shadow-neon-purple);
}

.quick-action-btn i {
  font-size: 1.25rem;
  color: var(--neon-purple-light);
}

.quick-action-btn--daily {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(6, 182, 212, 0.1));
  border-color: rgba(34, 197, 94, 0.3);
}

.quick-action-btn--daily:hover {
  border-color: rgba(34, 197, 94, 0.5);
}

.quick-action-btn--daily i {
  color: var(--neon-green);
}

.quick-action-btn--claimed {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== MINI LEADERBOARD ===== */
.mini-leaderboard {
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 16px;
  padding: 1.25rem;
}

.mini-leaderboard-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mini-leaderboard-title i {
  color: var(--neon-gold);
}

.mini-lb-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mini-lb-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.mini-lb-item:hover {
  background: rgba(139, 92, 246, 0.08);
}

.mini-lb-item--you {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.mini-lb-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 8px;
  flex-shrink: 0;
}

.mini-lb-rank--1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1d2e; }
.mini-lb-rank--2 { background: linear-gradient(135deg, #c0c0c0, #a3a3a3); color: #1a1d2e; }
.mini-lb-rank--3 { background: linear-gradient(135deg, #cd7f32, #b87333); color: #1a1d2e; }
.mini-lb-rank--other { background: rgba(139, 92, 246, 0.2); color: var(--text-secondary); }

.mini-lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              var(--gradient-neon) border-box;
}

.mini-lb-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-lb-xp {
  font-size: 0.8rem;
  color: var(--neon-purple-light);
  font-weight: 600;
}

/* ===== GAMING CARDS ===== */
.gaming-card {
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.gaming-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: var(--shadow-neon-purple);
}

.gaming-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gaming-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gaming-card-title i {
  color: var(--neon-purple-light);
}

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

/* ===== LEVEL UP CELEBRATION ===== */
.level-up-celebration {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 20, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.level-up-celebration.active {
  opacity: 1;
  visibility: visible;
}

.level-up-content {
  text-align: center;
  animation: level-up-bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes level-up-bounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.level-up-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: level-up-glow 1s ease-in-out infinite alternate;
}

@keyframes level-up-glow {
  from { filter: drop-shadow(0 0 20px var(--neon-purple)); }
  to { filter: drop-shadow(0 0 40px var(--neon-cyan)); }
}

.level-up-title {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.level-up-level {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.level-up-rank {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: var(--glow-intense);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .gaming-tabs {
    flex-wrap: wrap;
  }

  .gaming-tab {
    flex: 1 1 45%;
  }

  .hero-greeting h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .hero-stat {
    padding: 0.75rem;
  }

  .hero-stat-value {
    font-size: 1.25rem;
  }

  .gaming-tabs {
    padding: 0.35rem;
  }

  .gaming-tab {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .gaming-tab span {
    display: none;
  }

  .gaming-tab i {
    margin: 0;
  }
}
