/* ==================================================
   Modern Games Hub Styling
   Enhanced visual design with glass-morphism effects
================================================== */

/* ---------- MODERN GAMES HERO ---------- */
.games-hero-modern {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: 
    radial-gradient(ellipse at center, rgba(15, 23, 42, 0.8) 0%, rgba(2, 6, 23, 0.95) 100%),
    linear-gradient(135deg, rgba(56, 189, 248, 0.05) 0%, rgba(34, 197, 94, 0.05) 100%);
  overflow: hidden;
  margin-bottom: 48px;
}

.games-hero-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(800px 400px at 30% 30%, rgba(56, 189, 248, 0.08) 0%, transparent 70%),
    radial-gradient(600px 300px at 70% 70%, rgba(34, 197, 94, 0.06) 0%, transparent 70%);
  z-index: 1;
}

.games-hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 24px;
}

.games-hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, #38bdf8, #22c55e, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  animation: hero-glow-pulse 4s ease-in-out infinite;
}

@keyframes hero-glow-pulse {
  0%, 100% { 
    filter: drop-shadow(0 0 30px rgba(56, 189, 248, 0.4));
    transform: scale(1);
  }
  50% { 
    filter: drop-shadow(0 0 50px rgba(34, 197, 94, 0.6));
    transform: scale(1.02);
  }
}

.games-hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(226, 232, 240, 0.8);
  margin-bottom: 32px;
  line-height: 1.6;
}

.games-hero-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stat-item {
  text-align: center;
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.hero-stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(56, 189, 248, 0.3);
}

.hero-stat-number {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.hero-stat-label {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- MODERN GAMES GRID ---------- */
.games-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
  padding: 0 24px;
  max-width: 1400px;
  margin: 0 auto 48px;
}

.game-card-modern {
  position: relative;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  cursor: pointer;
  will-change: transform;
  contain: layout style;
}

.game-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(400px 200px at 30% 0%, rgba(168, 85, 247, 0.08), transparent 70%);
  z-index: -1;
  transition: opacity 0.3s ease;
}

.game-card-modern::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #38bdf8, #22c55e, #a855f7, #ec4899);
  border-radius: 26px;
  opacity: 0;
  z-index: -2;
  transition: opacity 0.3s ease;
}

.game-card-modern:hover::after {
  opacity: 0.3;
}

.game-card-modern:hover {
  transform: translateY(-12px) rotateX(8deg) scale(1.02);
  box-shadow: 
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.3);
}

.game-card-modern:hover::before {
  opacity: 0.2;
}

.game-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.game-card-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.game-card-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.game-card-modern:hover .game-card-icon::before {
  transform: translateX(100%);
}

.game-card-modern:hover .game-card-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

.game-card-title {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-card-category {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-card-description {
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.game-card-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.game-card-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.6);
}

.game-card-stat-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.game-card-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.game-card-play-btn {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex: 1;
  max-width: 120px;
}

.game-card-play-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.game-card-play-btn:hover::before {
  left: 100%;
}

.game-card-play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
}

.game-card-info-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(226, 232, 240, 0.8);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-card-info-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

/* ---------- GAME DIFFICULTY INDICATORS ---------- */
.game-difficulty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.difficulty-easy {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.difficulty-medium {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.difficulty-hard {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ---------- RESPONSIVE DESIGN ---------- */
@media (max-width: 768px) {
  .games-hero-modern {
    min-height: 40vh;
    margin-bottom: 32px;
  }
  
  .games-hero-stats {
    gap: 16px;
  }
  
  .hero-stat-item {
    padding: 12px 16px;
  }
  
  .hero-stat-number {
    font-size: 1.5rem;
  }
  
  .games-grid-modern {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 16px;
    margin-bottom: 32px;
  }
  
  .game-card-modern {
    padding: 20px;
  }
  
  .game-card-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .game-card-title {
    font-size: 1.25rem;
  }
  
  .game-card-stats {
    gap: 16px;
  }
  
  .game-card-actions {
    flex-direction: column;
  }
  
  .game-card-play-btn {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .games-hero-title {
    font-size: 2rem;
  }
  
  .games-hero-subtitle {
    font-size: 1rem;
  }
  
  .games-hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .hero-stat-item {
    width: 100%;
    max-width: 200px;
  }
  
  .game-card-header {
    flex-direction: column;
    text-align: center;
  }
  
  .game-card-stats {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ---------- ANIMATIONS ---------- */
@keyframes card-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes card-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.game-card-modern {
  animation: card-float 6s ease-in-out infinite;
}

.game-card-modern:nth-child(odd) {
  animation-delay: 1s;
}

.game-card-modern:nth-child(even) {
  animation-delay: 3s;
}

/* ---------- ACCESSIBILITY ---------- */
@media (prefers-reduced-motion: reduce) {
  .game-card-modern {
    animation: none;
  }
  
  .games-hero-title {
    animation: none;
  }
  
  .game-card-icon::before {
    animation: none;
  }
}

@media (prefers-contrast: high) {
  .game-card-modern,
  .hero-stat-item {
    border-width: 2px;
  }
  
  .game-difficulty {
    border-width: 2px;
  }
}

/* ---------- PERFORMANCE ---------- */
.game-card-modern,
.games-hero-modern {
  will-change: transform;
  contain: layout style;
}

.game-card-icon {
  will-change: transform;
  contain: strict;
}

/* ---------- LOADING STATES ---------- */
.game-card-loading {
  position: relative;
  overflow: hidden;
}

.game-card-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.1), transparent);
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ---------- GAME STATUS INDICATORS ---------- */
.game-status-new {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.game-status-popular {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}