/**
 * User Dashboard Styles
 * Modern, responsive design for the user dashboard
 */

/* Dashboard Container */
.user-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.user-dashboard.hidden {
  display: none;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e1e5e9;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #4285f4;
  object-fit: cover;
}

.user-details h2 {
  margin: 0;
  font-size: 24px;
  color: #1a1a1a;
}

.user-level {
  margin: 5px 0 0 0;
  color: #666;
  font-weight: 500;
}

/* Navigation */
.dashboard-nav {
  display: flex;
  gap: 10px;
}

.nav-btn {
  padding: 10px 20px;
  border: 2px solid #e1e5e9;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  border-color: #4285f4;
  color: #4285f4;
}

.nav-btn.active {
  background: #4285f4;
  border-color: #4285f4;
  color: white;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

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

.stat-icon {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9em;
  opacity: 0.9;
}

/* Recent Activity */
.recent-activity {
  margin-bottom: 30px;
}

.recent-activity h3 {
  margin-bottom: 15px;
  color: #1a1a1a;
}

.recent-games-list {
  background: white;
  border-radius: 12px;
  border: 1px solid #e1e5e9;
  overflow: hidden;
}

.recent-game {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.recent-game:last-child {
  border-bottom: none;
}

.recent-game:hover {
  background-color: #f8f9fa;
}

.game-icon {
  font-size: 1.5em;
  margin-right: 15px;
}

.game-info {
  flex: 1;
}

.game-name {
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 3px;
}

.game-meta {
  font-size: 0.9em;
  color: #666;
}

.game-score {
  font-weight: bold;
  color: #666;
  font-size: 1.1em;
}

.game-score.won {
  color: #34a853;
}

/* Quick Actions */
.quick-actions h3 {
  margin-bottom: 15px;
  color: #1a1a1a;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.action-btn {
  padding: 15px 20px;
  border: 2px solid #4285f4;
  background: white;
  color: #4285f4;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: #4285f4;
  color: white;
}

/* Game Statistics */
.game-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.game-stat-card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.game-stat-card h4 {
  margin: 0 0 15px 0;
  color: #1a1a1a;
  font-size: 18px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.stat-row:last-child {
  border-bottom: none;
}

/* Achievements */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.achievement-card {
  display: flex;
  align-items: center;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #e1e5e9;
  background: white;
  position: relative;
  transition: all 0.2s ease;
}

.achievement-card.unlocked {
  border-color: #34a853;
  background: linear-gradient(135deg, #f0fff4 0%, #e8f5e8 100%);
}

.achievement-card.locked {
  opacity: 0.6;
}

.achievement-icon {
  font-size: 2.5em;
  margin-right: 15px;
}

.achievement-info h4 {
  margin: 0 0 5px 0;
  color: #1a1a1a;
}

.achievement-info p {
  margin: 0;
  color: #666;
  font-size: 0.9em;
}

.achievement-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #34a853;
  color: white;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Leaderboards */
.leaderboard-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.leaderboard-filters select {
  padding: 10px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  background: white;
  font-size: 14px;
}

.leaderboard-list {
  background: white;
  border-radius: 12px;
  border: 1px solid #e1e5e9;
  overflow: hidden;
}

.leaderboard-entry {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.leaderboard-entry:last-child {
  border-bottom: none;
}

.leaderboard-entry.current-user {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-left: 4px solid #f39c12;
}

.rank {
  font-weight: bold;
  font-size: 1.2em;
  margin-right: 20px;
  min-width: 40px;
  color: #666;
}

.player-info {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
}

.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e1e5e9;
}

.player-name {
  font-weight: 500;
  color: #1a1a1a;
}

.score {
  font-weight: bold;
  font-size: 1.1em;
  color: #4285f4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .dashboard-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .stat-card {
    padding: 20px 15px;
  }
  
  .action-buttons {
    grid-template-columns: 1fr;
  }
  
  .leaderboard-filters {
    flex-direction: column;
  }
}

/* Loading and Error States */
.loading, .error, .no-data, .no-games {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-style: italic;
}

.error {
  color: #ea4335;
}

/* Sign-in Prompts */
.dashboard-signin, .dashboard-upgrade {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  margin: 20px 0;
}

.dashboard-signin h2, .dashboard-upgrade h2 {
  margin-bottom: 15px;
  font-size: 28px;
}

.dashboard-signin p, .dashboard-upgrade p {
  margin-bottom: 25px;
  font-size: 16px;
  opacity: 0.9;
}

.btn-primary {
  background: white;
  color: #4285f4;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
}

/* Enhanced Dashboard Leaderboard Styles */
.dashboard-leaderboard-container {
  background: rgba(15, 15, 34, 0.8);
  border: 1px solid rgba(0, 204, 255, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.leaderboard-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.1) 0%, rgba(0, 150, 255, 0.05) 100%);
  border-bottom: 1px solid rgba(0, 204, 255, 0.2);
}

.leaderboard-header h3 {
  color: #00ccff;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.leaderboard-filters {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.game-filter,
.period-filter {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 204, 255, 0.3);
  border-radius: 8px;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.game-filter:hover,
.period-filter:hover,
.game-filter:focus,
.period-filter:focus {
  background: rgba(0, 204, 255, 0.2);
  border-color: #00ccff;
  outline: none;
}

.game-filter option,
.period-filter option {
  background: #1a1a2e;
  color: white;
}

/* User Rank Section */
.user-rank-prompt,
.user-rank-info {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  border-bottom: 1px solid rgba(0, 204, 255, 0.2);
  text-align: center;
}

.user-rank-prompt p {
  color: #e2e8f0;
  margin-bottom: 1rem;
}

.sign-in-btn {
  background: linear-gradient(135deg, #00ccff 0%, #0099cc 100%);
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sign-in-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 204, 255, 0.4);
}

.rank-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-card.top-rank {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%);
  border-color: #FFD700;
}

.rank-card.good-rank {
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.2) 0%, rgba(0, 204, 255, 0.1) 100%);
  border-color: #00ccff;
}

.rank-number {
  font-size: 2rem;
  font-weight: bold;
  color: #00ccff;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.rank-details {
  text-align: left;
}

.player-name {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

.rank-text {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.encouragement {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.encouragement.gold {
  background: rgba(255, 215, 0, 0.2);
  color: #FFD700;
}

.encouragement.medal {
  background: rgba(192, 192, 192, 0.2);
  color: #C0C0C0;
}

.encouragement.good {
  background: rgba(0, 204, 255, 0.2);
  color: #00ccff;
}

.encouragement.decent {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

/* Leaderboard Content */
.leaderboard-content {
  padding: 1.5rem;
  max-height: 600px;
  overflow-y: auto;
}

.loading-spinner {
  text-align: center;
  color: #00ccff;
  padding: 2rem;
  font-size: 1.1rem;
}

.error-message {
  text-align: center;
  color: #ef4444;
  padding: 2rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.empty-leaderboard {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-leaderboard h4 {
  color: white;
  margin-bottom: 0.5rem;
}

/* Dashboard Leaderboard List */
.dashboard-leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dashboard-leaderboard-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.dashboard-leaderboard-entry:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 204, 255, 0.2);
}

.dashboard-leaderboard-entry.current-user {
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.2) 0%, rgba(0, 204, 255, 0.1) 100%);
  border-color: #00ccff;
  box-shadow: 0 0 20px rgba(0, 204, 255, 0.3);
}

.dashboard-leaderboard-entry.rank-1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%);
  border-color: #FFD700;
}

.dashboard-leaderboard-entry.rank-2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, rgba(192, 192, 192, 0.1) 100%);
  border-color: #C0C0C0;
}

.dashboard-leaderboard-entry.rank-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(205, 127, 50, 0.1) 100%);
  border-color: #CD7F32;
}

.rank-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.rank-section .rank-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: #00ccff;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
  margin-bottom: 0.25rem;
}

.rank-badge {
  font-size: 0.7rem;
  color: #FFD700;
  text-align: center;
  font-weight: 600;
}

.player-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  margin: 0 1rem;
}

.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(0, 204, 255, 0.5);
  object-fit: cover;
}

.player-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.player-info .player-name {
  color: white;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.you-badge {
  background: linear-gradient(135deg, #00ccff 0%, #0099cc 100%);
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-weight: 600;
}

.game-played {
  color: #94a3b8;
  font-size: 0.85rem;
}

.score-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  min-width: 80px;
}

.score-section .score {
  color: #00ccff;
  font-weight: bold;
  font-size: 1.1rem;
  text-shadow: 0 0 8px rgba(0, 204, 255, 0.4);
}

.games-count {
  color: #94a3b8;
  font-size: 0.8rem;
}

/* Leaderboard Footer */
.leaderboard-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(0, 204, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.last-updated {
  color: #94a3b8;
  font-size: 0.85rem;
}

.refresh-btn {
  background: rgba(0, 204, 255, 0.2);
  color: #00ccff;
  border: 1px solid rgba(0, 204, 255, 0.4);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  background: rgba(0, 204, 255, 0.3);
  transform: translateY(-1px);
}

/* Responsive Design for Leaderboard */
@media (max-width: 768px) {
  .leaderboard-filters {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .game-filter,
  .period-filter {
    width: 100%;
  }
  
  .dashboard-leaderboard-entry {
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .rank-section,
  .player-section,
  .score-section {
    width: 100%;
    justify-content: center;
  }
  
  .player-section {
    margin: 0;
  }
  
  .score-section {
    align-items: center;
  }
  
  .leaderboard-footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .leaderboard-header {
    padding: 1rem;
  }
  
  .leaderboard-content {
    padding: 1rem;
  }
  
  .rank-card {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .rank-number {
    font-size: 1.5rem;
  }
  
  .rank-details {
    text-align: center;
  }
}

/* Achievement System Styles */
.achievements-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 204, 255, 0.3);
}

.achievements-header h3 {
  color: #00ccff;
  font-size: 1.5rem;
  margin: 0;
}

.achievement-stats {
  display: flex;
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: #00ccff;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.stat-label {
  font-size: 0.85rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.achievement-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0.6;
}

.achievement-card.locked {
  opacity: 0.6;
  filter: grayscale(0.8);
}

.achievement-card.unlocked {
  background: rgba(255, 255, 255, 0.1);
  border-color: currentColor;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.achievement-card.unlocked:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.2);
}

/* Achievement Rarity Colors */
.achievement-card.rarity-common,
.achievement-rarity.rarity-common {
  color: #94a3b8;
}

.achievement-card.rarity-uncommon,
.achievement-rarity.rarity-uncommon {
  color: #22c55e;
}

.achievement-card.rarity-rare,
.achievement-rarity.rarity-rare {
  color: #3b82f6;
}

.achievement-card.rarity-epic,
.achievement-rarity.rarity-epic {
  color: #a855f7;
}

.achievement-card.rarity-legendary,
.achievement-rarity.rarity-legendary {
  color: #f59e0b;
}

.achievement-icon-large {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px currentColor);
}

.achievement-info {
  text-align: center;
}

.achievement-name {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.achievement-description {
  color: #e2e8f0;
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.achievement-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.achievement-points {
  background: rgba(0, 204, 255, 0.2);
  color: #00ccff;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.achievement-rarity {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.unlocked-date {
  color: #94a3b8;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.achievement-checkmark {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

/* Achievement Progress Bars */
.achievement-progress {
  margin-top: 1rem;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  height: 6px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #00ccff, #0099cc);
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-text {
  color: #94a3b8;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  text-align: center;
}

/* Responsive Design for Achievements */
@media (max-width: 768px) {
  .achievements-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .achievement-stats {
    gap: 1rem;
  }
  
  .achievements-grid {
    grid-template-columns: 1fr;
  }
  
  .achievement-card {
    padding: 1rem;
  }
  
  .achievement-icon-large {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .stat-value {
    font-size: 1.2rem;
  }
  
  .achievements-header h3 {
    font-size: 1.3rem;
  }
  
  .achievement-card {
    padding: 1rem;
  }
  
  .achievement-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Daily Challenges Widget Styles */
.daily-challenges-widget {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 204, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.challenges-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 204, 255, 0.2);
}

.challenges-header h3 {
  color: #00ccff;
  font-size: 1.3rem;
  margin: 0;
}

.streak-info {
  text-align: right;
}

.streak-count {
  display: block;
  color: #FFD700;
  font-weight: bold;
  font-size: 1.1rem;
}

.streak-multiplier {
  color: #22c55e;
  font-size: 0.9rem;
  font-weight: 600;
}

.challenges-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.challenge-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.challenge-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 204, 255, 0.2);
}

.challenge-card.completed {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
  border-color: #22c55e;
}

.challenge-card.difficulty-easy {
  border-left: 4px solid #22c55e;
}

.challenge-card.difficulty-medium {
  border-left: 4px solid #f59e0b;
}

.challenge-card.difficulty-hard {
  border-left: 4px solid #ef4444;
}

.challenge-card.difficulty-expert {
  border-left: 4px solid #a855f7;
}

.challenge-icon {
  font-size: 2.5rem;
  text-align: center;
  min-width: 60px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.challenge-info {
  flex: 1;
}

.challenge-name {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

.challenge-description {
  color: #e2e8f0;
  font-size: 0.9rem;
  margin: 0 0 0.75rem 0;
  opacity: 0.9;
}

.challenge-progress {
  margin-bottom: 0.5rem;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.progress-fill {
  background: linear-gradient(90deg, #00ccff, #0099cc);
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-text {
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
}

.challenge-rewards {
  display: flex;
  gap: 1rem;
}

.reward {
  color: #FFD700;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.completion-checkmark {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.challenges-footer {
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  font-style: italic;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design for Challenges */
@media (max-width: 768px) {
  .challenges-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .streak-info {
    text-align: center;
  }
  
  .challenge-card {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .challenge-icon {
    font-size: 2rem;
  }
  
  .challenge-rewards {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .daily-challenges-widget {
    padding: 1rem;
  }
  
  .challenges-header h3 {
    font-size: 1.1rem;
  }
  
  .challenge-card {
    padding: 0.75rem;
  }
  
  .completion-checkmark {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
}

/* XP & Level System Styles */
.level-up-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: levelUpAppear 0.5s ease-out;
  border: 2px solid #FFD700;
}

@keyframes levelUpAppear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.level-up-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  position: relative;
}

.level-up-icon {
  font-size: 3rem;
  animation: levelUpBounce 1s ease-in-out infinite alternate;
}

@keyframes levelUpBounce {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.level-up-text h3 {
  color: #FFD700;
  font-size: 1.8rem;
  margin: 0 0 0.5rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.level-up-text p {
  color: white;
  margin: 0.25rem 0;
  font-size: 1.1rem;
}

.level-title {
  color: #FFD700 !important;
  font-weight: bold;
  font-style: italic;
}

.level-rewards {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.level-rewards .reward {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.level-up-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.level-up-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* XP Progress Bar in Header */
.xp-progress-container {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.xp-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.level-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.level-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: bold;
}

.xp-numbers {
  font-weight: 600;
}

.xp-progress-bar {
  background: rgba(255, 255, 255, 0.1);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.xp-progress-fill {
  background: linear-gradient(90deg, #00ccff 0%, #667eea 50%, #764ba2 100%);
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
  position: relative;
}

.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: xpShimmer 2s ease-in-out infinite;
}

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

/* XP Widget for Dashboard */
.xp-widget {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

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

.xp-widget-title {
  color: #667eea;
  font-size: 1.3rem;
  margin: 0;
}

.current-level {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  text-align: center;
}

.level-name {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.level-title {
  font-size: 0.8rem;
  opacity: 0.9;
}

.xp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.xp-stat {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.xp-stat-value {
  display: block;
  color: #FFD700;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.xp-stat-label {
  color: #94a3b8;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.level-progress {
  margin-bottom: 1.5rem;
}

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

.progress-label {
  color: white;
  font-weight: 600;
}

.progress-numbers {
  color: #94a3b8;
  font-size: 0.9rem;
}

.level-progress-bar {
  background: rgba(255, 255, 255, 0.1);
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.level-progress-fill {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
  position: relative;
}

.level-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.4) 50%, transparent 100%);
  animation: progressShimmer 3s ease-in-out infinite;
}

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

.next-level-info {
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.next-level-rewards {
  margin-top: 0.5rem;
  color: #FFD700;
  font-weight: 600;
}

/* Recent XP Activity */
.xp-activity {
  margin-top: 1.5rem;
}

.activity-header {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 200px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border-left: 3px solid #667eea;
}

.activity-description {
  color: white;
  font-size: 0.9rem;
}

.activity-time {
  color: #94a3b8;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.activity-xp {
  color: #FFD700;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Badges Display */
.badges-container {
  margin-top: 1.5rem;
}

.badges-header {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.75rem;
}

.badge-item {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease;
  position: relative;
}

.badge-item:hover {
  transform: scale(1.1);
}

.badge-tooltip {
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.badge-item:hover .badge-tooltip {
  opacity: 1;
}

/* Responsive Design for XP System */
@media (max-width: 768px) {
  .level-up-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
  }
  
  .xp-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .badges-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  }
}

@media (max-width: 480px) {
  .level-up-content {
    padding: 1rem;
  }
  
  .level-up-text h3 {
    font-size: 1.4rem;
  }
  
  .xp-stats {
    grid-template-columns: 1fr;
  }
  
  .activity-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Seasonal Events Styles */
.event-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: eventSlideIn 0.5s ease-out;
  border: 2px solid #FFD700;
  max-width: 400px;
}

@keyframes eventSlideIn {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.event-notification-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  position: relative;
}

.event-icon {
  font-size: 2rem;
  animation: eventPulse 2s ease-in-out infinite;
}

@keyframes eventPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.event-text h3 {
  color: #FFD700;
  font-size: 1.2rem;
  margin: 0 0 0.5rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.event-text p {
  color: white;
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.event-rewards {
  display: flex;
  gap: 1rem;
  color: #FFD700;
  font-size: 0.8rem;
  font-weight: 600;
}

.event-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.event-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.challenge-completion-notification {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 9999;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
  animation: completionBounce 0.6s ease-out;
  border: 2px solid #FFD700;
}

@keyframes completionBounce {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
  }
  60% {
    transform: translateY(-50%) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

.completion-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  position: relative;
}

.completion-icon {
  font-size: 2rem;
  animation: completionSpin 1s ease-out;
}

@keyframes completionSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.completion-text h4 {
  color: white;
  font-size: 1.1rem;
  margin: 0 0 0.25rem 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.completion-text p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
}

.completion-rewards {
  color: #FFD700;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  gap: 0.75rem;
}

.completion-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.completion-close:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* Seasonal Theme Styles */
.winter-theme {
  --event-primary: #87CEEB;
  --event-accent: #B0E0E6;
  --event-bg: rgba(135, 206, 235, 0.1);
}

.winter-theme .main-header {
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.1) 0%, rgba(176, 224, 230, 0.1) 100%);
}

.spring-theme {
  --event-primary: #90EE90;
  --event-accent: #98FB98;
  --event-bg: rgba(144, 238, 144, 0.1);
}

.spring-theme .main-header {
  background: linear-gradient(135deg, rgba(144, 238, 144, 0.1) 0%, rgba(152, 251, 152, 0.1) 100%);
}

.summer-theme {
  --event-primary: #FFD700;
  --event-accent: #FFA500;
  --event-bg: rgba(255, 215, 0, 0.1);
}

.summer-theme .main-header {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
}

.autumn-theme {
  --event-primary: #D2691E;
  --event-accent: #CD853F;
  --event-bg: rgba(210, 105, 30, 0.1);
}

.autumn-theme .main-header {
  background: linear-gradient(135deg, rgba(210, 105, 30, 0.1) 0%, rgba(205, 133, 63, 0.1) 100%);
}

.halloween-theme {
  --event-primary: #FF4500;
  --event-accent: #8B008B;
  --event-bg: rgba(255, 69, 0, 0.1);
}

.halloween-theme {
  background-color: #1a0f0a;
}

.halloween-theme .main-header {
  background: linear-gradient(135deg, rgba(255, 69, 0, 0.2) 0%, rgba(139, 0, 139, 0.2) 100%);
}

.christmas-theme {
  --event-primary: #DC143C;
  --event-accent: #228B22;
  --event-bg: rgba(220, 20, 60, 0.1);
}

.christmas-theme .main-header {
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.1) 0%, rgba(34, 139, 34, 0.1) 100%);
}

.new-year-theme {
  --event-primary: #FFD700;
  --event-accent: #C0C0C0;
  --event-bg: rgba(255, 215, 0, 0.1);
}

.anniversary-theme {
  --event-primary: #8A2BE2;
  --event-accent: #9370DB;
  --event-bg: rgba(138, 43, 226, 0.1);
}

/* Event Progress Widget */
.seasonal-events-widget {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--event-primary, rgba(0, 204, 255, 0.3));
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.events-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--event-primary, rgba(0, 204, 255, 0.2));
}

.events-title {
  color: var(--event-primary, #00ccff);
  font-size: 1.3rem;
  margin: 0;
}

.event-timer {
  color: #94a3b8;
  font-size: 0.9rem;
  text-align: right;
}

.active-events {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--event-accent, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
}

.event-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--event-bg, rgba(0, 204, 255, 0.2));
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.event-name {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.event-theme-icon {
  font-size: 1.5rem;
}

.event-description {
  color: #e2e8f0;
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
  opacity: 0.9;
}

.event-challenges {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.event-challenge-item {
  display: flex;
  justify-content: between;
  align-items: center;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border-left: 3px solid var(--event-primary, #00ccff);
}

.challenge-info {
  flex: 1;
}

.challenge-name {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

.challenge-progress {
  color: #94a3b8;
  font-size: 0.8rem;
}

.challenge-status {
  color: var(--event-accent, #FFD700);
  font-size: 0.8rem;
  font-weight: 600;
}

.event-rewards-preview {
  display: flex;
  gap: 0.75rem;
  color: #FFD700;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Responsive Design for Events */
@media (max-width: 768px) {
  .event-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .challenge-completion-notification {
    right: 10px;
    left: 10px;
  }
  
  .event-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .seasonal-events-widget {
    padding: 1rem;
  }
  
  .events-header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* Game Completion Summary Styles */
.game-completion-summary {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  background: linear-gradient(135deg, rgba(15, 15, 34, 0.98) 0%, rgba(25, 25, 55, 0.98) 100%);
  border: 2px solid #00ccff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  animation: summaryAppear 0.5s ease-out;
  min-width: 400px;
  max-width: 500px;
}

@keyframes summaryAppear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8) rotateY(45deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotateY(0deg);
  }
}

.summary-content {
  padding: 2rem;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 204, 255, 0.3);
}

.summary-header h3 {
  color: #00ccff;
  font-size: 1.8rem;
  margin: 0;
  text-shadow: 0 0 15px rgba(0, 204, 255, 0.5);
  animation: summaryPulse 2s ease-in-out infinite;
}

@keyframes summaryPulse {
  0%, 100% { text-shadow: 0 0 15px rgba(0, 204, 255, 0.5); }
  50% { text-shadow: 0 0 25px rgba(0, 204, 255, 0.8); }
}

.summary-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.summary-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 204, 255, 0.2);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00ccff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 204, 255, 0.2);
}

.stat-label {
  display: block;
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  display: block;
  color: white;
  font-size: 1.4rem;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.xp-highlight {
  color: #FFD700 !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
  animation: xpGlow 1s ease-in-out infinite alternate;
}

@keyframes xpGlow {
  0% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
  100% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

.perfect-game-bonus {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  font-weight: bold;
  margin-bottom: 2rem;
  border: 2px solid #FFD700;
  animation: perfectGameShine 2s ease-in-out infinite;
}

@keyframes perfectGameShine {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.5); }
  50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
}

.summary-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-primary, .btn-secondary {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  min-width: 120px;
}

.btn-primary {
  background: linear-gradient(135deg, #00ccff 0%, #0099cc 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 204, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 204, 255, 0.4);
  background: linear-gradient(135deg, #0099cc 0%, #0077aa 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Leaderboard Widget Styles */
.leaderboard-widget {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 204, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 204, 255, 0.2);
}

.leaderboard-header h3 {
  color: #00ccff;
  font-size: 1.3rem;
  margin: 0;
}

.leaderboard-filter {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

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

.leaderboard-entry {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.leaderboard-entry:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.leaderboard-entry.top-three {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  border-color: #FFD700;
}

.leaderboard-entry .rank {
  color: #FFD700;
  font-weight: bold;
  font-size: 1rem;
}

.leaderboard-entry .player-name {
  color: white;
  font-weight: 600;
}

.leaderboard-entry .score {
  color: #00ccff;
  font-weight: bold;
}

.leaderboard-entry .time {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Dashboard Widget Grid */
.dashboard-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* No Events State */
.no-events {
  text-align: center;
  padding: 2rem;
  color: #94a3b8;
  font-style: italic;
}

.no-events p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
  .game-completion-summary {
    min-width: 90vw;
    max-width: 90vw;
    margin: 0 5vw;
  }
  
  .summary-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .summary-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
  }
  
  .dashboard-widgets {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .leaderboard-entry {
    grid-template-columns: 30px 1fr;
    gap: 0.75rem;
  }
  
  .leaderboard-entry .score,
  .leaderboard-entry .time {
    grid-column: 2;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .summary-content {
    padding: 1.5rem;
  }
  
  .summary-header h3 {
    font-size: 1.4rem;
  }
  
  .stat-value {
    font-size: 1.2rem;
  }
  
  .perfect-game-bonus {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}
