/* ============================================
   SPHERE GAMING STYLES
   Complete styling for game player and all games
   ============================================ */

/* Game Modal */
.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.game-modal-content {
  position: relative;
  width: 95%;
  max-width: 700px;
  max-height: 90vh;
  background: linear-gradient(135deg, #0f172a 0%, #0f172a 100%);
  border-radius: 24px;
  border: 2px solid rgba(8, 145, 178, 0.3);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
              0 0 100px rgba(8, 145, 178, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Game Header */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

.game-category-badge {
  padding: 4px 12px;
  background: rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.game-timer, .game-score {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.timer-icon, .score-icon {
  font-size: 1rem;
}

.timer-value, .score-value {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  font-variant-numeric: tabular-nums;
}

.game-close-btn, .game-fullscreen-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.game-close-btn:hover {
  background: rgba(239, 68, 68, 0.5);
}

.game-fullscreen-btn:hover {
  background: rgba(8, 145, 178, 0.5);
}

/* Fullscreen Mode */
.game-modal-content.game-fullscreen {
  max-width: 95vw;
  max-height: 95vh;
  width: 95vw;
  height: 95vh;
}

.game-modal-content.game-fullscreen .game-container {
  min-height: 500px;
}

/* Game Container */
.game-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  min-height: 400px;
}

.game-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #94a3b8;
}

.game-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Game Footer */
.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.game-controls {
  display: flex;
  gap: 8px;
}

.game-actions {
  display: flex;
  gap: 8px;
}

/* Game Over Screen */
.game-over-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  padding: 20px;
}

.game-over-content {
  text-align: center;
  animation: fadeInUp 0.5s ease;
}

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

.game-over-title {
  font-size: 2rem;
  margin: 0 0 24px;
  color: white;
}

.game-over-score {
  margin-bottom: 24px;
}

.score-label {
  display: block;
  color: #94a3b8;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.score-number {
  display: block;
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-over-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}

.game-over-stats .stat {
  text-align: center;
}

.game-over-stats .stat span {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.game-over-stats .stat strong {
  color: white;
  font-size: 1.5rem;
}

.game-over-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Game Leaderboard View */
.game-leaderboard-view {
  padding: 20px;
}

.game-leaderboard-view h2 {
  text-align: center;
  margin-bottom: 24px;
  color: white;
}

.game-leaderboard-view .leaderboard-list {
  max-height: 300px;
  overflow-y: auto;
}

.game-leaderboard-view .leaderboard-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 8px;
}

.game-leaderboard-view .leaderboard-entry.current-user {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.game-leaderboard-view .rank {
  font-size: 1.25rem;
  min-width: 32px;
  text-align: center;
}

.game-leaderboard-view .name {
  flex: 1;
  color: white;
  font-weight: 500;
}

.game-leaderboard-view .score {
  color: #f59e0b;
  font-weight: 700;
}

.leaderboard-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* Game Help Overlay */
.game-help-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.game-help-content {
  background: #1e293b;
  padding: 32px;
  border-radius: 16px;
  max-width: 400px;
  text-align: center;
}

.game-help-content h3 {
  color: white;
  margin-bottom: 16px;
}

.help-text {
  color: #94a3b8;
  text-align: left;
}

.help-text ul {
  padding-left: 20px;
  margin: 16px 0;
}

.help-text li {
  margin-bottom: 8px;
}

/* ============================================
   TRIVIA GAME STYLES
   ============================================ */

.trivia-game {
  max-width: 500px;
  margin: 0 auto;
}

/* Prevent flickering during DOM updates */
.trivia-question h3,
.trivia-answers,
.math-problem,
.math-options,
.word-list,
.puzzle-stats {
  will-change: contents;
}

.trivia-answer-btn,
.math-option-btn {
  will-change: transform, opacity;
}

.trivia-progress {
  margin-bottom: 16px;
}

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

.trivia-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0891b2, #06d6a0);
  transition: width 0.3s ease;
}

.trivia-progress .progress-text {
  color: #64748b;
  font-size: 0.875rem;
}

.trivia-timer {
  margin-bottom: 16px;
}

.trivia-timer .timer-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.trivia-timer .timer-fill {
  height: 100%;
  background: #06d6a0;
  transition: width 0.1s linear, background-color 0.3s;
}

.trivia-timer .timer-text {
  color: #94a3b8;
  font-size: 0.875rem;
}

.trivia-category {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.category-badge {
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.streak-badge {
  padding: 6px 14px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  animation: pulse 1s ease infinite;
}

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

.trivia-question {
  background: rgba(255, 255, 255, 0.05);
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
}

.trivia-question h3 {
  margin: 0;
  color: white;
  font-size: 1.25rem;
  line-height: 1.5;
}

.trivia-answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trivia-answer-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.trivia-answer-btn:hover:not(:disabled) {
  background: rgba(8, 145, 178, 0.2);
  border-color: rgba(8, 145, 178, 0.5);
  transform: translateX(4px);
}

.trivia-answer-btn:disabled {
  cursor: not-allowed;
}

.trivia-answer-btn.correct {
  background: rgba(34, 197, 94, 0.3);
  border-color: #06d6a0;
}

.trivia-answer-btn.wrong {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}

.answer-letter {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.875rem;
}

.answer-text {
  flex: 1;
}

.trivia-feedback {
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  margin-top: 16px;
  animation: fadeInUp 0.3s ease;
}

.trivia-feedback.correct {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.trivia-feedback.wrong {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* ============================================
   MEMORY MATCH GAME STYLES
   ============================================ */

.memory-game {
  max-width: 500px;
  margin: 0 auto;
}

.memory-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}

.memory-stats .stat {
  text-align: center;
}

.memory-stats .stat-label {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.memory-stats .stat-value {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}

.memory-grid {
  display: grid;
  gap: 10px;
  margin: 0 auto;
}

.memory-card {
  aspect-ratio: 1;
  perspective: 1000px;
  cursor: pointer;
}

.memory-card .card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

.memory-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.memory-card .card-front,
.memory-card .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.memory-card .card-front {
  background: linear-gradient(135deg, #0891b2, #06d6a0);
  color: white;
}

.memory-card .card-back {
  background: rgba(255, 255, 255, 0.1);
  transform: rotateY(180deg);
}

.memory-card.matched .card-back {
  background: rgba(34, 197, 94, 0.2);
  border: 2px solid #06d6a0;
}

.memory-card.matched {
  animation: matchPop 0.3s ease;
}

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

/* ============================================
   WORD PUZZLE GAME STYLES
   ============================================ */

.word-puzzle-game {
  max-width: 500px;
  margin: 0 auto;
}

.word-puzzle-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.word-list h4 {
  color: #94a3b8;
  font-size: 0.875rem;
  margin: 0 0 8px;
}

.word-list .words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-item {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s;
}

.word-item.found {
  background: rgba(34, 197, 94, 0.3);
  color: #86efac;
  text-decoration: line-through;
}

.puzzle-stats {
  text-align: right;
  color: #94a3b8;
  font-size: 0.875rem;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin-bottom: 16px;
  user-select: none;
}

.grid-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
}

.grid-cell:hover {
  background: rgba(8, 145, 178, 0.3);
}

.grid-cell.selected {
  background: rgba(59, 130, 246, 0.5);
  transform: scale(1.1);
}

.grid-cell.found {
  background: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.selected-word {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #06d6a0;
  min-height: 40px;
  letter-spacing: 4px;
}

/* ============================================
   QUICK MATH GAME STYLES
   ============================================ */

.math-game {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

.math-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}

.math-stats .stat {
  text-align: center;
}

.math-stats .stat-label {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.math-stats .stat-value {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
}

.math-stats .stat-value.streak.hot {
  color: #f59e0b;
  animation: pulse 0.5s ease infinite;
}

.math-timer {
  margin-bottom: 32px;
}

.math-timer .timer-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.math-timer .timer-fill {
  height: 100%;
  background: #06d6a0;
  transition: width 0.05s linear, background-color 0.3s;
}

.math-problem {
  margin-bottom: 32px;
}

.problem-text {
  font-size: 3rem;
  font-weight: 800;
  color: white;
}

.math-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.math-option-btn {
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.math-option-btn:hover:not(:disabled) {
  background: rgba(8, 145, 178, 0.3);
  border-color: rgba(8, 145, 178, 0.5);
  transform: scale(1.02);
}

.math-option-btn:disabled {
  cursor: not-allowed;
}

.math-option-btn.correct {
  background: rgba(34, 197, 94, 0.3);
  border-color: #06d6a0;
}

/* ============================================
   DRAW & GUESS GAME STYLES
   ============================================ */

.draw-game {
  max-width: 500px;
  margin: 0 auto;
}

.draw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.draw-header h3 {
  color: #94a3b8;
  font-size: 0.875rem;
  margin: 0 0 8px;
}

.secret-word {
  display: flex;
  gap: 8px;
}

.letter-box {
  width: 32px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
}

.letter-box.revealed {
  background: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.canvas-container {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}

#draw-canvas {
  display: block;
  cursor: crosshair;
}

.draw-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.color-picker {
  display: flex;
  gap: 8px;
}

.color-btn {
  width: 32px;
  height: 32px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

.color-btn:hover {
  transform: scale(1.1);
}

.color-btn.active {
  border-color: white;
}

.brush-sizes {
  display: flex;
  gap: 8px;
}

.size-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.size-btn:hover, .size-btn.active {
  background: rgba(8, 145, 178, 0.3);
  border-color: #06d6a0;
}

.draw-note {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.drawing-complete {
  text-align: center;
  padding: 40px 20px;
}

.drawing-complete h2 {
  color: white;
  margin-bottom: 16px;
}

.drawing-complete p {
  color: #94a3b8;
  margin-bottom: 8px;
}

/* ============================================
   SPHERE ARENA GAME STYLES
   ============================================ */

.arena-game {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arena-hud {
  width: 100%;
  max-width: 600px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  margin-bottom: 16px;
}

.hud-left, .hud-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.health-bar {
  width: 150px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.health-fill {
  height: 100%;
  background: linear-gradient(90deg, #06d6a0, #06d6a0);
  transition: width 0.3s ease;
}

.health-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.wave-info {
  color: #94a3b8;
  font-weight: 600;
}

.hud-center {
  flex: 1;
  text-align: center;
}

.combo-display {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f59e0b;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s;
}

.combo-display.active {
  opacity: 1;
  transform: scale(1);
  animation: comboPulse 0.5s ease infinite;
}

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

.kills {
  color: #ef4444;
  font-weight: 700;
}

.powerup-icons {
  display: flex;
  gap: 8px;
}

.powerup-active {
  font-size: 1.25rem;
  animation: powerupBounce 1s ease infinite;
}

@keyframes powerupBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

#arena-canvas {
  background: #0f172a;
  border-radius: 12px;
  border: 2px solid rgba(8, 145, 178, 0.4);
}

.arena-controls-hint {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  color: #64748b;
  font-size: 0.875rem;
}

/* ============================================
   LEVEL COMPLETE SCREEN
   ============================================ */

.level-complete {
  text-align: center;
  padding: 40px 20px;
  animation: fadeInUp 0.5s ease;
}

.level-complete h2 {
  color: white;
  font-size: 2rem;
  margin-bottom: 16px;
}

.level-complete p {
  color: #86efac;
  font-size: 1.25rem;
  margin-bottom: 24px;
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.btn-primary {
  background: linear-gradient(135deg, #0891b2 0%, #06d6a0 100%);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(8, 145, 178, 0.4);
}

.btn-primary.btn-lg {
  padding: 16px 36px;
  font-size: 1.125rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.game-modal .btn-ghost {
  background: transparent;
  color: #94a3b8;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.game-modal .btn-ghost:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 640px) {
  .game-modal-content {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .game-header {
    flex-direction: column;
    gap: 12px;
  }

  .game-header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .game-footer {
    flex-direction: column;
    gap: 12px;
  }

  .trivia-question h3 {
    font-size: 1rem;
  }

  .word-grid {
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
  }

  .grid-cell {
    font-size: 0.7rem;
  }

  .problem-text {
    font-size: 2rem;
  }

  .math-option-btn {
    padding: 16px;
    font-size: 1.25rem;
  }

  #arena-canvas {
    width: 100%;
    height: auto;
  }

  .arena-controls-hint {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}

/* ============================================
   GAMING HUB STYLES
   ============================================ */

.gaming-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.gaming-header h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #0891b2 0%, #06d6a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gaming-header-actions {
  display: flex;
  gap: 12px;
}

/* Stats Banner */
.gaming-stats-banner {
  margin-bottom: 32px;
}

.gaming-stats-card {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 24px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.15) 0%, rgba(6, 214, 160, 0.15) 100%);
  border-radius: 20px;
  border: 2px solid rgba(8, 145, 178, 0.4);
  backdrop-filter: blur(10px);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  font-size: 2rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
}

/* Featured Game Banner */
.featured-section {
  margin-bottom: 40px;
}

.featured-game-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px;
  background: linear-gradient(135deg, #0891b2 0%, #06d6a0 100%);
  border-radius: 24px;
  border: 2px solid rgba(6, 214, 160, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(8, 145, 178, 0.3);
}

.featured-game-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.featured-game-banner:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(8, 145, 178, 0.4);
}

.featured-content {
  position: relative;
  z-index: 1;
}

.featured-tag {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}

.featured-content h2 {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0 0 16px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.featured-content p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  margin-bottom: 24px;
  max-width: 450px;
  line-height: 1.6;
}

.featured-features {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.featured-features span {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 0.85rem;
  color: #ffffff;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

/* Arena Preview Animation */
.featured-visual {
  position: relative;
  width: 200px;
  height: 200px;
  z-index: 1;
}

.arena-preview {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.preview-player {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #3b82f6;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
  animation: playerPulse 2s ease-in-out infinite;
}

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

.preview-orb {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: orbFloat 3s ease-in-out infinite;
}

.preview-orb.orb-1 { top: 30%; left: 20%; background: #06d6a0; animation-delay: 0s; }
.preview-orb.orb-2 { top: 60%; left: 70%; background: #f59e0b; animation-delay: 1s; }
.preview-orb.orb-3 { top: 20%; left: 60%; background: #3b82f6; animation-delay: 2s; }

@keyframes orbFloat {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-10px); opacity: 0.7; }
}

.preview-enemy {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 18px solid #ef4444;
  animation: enemyMove 4s ease-in-out infinite;
}

.preview-enemy.enemy-1 { top: 20%; left: 80%; animation-delay: 0s; }
.preview-enemy.enemy-2 { top: 70%; left: 25%; animation-delay: 2s; }

@keyframes enemyMove {
  0%, 100% { transform: translateX(0) rotate(180deg); }
  50% { transform: translateX(-20px) rotate(180deg); }
}

/* Enhanced Game Cards */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.game-card {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.1) 0%, rgba(6, 214, 160, 0.1) 100%);
  border-radius: 16px;
  border: 2px solid rgba(8, 145, 178, 0.3);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 214, 160, 0.7);
  box-shadow: 0 16px 32px rgba(8, 145, 178, 0.25);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.2) 0%, rgba(6, 214, 160, 0.2) 100%);
}

.game-card.featured-game {
  border-color: rgba(6, 214, 160, 0.6);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.15) 0%, rgba(6, 214, 160, 0.15) 100%);
}

.game-card-inner {
  padding: 20px;
  text-align: center;
  position: relative;
}

.game-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.game-icon.arena-icon {
  background: linear-gradient(135deg, #0891b2, #06d6a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-name {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin: 0 0 4px;
}

.game-category {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0 0 12px;
  text-transform: capitalize;
}

.game-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.game-plays, .game-rating {
  font-size: 0.75rem;
  color: #64748b;
}

.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  background: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 700;
}

.btn-play {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #0891b2 0%, #06d6a0 100%);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-play:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(8, 145, 178, 0.3);
}

/* Section Headers */
.section-header {
  margin-bottom: 20px;
}

.section-header h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
}

.section-subtitle {
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Achievements Grid */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.achievement-card {
  padding: 16px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.1) 0%, rgba(6, 214, 160, 0.1) 100%);
  border-radius: 14px;
  border: 2px solid rgba(8, 145, 178, 0.3);
  text-align: center;
  transition: all 0.3s;
}

.achievement-card:hover:not(.locked) {
  border-color: rgba(6, 214, 160, 0.6);
  transform: translateY(-2px);
}

.achievement-card.locked {
  opacity: 0.5;
  filter: grayscale(1);
}

.achievement-card.unlocked {
  border-color: rgba(6, 214, 160, 0.6);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.15) 0%, rgba(6, 214, 160, 0.15) 100%);
}

.achievement-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.achievement-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.achievement-points {
  display: block;
  font-size: 0.7rem;
  color: #f59e0b;
  margin-bottom: 4px;
}

.achievement-rarity {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.6rem;
  text-transform: uppercase;
  font-weight: 600;
}

.rarity-common { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.rarity-uncommon { background: rgba(34, 197, 94, 0.2); color: #06d6a0; }
.rarity-rare { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.rarity-legendary { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

/* Cosmetics Grid */
.cosmetics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.cosmetic-card {
  padding: 12px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.1) 0%, rgba(6, 214, 160, 0.1) 100%);
  border-radius: 14px;
  border: 2px solid rgba(8, 145, 178, 0.3);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.cosmetic-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 214, 160, 0.6);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.2) 0%, rgba(6, 214, 160, 0.2) 100%);
}

.cosmetic-card.rarity-legendary {
  border-color: rgba(245, 158, 11, 0.6);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(6, 214, 160, 0.1) 100%);
}

.cosmetic-card.rarity-rare {
  border-color: rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 214, 160, 0.1) 100%);
}

.cosmetic-preview {
  width: 60px;
  height: 60px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.cosmetic-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
  margin-bottom: 4px;
}

.cosmetic-price {
  font-size: 0.7rem;
  color: #f59e0b;
}

/* Challenge Friend Modal */
.challenge-games {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.challenge-game-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.1) 0%, rgba(6, 214, 160, 0.1) 100%);
  border: 2px solid rgba(8, 145, 178, 0.3);
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}

.challenge-game-btn:hover {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.2) 0%, rgba(6, 214, 160, 0.2) 100%);
  border-color: rgba(6, 214, 160, 0.6);
}

.challenge-game-btn .game-icon {
  font-size: 1.5rem;
  margin: 0;
}

.challenge-game-btn .game-name {
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .featured-game-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .featured-content h2 {
    font-size: 1.75rem;
  }

  .featured-features {
    flex-wrap: wrap;
    justify-content: center;
  }

  .featured-visual {
    margin-top: 20px;
    width: 150px;
    height: 150px;
  }

  .gaming-stats-card {
    flex-wrap: wrap;
    gap: 16px;
  }

  .stat-item {
    flex: 1 1 40%;
    justify-content: center;
  }

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

  .achievements-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cosmetics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   SNAKE GAME STYLES
   ============================================ */

.snake-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.game-stats-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
}

.game-stats-bar .stat {
  color: #94a3b8;
  font-size: 0.875rem;
}

.game-stats-bar .stat span {
  color: white;
  font-weight: 700;
}

#snake-canvas {
  border: 2px solid rgba(8, 145, 178, 0.4);
  border-radius: 12px;
}

.game-controls-mobile {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.game-controls-mobile .control-row {
  display: flex;
  gap: 8px;
}

.control-btn {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.control-btn:hover, .control-btn:active {
  background: rgba(8, 145, 178, 0.3);
  border-color: #06d6a0;
}

@media (max-width: 768px) {
  .game-controls-mobile {
    display: flex;
  }
}

/* ============================================
   TETRIS GAME STYLES
   ============================================ */

.tetris-game {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.tetris-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.next-piece-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.next-piece-box h4 {
  margin: 0 0 8px;
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
}

#next-canvas {
  border-radius: 8px;
}

.tetris-stats {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
}

.tetris-stats .stat {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.tetris-stats .stat:last-child {
  margin-bottom: 0;
}

.tetris-stats .stat strong {
  color: white;
}

#tetris-canvas {
  border: 2px solid rgba(8, 145, 178, 0.4);
  border-radius: 12px;
}

.tetris-controls {
  flex-direction: row;
  gap: 12px;
}

/* ============================================
   2048 GAME STYLES
   ============================================ */

.game-2048 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.grid-2048 {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 16px;
}

.tile-2048 {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.tile-2048:empty {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* ============================================
   FLAPPY BIRD STYLES
   ============================================ */

.flappy-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#flappy-canvas {
  border: 2px solid rgba(8, 145, 178, 0.4);
  border-radius: 12px;
}

.flappy-tap-hint {
  color: #94a3b8;
  font-size: 0.875rem;
}

/* ============================================
   BRICK BREAKER STYLES
   ============================================ */

.brick-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#brick-canvas {
  border: 2px solid rgba(8, 145, 178, 0.4);
  border-radius: 12px;
}

/* ============================================
   CHESS GAME STYLES
   ============================================ */

.chess-game {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.chess-sidebar {
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.turn-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  color: white;
  font-weight: 500;
}

.turn-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.turn-dot.white { background: #fff; }
.turn-dot.black { background: #333; }
.turn-dot.red { background: #ef4444; }

.captured-pieces {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 12px;
}

.captured {
  min-height: 24px;
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.captured:last-child { margin-bottom: 0; }

.game-chat {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 8px;
  max-height: 150px;
}

.chat-msg {
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 0.8rem;
}

.chat-msg.you {
  background: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  margin-left: 20px;
}

.chat-msg.ai {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  margin-right: 20px;
}

#chat-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-size: 0.8rem;
}

#chat-input::placeholder {
  color: #64748b;
}

.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 50px);
  grid-template-rows: repeat(8, 50px);
  border: 3px solid #5c3d2e;
  border-radius: 4px;
}

.chess-square {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.chess-square.light { background: #f0d9b5; }
.chess-square.dark { background: #b58863; }
.chess-square.selected { background: #aef359 !important; }
.chess-square.valid-move { background: rgba(34, 197, 94, 0.5) !important; }

.chess-piece {
  font-size: 2rem;
  user-select: none;
}

.chess-piece.white { filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.3)); }
.chess-piece.black { filter: drop-shadow(1px 1px 1px rgba(255,255,255,0.3)); }

/* ============================================
   CHECKERS GAME STYLES
   ============================================ */

.checkers-game {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.checkers-sidebar {
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.score-display {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.875rem;
  color: #94a3b8;
}

.score-display div {
  margin-bottom: 4px;
}

.checkers-board {
  display: grid;
  grid-template-columns: repeat(8, 50px);
  grid-template-rows: repeat(8, 50px);
  border: 3px solid #5c3d2e;
  border-radius: 4px;
}

.checkers-square {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.checkers-square.light { background: #f5deb3; }
.checkers-square.dark { background: #2d5016; }
.checkers-square.selected { background: #aef359 !important; }
.checkers-square.valid-move { background: rgba(34, 197, 94, 0.6) !important; }

.checker-piece {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.2);
  transition: transform 0.2s;
}

.checker-piece.red {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: 2px solid #991b1b;
}

.checker-piece.black {
  background: var(--gradient);
  border: 2px solid #030712;
}

.checker-piece.king {
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* ============================================
   TIC-TAC-TOE STYLES
   ============================================ */

.tictactoe-game {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.ttt-sidebar {
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ttt-stats {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
}

.ttt-stats .stat {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 16px;
}

.ttt-cell {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.ttt-cell:hover:not(.filled) {
  background: rgba(139, 92, 246, 0.2);
}

.ttt-cell.x { color: #3b82f6; }
.ttt-cell.o { color: #ef4444; }

/* ============================================
   8-BALL POOL STYLES
   ============================================ */

.pool-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.pool-stats {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

.pool-stats .player {
  color: #94a3b8;
  font-size: 0.875rem;
}

.pool-stats .player.active {
  color: #06d6a0;
  font-weight: 600;
}

.pool-stats .pocketed {
  color: #64748b;
  font-size: 0.8rem;
}

#pool-canvas {
  border: 8px solid #5c3d2e;
  border-radius: 8px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.pool-hint {
  color: #94a3b8;
  font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE GAME STYLES
   ============================================ */

@media (max-width: 768px) {
  .chess-game, .checkers-game, .tictactoe-game {
    flex-direction: column;
    align-items: center;
  }

  .chess-sidebar, .checkers-sidebar, .ttt-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .chess-board, .checkers-board {
    grid-template-columns: repeat(8, 40px);
    grid-template-rows: repeat(8, 40px);
  }

  .chess-square, .checkers-square {
    width: 40px;
    height: 40px;
  }

  .chess-piece { font-size: 1.5rem; }
  .checker-piece { width: 32px; height: 32px; }

  .ttt-board {
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 80px);
  }

  .ttt-cell {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }

  .grid-2048 {
    grid-template-columns: repeat(4, 70px);
  }

  .tile-2048 {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
  }

  .tetris-game {
    flex-direction: column;
    align-items: center;
  }

  .tetris-sidebar {
    flex-direction: row;
    width: 100%;
    justify-content: center;
  }

  #pool-canvas {
    width: 100%;
    height: auto;
  }

  .game-chat {
    min-height: 120px;
  }
}

/* ============================================
   WHAT'S NEW POPUP
   ============================================ */
.whats-new-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.whats-new-modal {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  border: 2px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  animation: slideInUp 0.4s ease;
}

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

.whats-new-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: rgba(139, 92, 246, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.whats-new-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.whats-new-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.whats-new-close:hover {
  background: rgba(239, 68, 68, 0.5);
}

.whats-new-content {
  padding: 24px;
  max-height: 400px;
  overflow-y: auto;
}

.whats-new-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.2s;
}

.whats-new-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.whats-new-item:last-child {
  margin-bottom: 0;
}

.whats-new-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.whats-new-item h4 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
}

.whats-new-item p {
  margin: 0;
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.5;
}

.whats-new-footer {
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
}

.whats-new-footer .btn-primary {
  min-width: 120px;
}
