/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Home Page */
.home-container, .new-game-container, .game-container {
  text-align: center;
  background: white;
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.home-container {
  min-width: 280px;
  width: 100%;
  max-width: 1000px;
}

.new-game-announcement {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  animation: announcement-glow 3s ease-in-out infinite;
}

.new-game-announcement a {
  color: #feca57;
  font-weight: bold;
  text-decoration: underline;
}

@keyframes announcement-glow {
  0%, 100% { box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(102, 126, 234, 0.6); }
}

h1 {
  color: #333;
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

.play-button {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
}

.play-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.play-button:active {
  transform: scale(0.98);
}

.play-button.secondary {
  background: #6c757d;
  margin-left: 1rem;
}

/* Player Form */
.player-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.form-group input {
  padding: 0.75rem 1rem;
  border: 2px solid #ddd;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

/* VS Computer Option */
.vs-computer-option {
  flex-direction: row !important;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.vs-computer-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

.vs-computer-option label {
  margin-bottom: 0;
  cursor: pointer;
  font-weight: 500;
}

/* Game Wrapper and Scoreboard */
.game-wrapper {
  position: relative;
}

.scoreboard {
  position: absolute;
  top: 0;
  right: -220px;
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  min-width: 180px;
}

.score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.score-item:last-child {
  border-bottom: none;
}

.score-label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.score-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #667eea;
}

.result-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.result-buttons .play-button.secondary {
  margin-left: 0;
}

/* Leaderboard */
.leaderboard {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin: 1.5rem auto;
  max-width: 320px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.leaderboard-title {
  font-size: 1.2rem;
  margin: 0 0 1rem 0;
  text-align: center;
  color: #333;
}

.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.leaderboard-entry {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  gap: 0.75rem;
}

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

.leaderboard-entry.rank-1 {
  font-weight: bold;
  font-size: 1.1rem;
}

.leaderboard-rank {
  min-width: 2rem;
  text-align: center;
}

.leaderboard-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  font-weight: bold;
  color: #667eea;
}

.leaderboard-empty {
  text-align: center;
  color: #666;
  font-style: italic;
  margin: 0;
  padding: 0.5rem 0;
}

.leaderboard-new {
  animation: leaderboard-highlight 1s ease-out;
}

@keyframes leaderboard-highlight {
  0% { background: rgba(102, 126, 234, 0.3); }
  100% { background: transparent; }
}

/* Game Board */
.game-status {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 100px));
  grid-template-rows: repeat(3, minmax(70px, 100px));
  gap: 10px;
  justify-content: center;
  margin-bottom: 2rem;
}

.cell {
  width: 100%;
  aspect-ratio: 1;
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 0.5rem;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.cell:hover:not(.x):not(.o) {
  background: #e9ecef;
  transform: scale(1.05);
}

.cell.x {
  color: #667eea;
}

.cell.o {
  color: #e74c3c;
}

/* Game Result */
.game-result {
  padding-top: 1rem;
}

.game-result p {
  font-size: 1.8rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 1.5rem;
}

.hidden {
  display: none;
}

/* Responsive - move scoreboard above on smaller screens */
@media (max-width: 900px) {
  .game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .scoreboard {
    position: static;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 2rem;
  }

  .score-item {
    flex-direction: column;
    border-bottom: none;
    padding: 0;
  }

  .score-label {
    font-size: 0.85rem;
  }
}

/* Background Options */
.background-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.background-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.background-option input[type="radio"] {
  display: none;
}

.background-preview {
  width: 60px;
  height: 60px;
  border-radius: 0.5rem;
  border: 3px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}

.background-option input[type="radio"]:checked + .background-preview {
  border-color: #667eea;
  transform: scale(1.1);
}

.background-option:hover .background-preview {
  transform: scale(1.05);
}

.background-name {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}

/* Background Preview Colors */
.background-preview.purple {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.background-preview.winter {
  background: linear-gradient(135deg, #e0f7fa 0%, #80deea 50%, #4dd0e1 100%);
}

.background-preview.night {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.background-preview.sunset {
  background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #ff9ff3 100%);
}

.background-preview.forest {
  background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

/* Game Page Full Background */
.game-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.game-page.bg-purple {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.game-page.bg-winter {
  background: linear-gradient(135deg, #e0f7fa 0%, #80deea 50%, #4dd0e1 100%);
}

.game-page.bg-night {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.game-page.bg-sunset {
  background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #ff9ff3 100%);
}

.game-page.bg-forest {
  background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

/* Santa Animation */
.santa-container {
  position: fixed;
  top: 15%;
  left: -450px;
  z-index: 1000;
  pointer-events: none;
}

.santa-container.animate {
  animation: flySanta 4s ease-in-out forwards;
}

@keyframes flySanta {
  0% {
    left: -450px;
    top: 15%;
  }
  30% {
    top: 8%;
  }
  50% {
    top: 25%;
  }
  70% {
    top: 10%;
  }
  100% {
    left: 110%;
    top: 18%;
  }
}

/* Moon Animation */
.moon-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 1000;
  pointer-events: none;
}

.moon-container.animate {
  animation: showMoon 3s ease-in-out forwards;
}

@keyframes showMoon {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  20% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
  30% {
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
}

.moon {
  filter: drop-shadow(0 0 30px rgba(255, 250, 205, 0.8));
}

/* Home Page Game Selection */
.home-subtitle {
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.game-subtitle {
  color: #666;
  margin-bottom: 1.5rem;
}

.game-selection {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 1rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 200px;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.game-card h2 {
  color: #333;
  font-size: 1.2rem;
  margin: 1rem 0 0.5rem;
}

.game-card p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.game-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tictactoe-icon {
  gap: 0.5rem;
}

.tictactoe-icon span {
  font-size: 2rem;
  font-weight: bold;
  color: white;
}

.pool-icon {
  position: relative;
  background: linear-gradient(135deg, #0a5c36 0%, #1a8c56 100%);
}

.pool-ball {
  width: 30px;
  height: 30px;
  background: #FFD700;
  border-radius: 50%;
  border: 2px solid #333;
}

.pool-cue {
  position: absolute;
  width: 4px;
  height: 50px;
  background: linear-gradient(to bottom, #F5DEB3 10%, #8B4513 10%);
  transform: rotate(-45deg);
  top: 10px;
  right: 10px;
  border-radius: 2px;
}

/* Pool Game Styles */
.pool-container {
  padding: 2rem;
}

.pool-table-wrapper {
  position: relative;
  display: inline-block;
  margin: 1rem 0;
}

#poolTable {
  border: 8px solid #4a2c0a;
  border-radius: 8px;
  cursor: crosshair;
}

.power-meter {
  position: absolute;
  right: -40px;
  top: 0;
  width: 20px;
  height: 100%;
  background: #333;
  border-radius: 10px;
  overflow: hidden;
  display: none;
}

.power-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, #00ff00, #ffff00, #ff0000);
  transition: height 0.1s;
}

.pool-instructions {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.pool-scoreboard {
  min-width: 200px;
}

.pool-scoreboard .score-sublabel {
  font-size: 0.75rem;
  color: #888;
  display: block;
}

/* Responsive adjustments for pool */
@media (max-width: 900px) {
  .pool-container {
    padding: 1rem;
  }

  .pool-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  #poolTable {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .power-meter {
    display: none; /* Hide on mobile - power shown via drag distance */
  }
}

@media (max-width: 500px) {
  .pool-container h1 {
    font-size: 1.5rem;
  }
  
  .pool-instructions {
    font-size: 0.85rem;
    padding: 0.5rem;
  }
}

/* Pool Game Over Overlay */
.pool-game-over-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.pool-game-over-overlay.hidden {
  display: none;
}

.pool-game-over-overlay .game-over-content {
  background: linear-gradient(135deg, #0a3d1a, #1a4a2e);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  max-width: 420px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pool-game-over-overlay h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.pool-game-over-overlay p {
  color: #ccc;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.pool-final-score-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pool-final-score-row.hidden {
  display: none;
}

.pool-final-score-row .final-score-label {
  color: #aaa;
  font-size: 1.2rem;
}

.pool-final-score-row .final-score-value {
  color: #ffd700;
  font-size: 2rem;
  font-weight: bold;
}

.pool-leaderboard-msg {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a1a2e;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  animation: pulse 1s ease infinite;
}

.pool-leaderboard-msg.hidden {
  display: none;
}

.pool-leaderboard-inline {
  margin-bottom: 1.5rem;
}

.pool-game-over-overlay .game-over-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.pool-game-over-overlay .game-button {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #0a5c36, #0d7a48);
  color: white;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pool-game-over-overlay .game-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(10, 92, 54, 0.4);
}

.pool-game-over-overlay .game-button.secondary {
  background: linear-gradient(135deg, #555, #444);
}

/* Hangman Icon */
.hangman-icon {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  font-size: 2.5rem;
}

.hangman-figure {
  color: white;
  font-weight: bold;
  letter-spacing: 3px;
}

/* Hangman Game Styles */
.hangman-container {
  padding: 2rem;
  min-width: auto;
  width: 100%;
  max-width: 600px;
}

.hangman-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hangman-drawing {
  background: #f8f9fa;
  border-radius: 1rem;
  padding: 1rem;
}

.hangman-part {
  display: none;
}

.word-display {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.letter {
  font-size: 2.5rem;
  font-weight: bold;
  width: 50px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 4px solid #333;
  color: #333;
}

.letter.revealed {
  color: #667eea;
  animation: revealLetter 0.3s ease;
}

@keyframes revealLetter {
  0% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.wrong-letters {
  color: #666;
  font-size: 1rem;
  min-height: 1.5rem;
}

.wrong-letters span:last-child {
  color: #e74c3c;
  font-weight: bold;
  letter-spacing: 2px;
}

.keyboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 500px;
}

.key {
  width: 45px;
  height: 45px;
  border: 2px solid #ddd;
  border-radius: 0.5rem;
  background: white;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.key:hover:not(:disabled) {
  background: #667eea;
  color: white;
  border-color: #667eea;
  transform: scale(1.1);
}

.key:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.key.correct {
  background: #27ae60;
  color: white;
  border-color: #27ae60;
}

.key.wrong {
  background: #e74c3c;
  color: white;
  border-color: #e74c3c;
}

.reveal-word {
  font-size: 1.3rem;
  color: #e74c3c;
  font-weight: bold;
  margin-top: 0.5rem;
}

/* Hangman info bar */
.hangman-info-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.hangman-category-badge,
.hangman-difficulty-badge,
.hangman-streak-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.hangman-category-badge {
  background: #e8f5e9;
  color: #2e7d32;
}

.hangman-difficulty-badge {
  background: #fff3e0;
  color: #e65100;
}

.hangman-streak-badge {
  background: #fce4ec;
  color: #c62828;
  animation: hangman-streak-pulse 1.5s ease-in-out infinite;
}

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

/* Hangman hint system */
.hangman-hint-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hangman-hint-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid #ffc107;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #fff8e1, #fff3e0);
  color: #f57f17;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.hangman-hint-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffc107, #ffb300);
  color: white;
  transform: scale(1.05);
}

.hangman-hint-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hangman-hint-btn.hidden {
  display: none;
}

.hangman-hint-text {
  font-size: 0.9rem;
  color: #f57f17;
  font-style: italic;
  margin: 0;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 193, 7, 0.1);
  border-radius: 0.5rem;
}

.hangman-hint-text.hidden {
  display: none;
}

/* Hangman lives display */
.hangman-lives {
  font-size: 1.1rem;
  letter-spacing: 2px;
}

/* Hangman keyboard hint */
.hangman-keyboard-hint {
  font-size: 0.8rem;
  color: #999;
  margin: 0.25rem 0 0;
}

/* Hint-revealed letter */
.letter.hint-revealed {
  color: #f57f17;
}

/* Body part appear animation */
.hangman-part-appear {
  animation: hangman-part-drop 0.3s ease-out;
}

@keyframes hangman-part-drop {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Difficulty options on setup page */
.difficulty-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.difficulty-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border: 2px solid #ddd;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 100px;
}

.difficulty-option:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.difficulty-option input[type="radio"] {
  display: none;
}

.difficulty-option input[type="radio"]:checked + .difficulty-preview {
  transform: scale(1.2);
}

.difficulty-option:has(input:checked) {
  border-color: #667eea;
  background: #f0f2ff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.difficulty-preview {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  transition: transform 0.2s;
}

.difficulty-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.difficulty-desc {
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.15rem;
}

/* Category options on setup page */
.category-options {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.category-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}

.category-option:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.category-option input[type="radio"] {
  display: none;
}

.category-option:has(input:checked) {
  border-color: #667eea;
  background: #f0f2ff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.category-emoji {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.category-name {
  font-weight: 600;
  font-size: 0.8rem;
}

/* Responsive adjustments for hangman */
@media (max-width: 600px) {
  .hangman-container {
    min-width: auto;
    padding: 1rem;
  }

  .letter {
    font-size: 1.8rem;
    width: 35px;
    height: 45px;
  }

  .key {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .keyboard {
    gap: 0.3rem;
  }
}

/* Wordle Icon */
.wordle-icon {
  background: linear-gradient(135deg, #538d4e 0%, #3a3a3c 100%);
}

.wordle-tiles {
  display: flex;
  gap: 4px;
}

.wordle-tile {
  width: 22px;
  height: 22px;
  background: #3a3a3c;
  color: white;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}

.wordle-tile.green {
  background: #538d4e;
}

.wordle-tile.yellow {
  background: #b59f3b;
}

/* Wordle Game Styles */
.wordle-container {
  padding: 2rem;
  min-width: auto;
  width: 100%;
  max-width: 600px;
}

.wordle-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.wordle-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wordle-row {
  display: flex;
  gap: 8px;
}

.wordle-cell {
  width: 62px;
  height: 62px;
  border: 2px solid #d3d6da;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  background: white;
  transition: transform 0.1s;
}

.wordle-cell.filled {
  border-color: #878a8c;
  animation: pop 0.1s ease;
}

@keyframes pop {
  50% {
    transform: scale(1.1);
  }
}

.wordle-cell.flip {
  animation: flip 0.5s ease;
}

@keyframes flip {
  0% {
    transform: rotateX(0);
  }
  50% {
    transform: rotateX(90deg);
  }
  100% {
    transform: rotateX(0);
  }
}

.wordle-cell.correct {
  background: #538d4e;
  border-color: #538d4e;
  color: white;
}

.wordle-cell.present {
  background: #b59f3b;
  border-color: #b59f3b;
  color: white;
}

.wordle-cell.absent {
  background: #787c7e;
  border-color: #787c7e;
  color: white;
}

.wordle-message {
  position: absolute;
  top: 100px;
  background: #333;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: bold;
  animation: fadeIn 0.2s ease;
}

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

.wordle-keyboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1rem;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.wordle-key {
  min-width: 43px;
  height: 58px;
  border: none;
  border-radius: 4px;
  background: #d3d6da;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.1s;
  text-transform: uppercase;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.wordle-key.wide {
  min-width: 65px;
  font-size: 0.75rem;
}

.wordle-key:hover {
  background: #c0c3c6;
}

.wordle-key.correct {
  background: #538d4e;
  color: white;
}

.wordle-key.present {
  background: #b59f3b;
  color: white;
}

.wordle-key.absent {
  background: #787c7e;
  color: white;
}

/* Responsive adjustments for wordle */
@media (max-width: 500px) {
  .wordle-container {
    min-width: auto;
    padding: 1rem;
  }

  .wordle-cell {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .wordle-row {
    gap: 5px;
  }

  .wordle-board {
    gap: 5px;
  }

  .wordle-key {
    min-width: 32px;
    height: 50px;
    font-size: 0.75rem;
  }

  .wordle-key.wide {
    min-width: 50px;
    font-size: 0.65rem;
  }

  .keyboard-row {
    gap: 4px;
  }
}

/* Tetris Game Styles */
.tetris-container {
  padding: 2rem;
  position: relative;
}

.tetris-game {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
}

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

.tetris-board {
  display: grid;
  grid-template-columns: repeat(10, 28px);
  grid-template-rows: repeat(20, 28px);
  gap: 1px;
  background: #111;
  padding: 4px;
  border-radius: 4px;
  border: 3px solid #333;
}

.tetris-cell {
  width: 28px;
  height: 28px;
  background: #1a1a2e;
  border-radius: 2px;
}

.tetris-cell.tetris-locked {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Tetromino colors */
/* Falling piece colors - slightly transparent with glow effect */
.tetris-cyan {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.7) 0%, rgba(0, 188, 212, 0.7) 100%);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.4), 0 0 8px rgba(0, 245, 255, 0.5);
}

.tetris-yellow {
  background: linear-gradient(135deg, rgba(255, 235, 59, 0.7) 0%, rgba(255, 193, 7, 0.7) 100%);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.4), 0 0 8px rgba(255, 235, 59, 0.5);
}

.tetris-purple {
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.7) 0%, rgba(123, 31, 162, 0.7) 100%);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.4), 0 0 8px rgba(156, 39, 176, 0.5);
}

.tetris-green {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.7) 0%, rgba(56, 142, 60, 0.7) 100%);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.4), 0 0 8px rgba(76, 175, 80, 0.5);
}

.tetris-red {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.7) 0%, rgba(211, 47, 47, 0.7) 100%);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.4), 0 0 8px rgba(244, 67, 54, 0.5);
}

.tetris-blue {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.7) 0%, rgba(25, 118, 210, 0.7) 100%);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.4), 0 0 8px rgba(33, 150, 243, 0.5);
}

.tetris-orange {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.7) 0%, rgba(245, 124, 0, 0.7) 100%);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.4), 0 0 8px rgba(255, 152, 0, 0.5);
}

/* Locked piece colors - solid and bold */
.tetris-cell.tetris-locked.tetris-cyan {
  background: linear-gradient(135deg, #00f5ff 0%, #00bcd4 100%);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.tetris-cell.tetris-locked.tetris-yellow {
  background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 100%);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.tetris-cell.tetris-locked.tetris-purple {
  background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.tetris-cell.tetris-locked.tetris-green {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.tetris-cell.tetris-locked.tetris-red {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.tetris-cell.tetris-locked.tetris-blue {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.tetris-cell.tetris-locked.tetris-orange {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* Ghost piece (drop preview) */
.tetris-cell.tetris-ghost {
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 2px;
}
.tetris-cell.tetris-ghost.tetris-ghost-cyan {
  background: rgba(0, 245, 255, 0.15);
  border-color: rgba(0, 245, 255, 0.5);
}
.tetris-cell.tetris-ghost.tetris-ghost-yellow {
  background: rgba(255, 235, 59, 0.15);
  border-color: rgba(255, 235, 59, 0.5);
}
.tetris-cell.tetris-ghost.tetris-ghost-purple {
  background: rgba(156, 39, 176, 0.15);
  border-color: rgba(156, 39, 176, 0.5);
}
.tetris-cell.tetris-ghost.tetris-ghost-green {
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.5);
}
.tetris-cell.tetris-ghost.tetris-ghost-red {
  background: rgba(244, 67, 54, 0.15);
  border-color: rgba(244, 67, 54, 0.5);
}
.tetris-cell.tetris-ghost.tetris-ghost-blue {
  background: rgba(33, 150, 243, 0.15);
  border-color: rgba(33, 150, 243, 0.5);
}
.tetris-cell.tetris-ghost.tetris-ghost-orange {
  background: rgba(255, 152, 0, 0.15);
  border-color: rgba(255, 152, 0, 0.5);
}

.tetris-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tetris-hold {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 0.5rem;
}

.tetris-hold h3 {
  margin: 0 0 0.75rem 0;
  color: #333;
  font-size: 1rem;
}

.tetris-hold-display {
  display: grid;
  grid-template-columns: repeat(4, 24px);
  grid-template-rows: repeat(4, 24px);
  gap: 1px;
  background: #111;
  padding: 4px;
  border-radius: 4px;
}

.tetris-next {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 0.5rem;
}

.tetris-next h3 {
  margin: 0 0 0.75rem 0;
  color: #333;
  font-size: 1rem;
}

.tetris-next-display {
  display: grid;
  grid-template-columns: repeat(4, 24px);
  grid-template-rows: repeat(4, 24px);
  gap: 1px;
  background: #111;
  padding: 4px;
  border-radius: 4px;
}

.tetris-next-cell {
  width: 24px;
  height: 24px;
  background: #1a1a2e;
  border-radius: 2px;
}

.tetris-controls {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 0.5rem;
}

.tetris-controls h3 {
  margin: 0 0 0.75rem 0;
  color: #333;
  font-size: 1rem;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: #555;
}

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

.key-icon {
  background: #333;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  min-width: 50px;
  text-align: center;
}

.tetris-start {
  width: 100%;
}

.tetris-start.hidden {
  display: none;
}

.sound-toggle-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sound-toggle-btn.sound-on {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.sound-toggle-btn.sound-off {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.sound-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sound-toggle-btn:active {
  transform: scale(0.95);
}

.tetris-scoreboard {
  min-width: 150px;
}

.tetris-paused {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  padding: 2rem 3rem;
  border-radius: 1rem;
  text-align: center;
  z-index: 100;
}

.tetris-paused p {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
}

.tetris-paused .pause-hint {
  font-size: 1rem;
  color: #aaa;
  margin-top: 0.5rem;
}

/* Tetris Icon for home page */
.tetris-icon {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  gap: 3px;
  justify-content: center;
  align-content: center;
}

.tetris-block {
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

.tetris-block.cyan { background: #00f5ff; }
.tetris-block.yellow { background: #ffeb3b; }
.tetris-block.purple { background: #9c27b0; }
.tetris-block.red { background: #f44336; }

/* Responsive adjustments for tetris */
@media (max-width: 700px) {
  .tetris-game {
    flex-direction: column;
    align-items: center;
  }

  .tetris-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .tetris-board {
    grid-template-columns: repeat(10, 24px);
    grid-template-rows: repeat(20, 24px);
  }

  .tetris-cell {
    width: 24px;
    height: 24px;
  }
}

/* Penalty Kick Game Styles */
.penalty-container {
  padding: 1.5rem;
  position: relative;
}

.penalty-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.penalty-field {
  position: relative;
  width: 500px;
  height: 350px;
  background: linear-gradient(to bottom, #87ceeb 0%, #87ceeb 30%, #228b22 30%, #228b22 100%);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Goal Frame */
.goal-frame {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 120px;
}

.goal-net {
  position: absolute;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.3) 10px,
    rgba(255, 255, 255, 0.3) 12px
  ),
  repeating-linear-gradient(
    0deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.3) 10px,
    rgba(255, 255, 255, 0.3) 12px
  );
  background-color: rgba(200, 200, 200, 0.3);
  border-radius: 0 0 4px 4px;
}

.goal-post {
  position: absolute;
  width: 8px;
  height: 100%;
  background: linear-gradient(to right, #fff, #ddd);
  border-radius: 4px;
}

.goal-post.left {
  left: -4px;
}

.goal-post.right {
  right: -4px;
}

.goal-crossbar {
  position: absolute;
  top: -8px;
  left: -4px;
  right: -4px;
  height: 8px;
  background: linear-gradient(to bottom, #fff, #ddd);
  border-radius: 4px;
}

/* Goalie */
.goalie {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.4s ease-out;
  z-index: 10;
}

.goalie-body {
  position: relative;
  width: 60px;
  height: 80px;
}

.goalie-head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  background: #ffdab9;
  border-radius: 50%;
  border: 2px solid #333;
}

.goalie-torso {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background: #ff6b00;
  border-radius: 4px;
}

.goalie-arm {
  position: absolute;
  top: 26px;
  width: 10px;
  height: 28px;
  background: #ff6b00;
  border-radius: 5px;
  transition: transform 0.3s ease;
}

.goalie-arm.left {
  left: 5px;
  transform-origin: top center;
}

.goalie-arm.right {
  right: 5px;
  transform-origin: top center;
}

.goalie-leg {
  position: absolute;
  top: 54px;
  width: 12px;
  height: 26px;
  background: #333;
  border-radius: 4px;
}

.goalie-leg.left {
  left: 15px;
}

.goalie-leg.right {
  right: 15px;
}

/* Goalie dive animations */
.goalie.dive-left {
  transform: translateX(-120px) rotate(-30deg);
}

.goalie.dive-left .goalie-arm.left {
  transform: rotate(-60deg);
}

.goalie.dive-left .goalie-arm.right {
  transform: rotate(-80deg);
}

.goalie.dive-right {
  transform: translateX(60px) rotate(30deg);
}

.goalie.dive-right .goalie-arm.left {
  transform: rotate(80deg);
}

.goalie.dive-right .goalie-arm.right {
  transform: rotate(60deg);
}

.goalie.dive-center .goalie-arm.left {
  transform: rotate(-45deg);
}

.goalie.dive-center .goalie-arm.right {
  transform: rotate(45deg);
}

/* Soccer Ball */
.soccer-ball {
  position: absolute;
  width: 40px;
  height: 40px;
  left: 50%;
  top: 85%;
  transform: translate(-50%, -50%);
  z-index: 20;
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.4));
}

/* Aim Line */
.aim-line {
  position: absolute;
  bottom: 60px;
  left: 50%;
  width: 4px;
  height: 150px;
  background: linear-gradient(to top, rgba(255, 255, 0, 0.8), rgba(255, 255, 0, 0));
  transform-origin: bottom center;
  transform: rotate(0deg);
  pointer-events: none;
  z-index: 5;
}

/* Power Bar */
.power-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.power-bar {
  position: relative;
  width: 300px;
  height: 30px;
  background: #333;
  border-radius: 15px;
  overflow: hidden;
  border: 3px solid #555;
}

.power-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: #f44336;
  transition: background 0.1s;
}

.power-optimal-zone {
  position: absolute;
  left: 60%;
  width: 20%;
  height: 100%;
  background: rgba(76, 175, 80, 0.3);
  border-left: 2px dashed rgba(76, 175, 80, 0.8);
  border-right: 2px dashed rgba(76, 175, 80, 0.8);
}

.power-indicator {
  position: absolute;
  top: -5px;
  left: 0%;
  width: 4px;
  height: 40px;
  background: white;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.power-label {
  font-size: 0.9rem;
  color: #666;
}

/* Shot Result Overlay */
.shot-result {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1rem 2rem;
  border-radius: 10px;
  font-size: 2rem;
  font-weight: bold;
  z-index: 100;
  animation: popIn 0.3s ease;
}

.shot-result.goal {
  background: rgba(76, 175, 80, 0.95);
  color: white;
}

.shot-result.miss {
  background: rgba(244, 67, 54, 0.95);
  color: white;
}

@keyframes popIn {
  0% {
    transform: translate(-50%, -50%) scale(0);
  }
  70% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.penalty-controls {
  display: flex;
  gap: 2rem;
  margin-top: 0.5rem;
}

.penalty-scoreboard {
  min-width: 150px;
}

/* Penalty Kick Icon for home page */
.penalty-icon {
  background: linear-gradient(135deg, #228b22 0%, #1a6b1a 100%);
  position: relative;
}

.penalty-goal {
  width: 50px;
  height: 30px;
  border: 4px solid white;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  position: relative;
}

.penalty-ball {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  border: 2px solid #333;
}

/* Responsive adjustments for penalty kick */
@media (max-width: 600px) {
  .penalty-field {
    width: 100%;
    max-width: 400px;
    height: 280px;
  }

  .goal-frame {
    width: 240px;
    height: 100px;
  }

  .power-bar {
    width: 250px;
  }

  .penalty-controls {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Field Goal Game Styles */
.fieldgoal-container {
  padding: 1.5rem;
  position: relative;
}

.fieldgoal-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.football-field {
  position: relative;
  width: 500px;
  height: 350px;
  background: linear-gradient(to bottom, #87ceeb 0%, #87ceeb 25%, #228b22 25%, #228b22 100%);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Crowd */
.crowd {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 25%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, #4a4a4a, #333);
  overflow: hidden;
}

.crowd-row {
  display: flex;
  gap: 10px;
  font-size: 1.5rem;
}

.fan {
  animation: fanWave 2s ease-in-out infinite;
}

.fan:nth-child(odd) {
  animation-delay: 0.5s;
}

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

.crowd.throwing-tomatoes::after {
  content: "🍅🍅🍅";
  position: absolute;
  font-size: 2rem;
  animation: throwTomatoes 1s ease-out forwards;
}

@keyframes throwTomatoes {
  0% { top: 0; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Goal Post */
.goalpost {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 120px;
}

.goalpost-crossbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(to bottom, #ffeb3b, #ffc107);
  border-radius: 4px;
}

.goalpost-upright {
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 120px;
  background: linear-gradient(to right, #ffeb3b, #ffc107);
  border-radius: 4px 4px 0 0;
}

.goalpost-upright.left {
  left: 0;
}

.goalpost-upright.right {
  right: 0;
}

.goalpost-base {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 40px;
  background: linear-gradient(to right, #ffeb3b, #ffc107);
}

/* Wind Indicator */
.wind-indicator {
  position: absolute;
  top: 30%;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  display: flex;
  gap: 5px;
  align-items: center;
}

.wind-arrow {
  font-weight: bold;
  font-size: 1.2rem;
}

.wind-indicator.wind-changed {
  background: #4caf50;
  color: white;
  animation: pulse 0.3s ease;
}

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

/* Football */
.football {
  position: absolute;
  width: 45px;
  height: 28px;
  left: 50%;
  top: 82%;
  transform: translate(-50%, -50%);
  z-index: 20;
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.4));
}

.football.on-fire {
  filter: drop-shadow(0 0 10px #ff6600) drop-shadow(0 0 20px #ff3300);
  animation: fireGlow 0.2s ease infinite alternate;
}

@keyframes fireGlow {
  0% { filter: drop-shadow(0 0 10px #ff6600) drop-shadow(0 0 20px #ff3300); }
  100% { filter: drop-shadow(0 0 15px #ffcc00) drop-shadow(0 0 25px #ff6600); }
}

.football.crazy-spin {
  animation: crazySpin 0.7s linear;
}

@keyframes crazySpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(1080deg); }
}

.football.doink-animation {
  animation: doink 0.5s ease-out;
}

@keyframes doink {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(0.5) rotate(45deg); }
}

/* Kicker */
.kicker {
  position: absolute;
  bottom: 30px;
  left: 35%;
  z-index: 15;
}

.kicker-body {
  position: relative;
  width: 40px;
  height: 70px;
}

.kicker-head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: #ffdab9;
  border-radius: 50%;
  border: 2px solid #333;
}

.kicker-torso {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 25px;
  height: 25px;
  background: #1e90ff;
  border-radius: 4px;
}

.kicker-arm {
  position: absolute;
  top: 22px;
  right: 5px;
  width: 8px;
  height: 20px;
  background: #1e90ff;
  border-radius: 4px;
  transform: rotate(-20deg);
}

.kicker-leg {
  position: absolute;
  top: 45px;
  width: 10px;
  height: 25px;
  background: #333;
  border-radius: 4px;
}

.kicker-leg.standing {
  left: 8px;
}

.kicker-leg.kicking {
  left: 22px;
  transform-origin: top center;
}

.kicker.kicking .kicker-leg.kicking {
  animation: kickLeg 0.3s ease-out;
}

@keyframes kickLeg {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(60deg); }
  100% { transform: rotate(30deg); }
}

.kicker.tired {
  animation: tired 0.5s ease infinite;
}

@keyframes tired {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px) rotate(-2deg); }
}

/* Aim Line */
.fg-aim-line {
  position: absolute;
  bottom: 70px;
  left: 50%;
  width: 4px;
  height: 140px;
  background: linear-gradient(to top, rgba(255, 255, 0, 0.9), rgba(255, 255, 0, 0));
  transform-origin: bottom center;
  pointer-events: none;
  z-index: 5;
}

/* Flying Objects */
.flying-object {
  position: absolute;
  font-size: 3rem;
  z-index: 50;
}

.flying-object.flying.bird {
  animation: flyBird 1s ease-in-out forwards;
}

.flying-object.flying.ufo {
  animation: flyUFO 1s ease-in-out forwards;
}

@keyframes flyBird {
  0% { left: -10%; top: 35%; }
  100% { left: 110%; top: 25%; }
}

@keyframes flyUFO {
  0% { left: 50%; top: 60%; opacity: 1; }
  50% { left: 50%; top: 30%; }
  100% { left: 50%; top: -20%; opacity: 0; }
}

/* Confetti */
.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% { top: -10px; transform: rotate(0deg); opacity: 1; }
  100% { top: 100%; transform: rotate(720deg); opacity: 0; }
}

/* Power Bar */
.fg-power-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.fg-power-bar {
  position: relative;
  width: 300px;
  height: 30px;
  background: #333;
  border-radius: 15px;
  overflow: hidden;
  border: 3px solid #555;
}

.fg-power-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: #f44336;
  transition: background 0.1s;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Animate power bar when filling */
.fg-power-fill:not([style*="width: 0"]) {
  animation: powerPulse 0.15s ease-in-out infinite alternate;
}

@keyframes powerPulse {
  from { opacity: 0.9; }
  to { opacity: 1; }
}

.fg-power-optimal {
  position: absolute;
  left: 65%;
  width: 20%;
  height: 100%;
  background: rgba(76, 175, 80, 0.3);
  border-left: 2px dashed rgba(76, 175, 80, 0.8);
  border-right: 2px dashed rgba(76, 175, 80, 0.8);
}

.fg-power-indicator {
  position: absolute;
  top: -5px;
  left: 0%;
  width: 4px;
  height: 40px;
  background: white;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.fg-power-label {
  font-size: 0.9rem;
  color: #666;
}

/* Kick Result */
.fg-result {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  text-align: center;
  z-index: 100;
  animation: slideDown 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.fg-result.good {
  background: rgba(76, 175, 80, 0.95);
  color: white;
}

.fg-result.miss {
  background: rgba(244, 67, 54, 0.95);
  color: white;
}

.fg-result span {
  display: block;
}

.fg-result span:first-child {
  font-size: 1.5rem;
  font-weight: bold;
}

.fg-result-sub {
  font-size: 0.9rem;
  margin-top: 0.25rem;
  opacity: 0.9;
}

/* Mobile - even more compact */
@media (max-width: 600px) {
  .fg-result {
    padding: 0.5rem 1rem;
    top: 2%;
  }
  
  .fg-result span:first-child {
    font-size: 1.2rem;
  }
  
  .fg-result-sub {
    font-size: 0.8rem;
  }
}

.fg-controls {
  display: flex;
  gap: 2rem;
  margin-top: 0.5rem;
}

.fieldgoal-scoreboard {
  min-width: 150px;
}

.easter-egg-message {
  font-size: 1rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Rainbow Ball (Konami Code) */
.football.rainbow-ball {
  animation: rainbowGlow 0.5s linear infinite;
}

@keyframes rainbowGlow {
  0% { filter: drop-shadow(0 0 10px red) hue-rotate(0deg); }
  25% { filter: drop-shadow(0 0 10px yellow) hue-rotate(90deg); }
  50% { filter: drop-shadow(0 0 10px lime) hue-rotate(180deg); }
  75% { filter: drop-shadow(0 0 10px cyan) hue-rotate(270deg); }
  100% { filter: drop-shadow(0 0 10px red) hue-rotate(360deg); }
}

.fieldgoal-game.konami-flash {
  animation: konamiFlash 0.5s ease;
}

@keyframes konamiFlash {
  0%, 100% { background: inherit; }
  25% { background: rgba(255, 0, 0, 0.2); }
  50% { background: rgba(0, 255, 0, 0.2); }
  75% { background: rgba(0, 0, 255, 0.2); }
}

/* Night Mode */
.fieldgoal-game.night-mode .football-field {
  background: linear-gradient(to bottom, #0a0a2e 0%, #0a0a2e 25%, #1a3a1a 25%, #1a3a1a 100%);
}

.fieldgoal-game.night-mode .football-field::before {
  content: "✨⭐✨⭐✨⭐✨";
  position: absolute;
  top: 5%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1rem;
  animation: twinkle 1s ease infinite;
  z-index: 1;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fieldgoal-game.night-mode .crowd {
  background: linear-gradient(to bottom, #1a1a1a, #0a0a0a);
}

/* Disco Mode */
.fieldgoal-game.disco-mode .football-field {
  animation: discoField 0.3s ease infinite;
}

@keyframes discoField {
  0% { filter: hue-rotate(0deg) saturate(1.5); }
  25% { filter: hue-rotate(90deg) saturate(1.5); }
  50% { filter: hue-rotate(180deg) saturate(1.5); }
  75% { filter: hue-rotate(270deg) saturate(1.5); }
  100% { filter: hue-rotate(360deg) saturate(1.5); }
}

.fieldgoal-game.disco-mode .goalpost {
  animation: discoGlow 0.5s ease infinite alternate;
}

@keyframes discoGlow {
  0% { filter: drop-shadow(0 0 10px magenta); }
  100% { filter: drop-shadow(0 0 20px cyan); }
}

/* Moonshot Animation */
.football.moonshot-animation {
  animation: moonshot 1s ease-in forwards;
}

@keyframes moonshot {
  0% {
    transform: translate(-50%, -50%) scale(1);
    filter: none;
  }
  50% {
    transform: translate(-50%, -200%) scale(0.5);
    filter: drop-shadow(0 0 20px #ffff00);
  }
  100% {
    transform: translate(-50%, -500%) scale(0.1);
    filter: drop-shadow(0 0 30px white);
  }
}

/* Backwards Kick Animation */
.football.backwards-animation {
  animation: backwards 0.6s ease-out forwards;
}

@keyframes backwards {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  50% { transform: translate(-50%, 0%) scale(0.9) rotate(-180deg); }
  100% { transform: translate(-50%, 50%) scale(0.8) rotate(-360deg); }
}

/* Banana Kick Animation */
.football.banana-animation {
  animation: bananaKick 0.8s ease-out forwards;
}

@keyframes bananaKick {
  0% {
    transform: translate(-50%, -50%) scale(1);
    filter: none;
  }
  25% {
    transform: translate(-100%, -100%) scale(0.8) rotate(45deg);
    filter: drop-shadow(0 0 5px #FFD700);
  }
  75% {
    transform: translate(0%, -200%) scale(0.5) rotate(-45deg);
    filter: drop-shadow(0 0 10px #FFD700);
  }
  100% {
    transform: translate(-50%, -300%) scale(0.4) rotate(0deg);
    filter: drop-shadow(0 0 5px #FFD700);
  }
}

/* Flying Cow */
.flying-object.flying.cow {
  animation: flyCow 1.2s ease-in-out forwards;
}

@keyframes flyCow {
  0% { left: 50%; top: 90%; transform: scale(0.5); }
  50% { left: 50%; top: 40%; transform: scale(1.5) rotate(20deg); }
  100% { left: 120%; top: 20%; transform: scale(1) rotate(45deg); }
}

/* Flying Superhero */
.flying-object.flying.superhero {
  animation: flySuperhero 1s ease-out forwards;
}

@keyframes flySuperhero {
  0% { right: -10%; left: auto; top: 80%; transform: scale(1); }
  30% { right: 40%; top: 40%; transform: scale(1.5); }
  100% { right: 120%; top: -10%; transform: scale(2) rotate(-15deg); }
}

/* Field Goal Icon for home page */
.fieldgoal-icon {
  background: linear-gradient(135deg, #228b22 0%, #1a6b1a 100%);
  position: relative;
}

.fieldgoal-post {
  width: 50px;
  height: 40px;
  position: relative;
}

.fieldgoal-post::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 20px;
  background: #ffeb3b;
}

.fieldgoal-post::after {
  content: "";
  position: absolute;
  top: 0;
  left: 5px;
  right: 5px;
  height: 4px;
  background: #ffeb3b;
  box-shadow: -18px -20px 0 0 #ffeb3b, 18px -20px 0 0 #ffeb3b;
}

.fieldgoal-ball {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 10px;
  background: #8B4513;
  border-radius: 50%;
  border: 1px solid #5D3A1A;
}

/* Responsive adjustments for field goal */
@media (max-width: 600px) {
  .football-field {
    width: 100%;
    max-width: 400px;
    height: 280px;
  }

  .goalpost {
    width: 130px;
    height: 100px;
  }

  .fg-power-bar {
    width: 250px;
  }

  .fg-controls {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ==================== Breakout Game Styles ==================== */

.breakout-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.breakout-game {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
}

.breakout-main {
  position: relative;
}

#breakoutCanvas {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.breakout-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 150px;
}

.breakout-controls {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 8px;
}

.breakout-controls h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  color: #fff;
  text-align: center;
}

.breakout-controls .control-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}

.breakout-controls .key-icon {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  min-width: 60px;
  text-align: center;
}

.breakout-start {
  width: 100%;
}

/* Power-up legend */
.breakout-powerup-legend {
  margin-top: 1rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.breakout-powerup-legend h3 {
  margin: 0 0 0.4rem 0;
  font-size: 0.85rem;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.powerup-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #ccc;
  padding: 0.15rem 0;
}

.powerup-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* Active power-ups display */
.breakout-active-powerups {
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
}

.breakout-active-powerups h3 {
  margin: 0 0 0.3rem 0;
  font-size: 0.8rem;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.active-powerup-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #fff;
  padding: 0.2rem 0;
}

.powerup-timer {
  font-size: 0.7rem;
  color: #ffd700;
  font-weight: bold;
}

.breakout-scoreboard {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.breakout-paused {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  padding: 2rem 3rem;
  border-radius: 12px;
  text-align: center;
  z-index: 10;
}

.breakout-paused p {
  margin: 0;
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
}

.breakout-paused .pause-hint {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
}

/* Breakout Icon for home page */
.breakout-icon {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.breakout-bricks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  width: 50px;
}

.breakout-brick {
  width: 10px;
  height: 6px;
  border-radius: 1px;
}

.breakout-brick.red { background: #e74c3c; }
.breakout-brick.orange { background: #e67e22; }
.breakout-brick.yellow { background: #f1c40f; }
.breakout-brick.green { background: #2ecc71; }

.breakout-ball {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  margin-top: 8px;
}

.breakout-paddle {
  width: 24px;
  height: 6px;
  background: linear-gradient(180deg, #9b59b6 0%, #8e44ad 100%);
  border-radius: 3px;
  margin-top: 4px;
}

/* Responsive adjustments for breakout */
@media (max-width: 900px) {
  .breakout-game {
    flex-direction: column;
    align-items: center;
  }

  .breakout-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    min-width: auto;
  }

  .breakout-scoreboard {
    position: static;
    margin-bottom: 1rem;
  }

  .breakout-powerup-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.8rem;
    align-items: center;
  }

  .breakout-powerup-legend h3 {
    width: 100%;
    text-align: center;
  }

  .breakout-active-powerups {
    width: 100%;
  }

  .active-powerup-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.8rem;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .breakout-container {
    padding: 1rem;
  }
  
  .breakout-container h1 {
    font-size: 1.5rem;
  }

  #breakoutCanvas {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .breakout-controls {
    padding: 0.75rem;
  }

  .breakout-controls .control-item {
    font-size: 0.75rem;
  }
  
  .breakout-paused {
    padding: 1.5rem 2rem;
  }
  
  .breakout-paused p {
    font-size: 1.5rem;
  }
}

/* Matchy Moo Icon */
.matchy-moo-icon {
  background: linear-gradient(135deg, #1a5f2a 0%, #0d3d18 100%);
  position: relative;
}

.matchy-cards-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.matchy-card-mini {
  width: 24px;
  height: 30px;
  background: linear-gradient(135deg, #1a5f2a 0%, #0d3d18 100%);
  border: 2px solid #c41e3a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
  color: #ffd700;
}

.matchy-card-mini.flipped-mini {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
  color: #c41e3a;
}

/* ==================== Responsive Visibility Classes ==================== */

/* Mobile-only: hidden on desktop, shown on touch devices */
.mobile-only {
  display: none !important;
}

/* Desktop-only: shown on desktop, hidden on touch devices */
.desktop-only {
  /* Use initial display value - don't override with flex */
}

@media (hover: none) and (pointer: coarse) {
  /* Touch devices */
  .mobile-only {
    display: flex !important;
  }
  
  .mobile-only.tetris-inline-score {
    display: flex !important;
  }

  .desktop-only {
    display: none !important;
  }
}

/* ==================== Tetris Touch Controls ==================== */

.tetris-touch-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.tetris-touch-controls .touch-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.tetris-touch-controls .touch-btn {
  width: 60px;
  height: 50px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.tetris-touch-controls .touch-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
}

.tetris-touch-controls .drop-btn {
  width: 130px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

@media (hover: none) and (pointer: coarse) {
  .tetris-touch-controls {
    display: flex;
  }
}

/* Mobile start button for Tetris */
.tetris-start-mobile {
  display: none;
  width: 100%;
  padding: 1.2rem 2rem;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  animation: pulse 2s infinite;
}

.tetris-start-mobile.hidden {
  display: none !important;
}

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

@media (hover: none) and (pointer: coarse) {
  .tetris-start-mobile {
    display: block;
  }
}

/* ==================== Kick Game Touch Controls ==================== */

.kick-touch-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

.kick-touch-controls .touch-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  width: 100%;
}

.kick-touch-controls .touch-btn {
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
}

.kick-touch-controls .aim-btn {
  flex: 1;
  max-width: 150px;
  padding: 0.8rem 1rem;
}

.kick-touch-controls .kick-btn {
  width: 100%;
  max-width: 310px;
  padding: 1.2rem 2rem;
  font-size: 1.3rem;
  background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}

.kick-touch-controls .touch-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
}

/* Visual feedback when holding kick button */
.kick-touch-controls .kick-btn:active {
  transform: scale(0.97);
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  box-shadow: 0 2px 10px rgba(39, 174, 96, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.1);
  animation: holdPulse 0.3s ease-in-out infinite alternate;
}

@keyframes holdPulse {
  from {
    box-shadow: 0 2px 10px rgba(39, 174, 96, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.1);
  }
  to {
    box-shadow: 0 4px 20px rgba(39, 174, 96, 0.7), inset 0 0 30px rgba(255, 255, 255, 0.2);
  }
}

@media (hover: none) and (pointer: coarse) {
  .kick-touch-controls {
    display: flex;
  }
}

/* ==================== Matchy Moo Card Game ==================== */

/* Card count selector in setup */
.card-count-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.card-count-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 12px;
  transition: transform 0.2s, background 0.2s;
}

.card-count-option:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.1);
}

.card-count-option input[type="radio"] {
  display: none;
}

.card-count-preview {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a5f2a 0%, #0d3d18 100%);
  border: 3px solid #c41e3a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card-count-option input[type="radio"]:checked + .card-count-preview {
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.card-count-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Matchy Moo container */
.matchy-moo-container {
  max-width: 1200px;
}

.matchy-moo-scoreboard {
  min-width: 150px;
}

/* Card board grid */
.matchy-moo-board {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  justify-content: center;
  margin: 0.5rem auto;
}

/* 12 cards: 4 columns x 3 rows */
.matchy-moo-board.cards-12 {
  grid-template-columns: repeat(4, 1fr);
  max-width: 420px;
}

/* 24 cards: 6 columns x 4 rows */
.matchy-moo-board.cards-24 {
  grid-template-columns: repeat(6, 1fr);
  max-width: 620px;
}

/* 36 cards: 6 columns x 6 rows */
.matchy-moo-board.cards-36 {
  grid-template-columns: repeat(6, 1fr);
  max-width: 620px;
}

/* Individual card */
.matchy-card {
  width: 90px;
  height: 112px;
  perspective: 1000px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

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

.matchy-card.flipped .card-front {
  visibility: hidden;
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Card front - Harvoli themed back design */
.card-front {
  background: linear-gradient(135deg, #1a5f2a 0%, #0d3d18 100%);
  border: 3px solid #c41e3a;
  flex-direction: column;
  overflow: hidden;
}

.card-front::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 30%),
    radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 30%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.03) 10px,
      rgba(255, 255, 255, 0.03) 20px
    );
  pointer-events: none;
}

.harvoli-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.harvoli-h {
  font-size: 2.2rem;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1;
}

.harvoli-text {
  font-size: 0.7rem;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Card back - Christmas emoji display (plain white, no Harvoli design) */
.card-back {
  background: #ffffff;
  border: 3px solid #e0e0e0;
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
  z-index: 2;
}

.card-emoji {
  font-size: 2.8rem;
}

/* Matched cards */
.matchy-card.matched .card-inner {
  transform: rotateY(180deg);
}

.matchy-card.matched .card-back {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-color: #28a745;
  box-shadow: 0 0 20px rgba(40, 167, 69, 0.4);
}

.matchy-card.matched {
  cursor: default;
  animation: matchPop 0.3s ease;
}

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

/* Instructions */
.matchy-moo-instructions {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Tablet responsiveness */
@media (max-width: 900px) {
  .matchy-card {
    width: 80px;
    height: 100px;
  }

  .harvoli-h {
    font-size: 2rem;
  }

  .harvoli-text {
    font-size: 0.6rem;
    letter-spacing: 2px;
  }

  .card-emoji {
    font-size: 2.5rem;
  }

  .matchy-moo-board {
    gap: 8px;
    padding: 12px;
  }

  .matchy-moo-board.cards-12 {
    max-width: 370px;
  }

  .matchy-moo-board.cards-24 {
    max-width: 550px;
  }

  .matchy-moo-board.cards-36 {
    max-width: 550px;
  }
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .matchy-moo-board {
    gap: 6px;
    padding: 8px;
  }

  .matchy-card {
    width: 60px;
    height: 75px;
  }

  .harvoli-h {
    font-size: 1.5rem;
  }

  .harvoli-text {
    font-size: 0.45rem;
    letter-spacing: 1px;
  }

  .card-emoji {
    font-size: 1.8rem;
  }

  /* 12 cards: 4 columns */
  .matchy-moo-board.cards-12 {
    grid-template-columns: repeat(4, 1fr);
    max-width: 280px;
  }

  /* 24 cards: 4 columns */
  .matchy-moo-board.cards-24 {
    grid-template-columns: repeat(4, 1fr);
    max-width: 280px;
  }

  /* 36 cards: 4 columns */
  .matchy-moo-board.cards-36 {
    grid-template-columns: repeat(4, 1fr);
    max-width: 280px;
  }

  .card-count-preview {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

@media (max-width: 400px) {
  .matchy-card {
    width: 50px;
    height: 62px;
  }

  .harvoli-h {
    font-size: 1.2rem;
  }

  .harvoli-text {
    font-size: 0.35rem;
  }

  .card-emoji {
    font-size: 1.5rem;
  }

  .matchy-moo-board.cards-12 {
    max-width: 240px;
  }

  .matchy-moo-board.cards-24 {
    max-width: 240px;
  }

  .matchy-moo-board.cards-36 {
    max-width: 240px;
  }
}

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

/* Home page snake icon */
.snake-icon {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.snake-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
}

.snake-segment {
  width: 20px;
  height: 20px;
  background: #22c55e;
  border-radius: 4px;
}

.snake-segment.head {
  background: transparent;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.snake-food {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Speed options */
.speed-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.speed-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.speed-option:hover {
  background: #e9ecef;
}

.speed-option:has(input:checked) {
  background: #e7e3ff;
  border-color: #667eea;
}

.speed-option input[type="radio"] {
  accent-color: #667eea;
}

.speed-name {
  font-weight: 500;
}

/* Snake game container */
.snake-container {
  max-width: none;
  width: auto;
}

.snake-game {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
}

.snake-main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#snakeCanvas {
  border: 3px solid #333;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.snake-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 180px;
}

.snake-controls, .snake-tips {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: left;
}

.snake-controls h3, .snake-tips h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem 0;
  color: #333;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.control-item .key {
  background: #333;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
}

.snake-tips ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
}

.snake-tips li {
  margin-bottom: 0.5rem;
}

/* Snake mobile controls */
.snake-mobile-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1rem;
}

.snake-control-row {
  display: flex;
  gap: 0.25rem;
}

.snake-control-btn {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.snake-control-btn:active {
  transform: scale(0.95);
  opacity: 0.9;
}

/* Game buttons */
.game-button {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}

.game-button.start-button {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
}

.game-button.start-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
}

.game-button.back-button {
  background: #6c757d;
  color: white;
}

.game-button.back-button:hover {
  background: #5a6268;
}

/* Game result modal */
.game-result {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.game-result.hidden {
  display: none;
}

.result-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.result-content h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.result-content p {
  color: #666;
  margin-bottom: 1.5rem;
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.stat {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
}

/* Paused overlay */
.paused-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  padding: 2rem 3rem;
  border-radius: 1rem;
  z-index: 50;
}

.paused-overlay.hidden {
  display: none;
}

.paused-content {
  text-align: center;
  color: white;
}

.paused-content h2 {
  color: white;
  margin-bottom: 0.5rem;
}

.paused-content p {
  color: rgba(255, 255, 255, 0.7);
}

/* Snake leaderboard */
.snake-leaderboard {
  margin: 1rem 0;
}

.snake-leaderboard .leaderboard {
  background: rgba(255, 255, 255, 0.95);
  max-width: 280px;
}

.snake-leaderboard-msg {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  margin: 0.5rem 0;
  animation: leaderboard-celebrate 0.5s ease-out;
}

/* Snake scoreboard positioning */
.snake-scoreboard {
  position: static;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.snake-scoreboard .score-item {
  border-bottom: none;
  flex-direction: column;
  gap: 0.25rem;
}

/* Snake responsive */
@media (max-width: 900px) {
  .snake-game {
    flex-direction: column;
    align-items: center;
  }

  .snake-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 420px;
  }

  .snake-controls, .snake-tips {
    flex: 1;
    min-width: 150px;
  }

  .snake-sidebar .game-button {
    width: auto;
    flex: 1;
  }
}

@media (max-width: 500px) {
  #snakeCanvas {
    width: 300px;
    height: 300px;
  }

  .snake-mobile-controls {
    display: flex;
  }

  .snake-control-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .snake-controls {
    display: none;
  }

  .snake-scoreboard {
    gap: 1rem;
  }

  .score-label {
    font-size: 0.8rem;
  }

  .score-value {
    font-size: 1.2rem;
  }
}

/* ======================= */
/* PLAYER NAME PERSISTENCE */
/* ======================= */

.player-input-wrapper {
  position: relative;
}

.saved-player-notice {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #e7f3e7 0%, #d4edda 100%);
  border-radius: 0.5rem;
  border: 1px solid #28a745;
  font-size: 0.9rem;
}

.saved-player-notice.hidden {
  display: none;
}

.welcome-back {
  color: #155724;
}

.welcome-back strong {
  color: #0d4f1c;
}

.not-me-link {
  color: #667eea;
  text-decoration: none;
  font-size: 0.85rem;
  margin-left: auto;
}

.not-me-link:hover {
  text-decoration: underline;
}

/* ======================= */
/* NAVIGATION              */
/* ======================= */

.main-nav {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #667eea;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo:hover {
  color: #764ba2;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  color: #333;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover {
  background: #f0f0f0;
  color: #667eea;
}

.nav-link.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.main-content {
  padding-top: 70px;
  padding-bottom: 2rem;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Hamburger button - hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-hamburger.open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile nav */
@media (max-width: 600px) {
  .nav-hamburger {
    display: flex;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }
  
  .nav-links.open {
    max-height: 300px;
    padding: 0.5rem 0;
  }
  
  .nav-link {
    padding: 1rem 1.5rem;
    border-radius: 0;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  .nav-link.active {
    border-radius: 0;
  }
}

/* ======================= */
/* ABOUT PAGE              */
/* ======================= */

.about-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.about-container h1 {
  text-align: center;
  color: #333;
  margin-bottom: 2rem;
}

.about-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.about-section:last-of-type {
  border-bottom: none;
}

.about-section h2 {
  color: #667eea;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.about-section p {
  color: #555;
  line-height: 1.8;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.team-member {
  text-align: center;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 1rem;
  transition: transform 0.2s;
}

.team-member:hover {
  transform: translateY(-5px);
}

.team-emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.team-member h3 {
  color: #333;
  margin-bottom: 0.5rem;
}

.team-member p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.about-cta {
  text-align: center;
  margin-top: 2rem;
}

/* ======================= */
/* CHANGELOG PAGE          */
/* ======================= */

.changelog-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.changelog-container h1 {
  text-align: center;
  color: #333;
  margin-bottom: 1rem;
}

.changelog-intro {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.changelog-entry {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 1rem;
  border-left: 4px solid #667eea;
}

.changelog-date {
  flex-shrink: 0;
  text-align: center;
  padding: 0.5rem;
  min-width: 70px;
}

.changelog-date .date-day {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  color: #667eea;
}

.changelog-date .date-year {
  display: block;
  font-size: 0.85rem;
  color: #999;
}

.changelog-content h3 {
  color: #333;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.changelog-content p {
  color: #555;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.changelog-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.changelog-tag.new-game {
  background: #d4edda;
  color: #155724;
}

.changelog-tag.improvement {
  background: #cce5ff;
  color: #004085;
}

.changelog-tag.announcement {
  background: #fff3cd;
  color: #856404;
}

.changelog-tag.fix {
  background: #f8d7da;
  color: #721c24;
}

/* Mobile changelog */
@media (max-width: 500px) {
  .changelog-entry {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .changelog-date {
    text-align: left;
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
  }
}

/* ======================= */
/* BACK TO GAMES BUTTON    */
/* ======================= */

.back-to-games {
  margin-bottom: 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.back-link:hover {
  background: #f0f0f0;
  color: #764ba2;
}

/* Position nicely in game containers */
.new-game-container .back-to-games,
.game-container .back-to-games {
  text-align: left;
  margin-bottom: 1.5rem;
}

/* ======================= */
/* BONKERS BONK GAME       */
/* ======================= */

.bonkers-sound-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 100;
  width: 44px;
  height: 44px;
  background: rgba(76, 175, 80, 0.3);
  border: 2px solid rgba(76, 175, 80, 0.8);
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bonkers-sound-toggle:hover {
  transform: scale(1.1);
}

.bonkers-sound-toggle:active {
  transform: scale(0.95);
}

.bonkers-bonk-container {
  max-width: 500px;
}

.bonkers-bonk-scoreboard {
  gap: 2rem;
}

.bonkers-bonk-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
  border-radius: 1rem;
  margin: 1.5rem auto;
  max-width: 400px;
}

.mole-hole {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hole-dirt {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, #5D4037 0%, #3E2723 100%);
  border-radius: 50%;
  z-index: 2;
}

.mole {
  position: absolute;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 80%;
  background: linear-gradient(180deg, #A1887F 0%, #795548 100%);
  border-radius: 50% 50% 40% 40%;
  transition: bottom 0.15s ease-out;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mole-up {
  bottom: 20%;
}

.mole-bonked {
  bottom: 0% !important;
}

.mole-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 15%;
}

.mole-eyes {
  display: flex;
  gap: 20%;
  margin-bottom: 5%;
}

.mole-eye {
  width: 12px;
  height: 12px;
  background: #333;
  border-radius: 50%;
  position: relative;
}

.mole-eye::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
}

.mole-nose {
  width: 15px;
  height: 12px;
  background: #FF6B6B;
  border-radius: 50%;
}

.mole-emoji {
  font-size: 2rem;
  margin-top: -10%;
}

.bonk-effect {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%) scale(0);
  font-size: 2.5rem;
  z-index: 10;
  opacity: 0;
  transition: all 0.15s ease-out;
  pointer-events: none;
}

.bonk-effect.show {
  transform: translateX(-50%) scale(1.2);
  opacity: 1;
}

.mole-hole.miss {
  animation: shake 0.2s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.bonkers-bonk-instructions {
  color: #666;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Timer warning states */
.timer-warning {
  color: #f0ad4e !important;
  animation: pulse 1s infinite;
}

.timer-critical {
  color: #d9534f !important;
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Result stats */
.result-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

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

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: #667eea;
}

/* Start button in game */
.start-button {
  margin-bottom: 1rem;
}

.start-button.hidden {
  display: none;
}

/* Home page icon for Bonkers Bonk */
.bonkers-bonk-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.bonkers-holes-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: 50px;
}

.bonkers-hole-mini {
  width: 14px;
  height: 14px;
  background: #8B4513;
  border-radius: 50%;
  position: relative;
}

.bonkers-hole-mini.has-mole::after {
  content: '🐹';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
}

.bonkers-hammer {
  font-size: 1.5rem;
}

/* Mobile responsiveness for Bonkers Bonk */
@media (max-width: 500px) {
  .bonkers-bonk-container {
    padding: 1.5rem 1rem;
  }
  
  .bonkers-bonk-board {
    gap: 0.75rem;
    padding: 1rem;
    max-width: 280px;
  }
  
  .mole-eye {
    width: 8px;
    height: 8px;
  }
  
  .mole-eye::after {
    width: 3px;
    height: 3px;
  }
  
  .mole-nose {
    width: 10px;
    height: 8px;
  }
  
  .mole-emoji {
    font-size: 1.5rem;
  }
  
  .bonk-effect {
    font-size: 2rem;
  }
  
  /* Result popup mobile fixes */
  .bonkers-bonk-container .game-result {
    padding: 1rem;
    margin: 1rem -0.5rem;
  }
  
  .bonkers-bonk-container .game-result h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }
  
  .bonkers-bonk-container .game-result p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }
  
  .bonkers-bonk-container .result-stats {
    gap: 0.75rem;
    margin: 1rem 0;
  }
  
  .bonkers-bonk-container .stat-item {
    min-width: 70px;
  }
  
  .bonkers-bonk-container .stat-label {
    font-size: 0.75rem;
  }
  
  .bonkers-bonk-container .stat-value {
    font-size: 1.1rem;
  }
  
  .bonkers-bonk-container .result-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .bonkers-bonk-container .result-buttons .play-button {
    margin-left: 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}

/* ======================= */
/* FOOTER                  */
/* ======================= */

.main-footer {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  padding: 2rem 1.5rem;
  margin-top: auto;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content {
  text-align: center;
}

.footer-tagline {
  font-size: 1.1rem;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
}

.footer-divider {
  color: rgba(255, 255, 255, 0.5);
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin: 0;
}

/* ======================= */
/* GAME SEARCH BAR         */
/* ======================= */

.game-search-bar {
  max-width: 400px;
  margin: 0 auto 1rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 1;
}

.game-search-input {
  width: 100%;
  padding: 10px 40px 10px 40px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s, background 0.3s;
}

.game-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.game-search-input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

.search-clear-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.search-clear-btn.hidden {
  display: none;
}

.no-results-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
}

.no-results-message.hidden {
  display: none;
}

/* ======================= */
/* GAME FILTER BAR         */
/* ======================= */

.game-filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.2rem;
  border: 2px solid #e9ecef;
  border-radius: 2rem;
  background: white;
  color: #495057;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-1px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.game-count {
  text-align: center;
  color: #868e96;
  font-size: 0.85rem;
  margin: 0.5rem 0 0.5rem;
  font-weight: 500;
}

@keyframes filterIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .game-filter-bar {
    gap: 0.4rem;
  }
}

/* ======================= */
/* RANDOM GAME BUTTON      */
/* ======================= */

.random-game-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px dashed #e9ecef;
}

.random-game-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: wiggle 3s ease-in-out infinite;
}

.random-game-button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 25px rgba(245, 87, 108, 0.4);
  animation: none;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ======================= */
/* GAME INSTRUCTIONS       */
/* ======================= */

.game-instructions {
  background: #f8f9fa;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.game-instructions h3 {
  color: #667eea;
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.game-instructions p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* ======================= */
/* SHARE SCORE             */
/* ======================= */

.share-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.share-section p {
  font-size: 0.9rem !important;
  color: #666 !important;
  margin-bottom: 0.75rem !important;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
}

.share-button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.share-button.copy-link {
  background: #667eea;
  color: white;
}

.share-button.twitter {
  background: #1DA1F2;
  color: white;
}

.share-button.whatsapp {
  background: #25D366;
  color: white;
}

.share-button.copied {
  background: #28a745;
}

@media (max-width: 500px) {
  .share-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .share-button {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }
}

/* ======================= */
/* MOBILE-FIRST IMPROVEMENTS */
/* ======================= */

/* Global mobile improvements */
@media (max-width: 600px) {
  /* Reduce padding on containers */
  .home-container, .new-game-container, .game-container {
    padding: 1.5rem 1rem;
    margin: 0.5rem;
    border-radius: 0.75rem;
  }
  
  /* Smaller headings */
  h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }
  
  /* Improve button sizes for touch */
  .play-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    min-height: 48px; /* Touch target size */
  }
  
  .play-button.secondary {
    margin-left: 0;
    margin-top: 0.5rem;
  }
  
  /* Stack result buttons on mobile */
  .result-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  /* Game status smaller */
  .game-status {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  /* Scoreboard horizontal on mobile */
  .scoreboard {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    min-width: auto;
  }
  
  .score-item {
    flex-direction: column;
    border-bottom: none;
    padding: 0.25rem;
    min-width: 60px;
    text-align: center;
  }
  
  .score-label {
    font-size: 0.8rem;
  }
  
  .score-value {
    font-size: 1.25rem;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .home-container, .new-game-container, .game-container {
    padding: 1rem 0.75rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  .game-selection {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .game-card {
    width: auto;
    padding: 1rem;
  }
  
  .game-card h2 {
    font-size: 0.9rem;
  }
  
  .game-icon {
    width: 60px;
    height: 60px;
  }
  
  /* Tic-Tac-Toe even smaller on tiny screens */
  .game-board {
    grid-template-columns: repeat(3, minmax(60px, 80px));
    grid-template-rows: repeat(3, minmax(60px, 80px));
    gap: 6px;
  }
}

/* Home page game cards - responsive grid */
@media (max-width: 768px) {
  .game-selection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .game-card {
    width: auto;
    padding: 1.25rem;
  }
  
  .game-card h2 {
    font-size: 1rem;
    margin: 0.75rem 0 0.25rem;
  }
  
  .game-card p {
    font-size: 0.8rem;
  }
}

/* Improve touch targets across games */
.key, .wordle-key, .touch-btn, .matchy-card, .mole-hole {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

/* Prevent zoom on input focus (iOS) */
input, select, textarea {
  font-size: 16px;
}

/* Prevent text selection during gameplay */
.game-page {
  -webkit-user-select: none;
  user-select: none;
}

/* Ensure canvas games don't overflow */
canvas {
  max-width: 100%;
  height: auto;
  touch-action: none;
}

/* ==================== TETRIS MOBILE-FIRST OVERHAUL ==================== */

/* Inline mobile score for Tetris */
.tetris-inline-score {
  display: none;
  justify-content: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #666;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

.tetris-inline-score strong {
  color: #667eea;
  font-size: 1rem;
}

@media (hover: none) and (pointer: coarse), (max-width: 500px) {
  .tetris-inline-score {
    display: flex;
  }
}

/* Mobile Tetris - fit everything on screen without scrolling */
@media (max-width: 500px) {
  /* Remove padding to maximize space */
  .tetris-container {
    padding: 0.5rem;
  }
  
  /* Hide title on mobile during active play - takes too much space */
  .tetris-container h1 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
  }
  
  /* Compact status text */
  .tetris-container .game-status {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  /* Stack everything vertically and center */
  .tetris-game {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  /* Dynamic cell sizing based on viewport */
  .tetris-board {
    /* Calculate: (viewport width - padding) / 10 columns, max 20px */
    --cell-size: min(calc((100vw - 40px) / 10), 20px);
    grid-template-columns: repeat(10, var(--cell-size));
    grid-template-rows: repeat(20, var(--cell-size));
    padding: 2px;
    border-width: 2px;
  }
  
  .tetris-cell {
    width: var(--cell-size);
    height: var(--cell-size);
  }
  
  /* Sidebar becomes a compact row */
  .tetris-sidebar {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
  }
  
  /* Compact "Hold" preview */
  .tetris-hold {
    padding: 0.5rem;
  }
  
  .tetris-hold h3 {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
  }
  
  .tetris-hold-display {
    grid-template-columns: repeat(4, 12px);
    gap: 1px;
  }

  .tetris-hold-display .tetris-next-cell {
    width: 12px;
    height: 12px;
  }

  /* Compact "Next" preview */
  .tetris-next {
    padding: 0.5rem;
  }
  
  .tetris-next h3 {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
  }
  
  .tetris-next-display {
    grid-template-columns: repeat(4, 12px);
    gap: 1px;
  }
  
  .tetris-next-cell {
    width: 12px;
    height: 12px;
  }
  
  /* Hide desktop controls section on mobile */
  .tetris-sidebar .tetris-controls {
    display: none !important;
  }
  
  /* Hide sidebar start button on mobile (using the top one) */
  .tetris-sidebar .tetris-start {
    display: none;
  }
  
  /* Compact touch controls */
  .tetris-touch-controls {
    margin-top: 0.5rem;
    padding: 0.5rem;
    gap: 0.25rem;
  }
  
  .tetris-touch-controls .touch-row {
    gap: 0.25rem;
  }
  
  .tetris-touch-controls .touch-btn {
    width: 50px;
    height: 44px;
    font-size: 1rem;
  }
  
  .tetris-touch-controls .drop-btn {
    width: 110px;
  }
  
  /* Mobile start button more compact */
  .tetris-start-mobile {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  
  /* Compact scoreboard for tetris */
  .tetris-scoreboard {
    padding: 0.5rem;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .tetris-scoreboard .score-item {
    min-width: 50px;
    padding: 0.1rem;
  }
  
  .tetris-scoreboard .score-label {
    font-size: 0.65rem;
  }
  
  .tetris-scoreboard .score-value {
    font-size: 1rem;
  }
}

/* Even smaller screens (iPhone SE, older phones) */
@media (max-width: 375px) {
  .tetris-container h1 {
    font-size: 1rem;
  }
  
  .tetris-container .game-status {
    font-size: 0.9rem;
  }
  
  .tetris-board {
    --cell-size: min(calc((100vw - 30px) / 10), 18px);
  }
  
  .tetris-hold-display {
    grid-template-columns: repeat(4, 10px);
  }

  .tetris-hold-display .tetris-next-cell {
    width: 10px;
    height: 10px;
  }

  .tetris-next-display {
    grid-template-columns: repeat(4, 10px);
  }
  
  .tetris-next-cell {
    width: 10px;
    height: 10px;
  }
  
  .tetris-touch-controls .touch-btn {
    width: 44px;
    height: 40px;
    font-size: 0.9rem;
  }
  
  .tetris-touch-controls .drop-btn {
    width: 96px;
  }
  
  .tetris-scoreboard .score-item {
    min-width: 40px;
  }
  
  .tetris-scoreboard .score-label {
    font-size: 0.6rem;
  }
  
  .tetris-scoreboard .score-value {
    font-size: 0.9rem;
  }
}

/* Landscape mobile - use height constraint */
@media (max-height: 600px) and (orientation: landscape) {
  .tetris-container {
    padding: 0.25rem;
  }
  
  .tetris-container h1 {
    display: none;
  }
  
  .tetris-container .game-status {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }
  
  .tetris-game {
    flex-direction: row;
    gap: 0.5rem;
  }
  
  .tetris-board {
    --cell-size: min(calc((100vh - 80px) / 20), 20px);
  }
  
  .tetris-touch-controls {
    flex-direction: row;
    gap: 0.5rem;
  }
  
  .tetris-touch-controls .touch-row {
    flex-direction: column;
  }
}

/* =============================================
   FLOPPY OLIVE GAME STYLES
   ============================================= */

.floppy-olive-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-overflow-scrolling: none;
  overscroll-behavior: none;
}

.floppy-olive-page.bg-sky {
  background: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 70%, #98D4E8 100%);
}

.floppy-olive-page.bg-sunset {
  background: linear-gradient(180deg, #FF6B6B 0%, #FFA07A 40%, #FFD93D 80%, #6BCB77 100%);
}

.floppy-olive-page.bg-night {
  background: linear-gradient(180deg, #0D1B2A 0%, #1B263B 50%, #415A77 100%);
}

.floppy-olive-page.bg-forest {
  background: linear-gradient(180deg, #87CEEB 0%, #90EE90 60%, #228B22 100%);
}

.floppy-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 0;
}

.floppy-container {
  position: relative;
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  max-width: 500px;
  width: 100%;
  height: calc(100vh - 100px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.floppy-canvas {
  display: block;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  touch-action: none;
  cursor: pointer;
}

/* Score display - top center */
.floppy-score-display {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.floppy-current-score {
  font-size: 3rem;
  font-weight: bold;
  color: white;
  text-shadow: 
    2px 2px 0 #333,
    -2px -2px 0 #333,
    2px -2px 0 #333,
    -2px 2px 0 #333,
    0 4px 8px rgba(0, 0, 0, 0.3);
}

/* High score - top right */
.floppy-high-score {
  position: fixed;
  top: 15px;
  right: 15px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

/* Overlays */
.floppy-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  z-index: 50;
}

.floppy-overlay.hidden {
  display: none;
}

.floppy-overlay-content {
  text-align: center;
  padding: 2rem;
}

.floppy-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 3px 3px 0 #333;
  margin-bottom: 1rem;
}

.floppy-player-name {
  font-size: 1.5rem;
  color: #FFD700;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.floppy-instructions {
  font-size: 1.2rem;
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.floppy-start-btn {
  font-size: 1.3rem;
  padding: 1rem 2.5rem;
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* Game over styles */
.floppy-game-over-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #FF6B6B;
  text-shadow: 3px 3px 0 #333;
  margin-bottom: 1rem;
}

.floppy-final-score {
  font-size: 2rem;
  color: white;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 0 #333;
}

.floppy-best-score {
  font-size: 1.2rem;
  color: #FFD700;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.floppy-medal {
  margin-bottom: 1rem;
  min-height: 3rem;
}

.floppy-buttons {
  flex-wrap: wrap;
  gap: 0.75rem;
}

.floppy-buttons .play-button {
  margin: 0;
}

.floppy-buttons .play-button.secondary {
  margin-left: 0;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
}

/* Difficulty options styling */
.difficulty-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.difficulty-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s;
}

.difficulty-option:hover {
  background: #e9ecef;
}

.difficulty-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
}

.difficulty-name {
  font-weight: 600;
  min-width: 80px;
}

.difficulty-desc {
  font-size: 0.85rem;
  color: #666;
}

/* Floppy Olive icon for home page */
.floppy-olive-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
}

.floppy-olive-icon .olive-char {
  animation: float-olive 1.5s ease-in-out infinite;
}

@keyframes float-olive {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.floppy-olive-icon .pipe-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 8px;
  gap: 12px;
}

.floppy-olive-icon .pipe-top,
.floppy-olive-icon .pipe-bottom {
  width: 16px;
  background: linear-gradient(90deg, #3d8b3d 0%, #5cb85c 40%, #4cae4c 60%, #3d8b3d 100%);
  border-radius: 2px;
}

.floppy-olive-icon .pipe-top {
  height: 20px;
}

.floppy-olive-icon .pipe-bottom {
  height: 20px;
}

/* Simon Sez icon on home page */
.simon-sez-icon {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.simon-preview {
  width: 70px;
  height: 70px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  border-radius: 50%;
  overflow: hidden;
  background: #1a1a2e;
  padding: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.simon-quad {
  transition: all 0.3s ease;
}

.simon-quad.green {
  background: #22c55e;
  border-radius: 100% 0 0 0;
}

.simon-quad.red {
  background: #ef4444;
  border-radius: 0 100% 0 0;
}

.simon-quad.yellow {
  background: #eab308;
  border-radius: 0 0 0 100%;
}

.simon-quad.blue {
  background: #3b82f6;
  border-radius: 0 0 100% 0;
}

.game-card:hover .simon-quad {
  filter: brightness(1.2);
}

/* Slap Shot icon on home page */
.slap-shot-icon {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slap-shot-preview {
  width: 80px;
  height: 60px;
  background: linear-gradient(180deg, #e8f4fc 0%, #a0d0ed 100%);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.slap-shot-preview .preview-goal {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 15px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 4px,
    rgba(200, 200, 200, 0.8) 4px,
    rgba(200, 200, 200, 0.8) 5px
  );
  border: 2px solid #cc0000;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}

.slap-shot-preview .preview-goalie {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
}

.slap-shot-preview .preview-puck {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
}

.game-card:hover .slap-shot-preview {
  background: linear-gradient(180deg, #d0e8f7 0%, #80c0e8 100%);
}

/* Mobile responsiveness for Floppy Olive */
@media (max-width: 480px) {
  .floppy-current-score {
    font-size: 2.5rem;
  }
  
  .floppy-high-score {
    font-size: 0.9rem;
  }
  
  .floppy-title {
    font-size: 2rem;
  }
  
  .floppy-game-over-title {
    font-size: 2rem;
  }
  
  .floppy-final-score {
    font-size: 1.5rem;
  }
  
  .floppy-overlay-content {
    padding: 1.5rem;
  }
  
  .floppy-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .floppy-buttons .play-button {
    width: 100%;
    max-width: 200px;
  }
}

@media (max-width: 375px) {
  .floppy-current-score {
    font-size: 2rem;
  }
  
  .floppy-title {
    font-size: 1.7rem;
  }
  
  .floppy-instructions {
    font-size: 1rem;
  }
}

/* Prevent pull-to-refresh on mobile */
.floppy-olive-page {
  position: fixed;
  overflow: hidden;
}

/* Ensure no scrollbars */
.floppy-olive-page::-webkit-scrollbar {
  display: none;
}

.floppy-olive-page {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* =============================================
   SLAP SHOT GAME STYLES
   ============================================= */

.slap-shot-page {
  background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
  min-height: 100vh;
}

.slap-shot-wrapper {
  padding-top: 0.5rem;
}

.slap-shot-container {
  max-width: 500px;
}

.slap-shot-container h1 {
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slap-shot-scoreboard {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.5rem 1rem;
}

.slap-shot-scoreboard .score-item {
  color: white;
}

.slap-shot-scoreboard .score-value {
  color: #60a5fa;
}

.slap-shot-game {
  margin-top: 1rem;
}

/* Ice Rink */
.hockey-rink {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  max-height: 350px;
  background: linear-gradient(180deg, 
    #e8f4fc 0%, 
    #d0e8f7 30%, 
    #b8dcf2 60%, 
    #a0d0ed 100%
  );
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.1);
}

/* Ice markings */
.hockey-rink::before {
  content: '';
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border: 3px solid rgba(200, 30, 30, 0.5);
  border-radius: 50%;
}

.hockey-rink::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(200, 30, 30, 0.4);
}

/* Hockey Goal */
.hockey-goal {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 22%;
}

.goal-net-hockey {
  position: absolute;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 8px,
    rgba(200, 200, 200, 0.6) 8px,
    rgba(200, 200, 200, 0.6) 10px
  ),
  repeating-linear-gradient(
    0deg,
    transparent,
    transparent 8px,
    rgba(200, 200, 200, 0.6) 8px,
    rgba(200, 200, 200, 0.6) 10px
  );
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 5px 5px 0 0;
}

.goal-post-hockey {
  position: absolute;
  width: 6px;
  height: 100%;
  background: linear-gradient(90deg, #cc0000 0%, #990000 100%);
  border-radius: 3px;
}

.goal-post-hockey.left {
  left: 0;
}

.goal-post-hockey.right {
  right: 0;
}

.goal-crossbar-hockey {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(180deg, #cc0000 0%, #990000 100%);
  border-radius: 3px;
}

/* Hockey Goalie */
.hockey-goalie {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 90px;
  transition: left 0.3s ease-out, transform 0.3s ease-out;
}

.goalie-body-hockey {
  position: relative;
  width: 100%;
  height: 100%;
}

.goalie-mask {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 32px;
  background: linear-gradient(180deg, #f5f5f5 0%, #ddd 100%);
  border-radius: 50% 50% 45% 45%;
  border: 2px solid #333;
}

.goalie-mask::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 10px;
  background: repeating-linear-gradient(
    90deg,
    #333 0px,
    #333 2px,
    transparent 2px,
    transparent 4px
  );
}

.goalie-chest {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 55px;
  height: 35px;
  background: linear-gradient(180deg, #1a365d 0%, #0d1b2a 100%);
  border-radius: 8px;
}

.goalie-blocker {
  position: absolute;
  top: 35px;
  right: 5px;
  width: 20px;
  height: 28px;
  background: linear-gradient(90deg, #cc0000 0%, #990000 100%);
  border-radius: 3px;
  transform: rotate(10deg);
}

.goalie-glove {
  position: absolute;
  top: 32px;
  left: 0;
  width: 25px;
  height: 22px;
  background: linear-gradient(90deg, #cc0000 0%, #990000 100%);
  border-radius: 5px 15px 15px 5px;
  transform: rotate(-10deg);
}

.goalie-pads {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 35px;
  background: linear-gradient(180deg, #f5f5f5 0%, #ddd 100%);
  border-radius: 5px;
  border: 2px solid #1a365d;
}

/* Goalie dive animations */
.hockey-goalie.dive-left {
  left: 30%;
  transform: translateX(-50%) rotate(-25deg);
}

.hockey-goalie.dive-right {
  left: 70%;
  transform: translateX(-50%) rotate(25deg);
}

.hockey-goalie.dive-center {
  transform: translateX(-50%) scaleY(0.8);
}

/* Hockey Puck */
.hockey-puck {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, 0);
  z-index: 10;
}

.puck-inner {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, #444 0%, #111 70%, #000 100%);
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

/* Aim Line */
.aim-line-hockey {
  position: absolute;
  bottom: 12%;
  left: 50%;
  width: 4px;
  height: 100px;
  background: linear-gradient(to top, 
    rgba(255, 50, 50, 0.8) 0%, 
    rgba(255, 50, 50, 0.4) 50%,
    transparent 100%
  );
  transform-origin: bottom center;
  pointer-events: none;
  z-index: 5;
}

/* Shot Result */
.shot-result-hockey {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  z-index: 20;
  animation: result-pop 0.3s ease-out;
}

.shot-result-hockey.goal {
  color: #22c55e;
  font-size: 2.5rem;
}

@keyframes result-pop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Power bar hockey style */
.hockey-power {
  margin-top: 1rem;
}

.power-fill-hockey {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #22c55e;
  border-radius: 10px;
  transition: width 0.02s linear;
}

.power-optimal-zone-hockey {
  position: absolute;
  left: 65%;
  width: 20%;
  height: 100%;
  background: rgba(34, 197, 94, 0.3);
  border-left: 2px dashed rgba(34, 197, 94, 0.6);
  border-right: 2px dashed rgba(34, 197, 94, 0.6);
}

/* Hockey controls */
.hockey-controls {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.hockey-touch-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.hockey-touch-controls .touch-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.hockey-touch-controls .touch-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hockey-touch-controls .aim-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

.hockey-touch-controls .shoot-btn {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: white;
  padding: 1rem 2rem;
  font-size: 1.2rem;
}

/* Sound toggle */
.slap-shot-sound-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 100;
  width: 44px;
  height: 44px;
  background: rgba(76, 175, 80, 0.3);
  border: 2px solid rgba(76, 175, 80, 0.8);
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

/* Game result */
.slap-shot-page .game-result {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.slap-shot-final-stats {
  margin: 1rem 0;
}

.slap-shot-final-stats .stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: #3b82f6;
}

.slap-shot-leaderboard-msg {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  margin: 0.5rem 0;
  animation: leaderboard-celebrate 0.5s ease-out;
}

.slap-shot-leaderboard {
  margin: 1rem 0;
}

.slap-shot-leaderboard .leaderboard {
  background: rgba(240, 240, 240, 0.9);
  max-width: 280px;
}

.slap-shot-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Responsive */
@media (max-width: 480px) {
  .hockey-rink {
    max-height: 280px;
  }
  
  .hockey-goalie {
    width: 60px;
    height: 70px;
  }
  
  .goalie-mask {
    width: 22px;
    height: 26px;
  }
  
  .goalie-chest {
    width: 45px;
    height: 28px;
    top: 22px;
  }
  
  .goalie-pads {
    width: 40px;
    height: 28px;
  }
  
  .hockey-puck {
    width: 24px;
    height: 24px;
  }
}

/* =============================================
   SIMON SEZ GAME STYLES
   ============================================= */

.simon-sez-page {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.simon-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px;
}

.simon-header {
  text-align: center;
  margin-bottom: 1rem;
}

.simon-header h1 {
  color: white;
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.simon-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

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

.simon-stat .stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

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

.simon-status {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  min-height: 1.5rem;
}

.simon-board {
  position: relative;
  width: min(90vw, 320px);
  height: min(90vw, 320px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  background: #1a1a2e;
  border-radius: 50%;
  box-shadow: 
    0 0 30px rgba(0, 0, 0, 0.5),
    inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.simon-btn {
  border: none;
  cursor: pointer;
  transition: all 0.1s ease;
  opacity: 0.7;
}

.simon-btn:active, .simon-btn.pressed {
  opacity: 1;
  transform: scale(0.98);
}

.simon-btn.lit {
  opacity: 1;
  filter: brightness(1.3);
  box-shadow: 0 0 30px currentColor;
}

.simon-btn.wrong {
  background: #ef4444 !important;
  opacity: 1;
}

.simon-green {
  background: #22c55e;
  border-radius: 100% 0 0 0;
  color: #22c55e;
}

.simon-green.lit, .simon-green:active {
  background: #4ade80;
}

.simon-red {
  background: #ef4444;
  border-radius: 0 100% 0 0;
  color: #ef4444;
}

.simon-red.lit, .simon-red:active {
  background: #f87171;
}

.simon-yellow {
  background: #eab308;
  border-radius: 0 0 0 100%;
  color: #eab308;
}

.simon-yellow.lit, .simon-yellow:active {
  background: #facc15;
}

.simon-blue {
  background: #3b82f6;
  border-radius: 0 0 100% 0;
  color: #3b82f6;
}

.simon-blue.lit, .simon-blue:active {
  background: #60a5fa;
}

.simon-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: #1a1a2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.simon-start-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.simon-start-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.simon-start-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.simon-instructions {
  margin-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.simon-instructions p {
  margin: 0.25rem 0;
}

/* Sound toggle */
.simon-sound-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 100;
  width: 44px;
  height: 44px;
  background: rgba(76, 175, 80, 0.3);
  border: 2px solid rgba(76, 175, 80, 0.8);
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Game over overlay */
.simon-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.simon-overlay.hidden {
  display: none;
}

.simon-overlay-content {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  max-width: 360px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.simon-overlay-content h2 {
  font-size: 1.8rem;
  margin: 0 0 0.5rem 0;
  color: #333;
}

.simon-overlay-content > p {
  color: #666;
  margin-bottom: 1rem;
}

.simon-final-stats {
  margin-bottom: 1rem;
}

.simon-final-stat .stat-label {
  display: block;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.simon-final-stat .stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: #667eea;
}

.simon-leaderboard-msg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  margin: 0.5rem 0;
  animation: leaderboard-celebrate 0.5s ease-out;
}

.simon-leaderboard {
  margin: 1rem 0;
}

.simon-leaderboard .leaderboard {
  background: rgba(240, 240, 240, 0.8);
  max-width: 280px;
}

.simon-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.simon-buttons .play-button {
  margin: 0;
  flex: 0 0 auto;
}

/* Responsive */
@media (max-width: 400px) {
  .simon-board {
    width: 280px;
    height: 280px;
  }
  
  .simon-center {
    width: 70px;
    height: 70px;
  }
  
  .simon-start-btn {
    width: 50px;
    height: 50px;
    font-size: 0.8rem;
  }
}

/* =============================================
   HOPPY HARVEY GAME STYLES
   ============================================= */

.hoppy-harvey-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-overflow-scrolling: none;
  overscroll-behavior: none;
  background: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 50%, #90EE90 100%);
}

.hoppy-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 0;
}

.hoppy-container {
  position: relative;
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  max-width: 500px;
  width: 100%;
  height: calc(100vh - 80px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.hoppy-canvas {
  display: block;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  touch-action: none;
  cursor: pointer;
}

/* Score display - top left */
.hoppy-score-display {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hoppy-current-score {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hoppy-current-score .score-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}

.hoppy-current-score .score-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 
    2px 2px 0 #333,
    -2px -2px 0 #333,
    2px -2px 0 #333,
    -2px 2px 0 #333,
    0 4px 8px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.hoppy-coins {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: #FFD700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hoppy-coins .coin-icon {
  font-size: 1.3rem;
}

/* High score - top right */
.hoppy-high-score {
  position: fixed;
  top: 15px;
  right: 15px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 100;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
}

/* Sound toggle button */
.hoppy-harvey-page .sound-toggle {
  position: fixed;
  top: 55px;
  right: 15px;
  z-index: 100;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hoppy-harvey-page .sound-toggle:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: scale(1.1);
}

.hoppy-harvey-page .sound-toggle:active {
  transform: scale(0.95);
}

/* Touch hint overlay */
.hoppy-touch-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hoppy-touch-hint.visible {
  opacity: 1;
}

.swipe-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.swipe-arrow {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
}

.swipe-arrow.up {
  animation: bounce-up 0.8s ease-in-out infinite;
}

@keyframes bounce-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.swipe-arrows .horizontal {
  display: flex;
  gap: 2rem;
}

/* Overlays */
.hoppy-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  z-index: 50;
}

.hoppy-overlay.hidden {
  display: none;
}

.hoppy-overlay-content {
  text-align: center;
  padding: 2rem;
  max-width: 90%;
}

.hoppy-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 3px 3px 0 #333;
  margin-bottom: 1rem;
}

.hoppy-player-name {
  font-size: 1.5rem;
  color: #4CAF50;
  font-weight: 600;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hoppy-instructions {
  font-size: 1rem;
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  line-height: 1.6;
}

.hoppy-instructions p {
  margin: 0.5rem 0;
}

.hoppy-start-btn {
  font-size: 1.3rem;
  padding: 1rem 2.5rem;
  animation: pulse 1.5s ease-in-out infinite;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.hoppy-start-btn:hover {
  background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
}

/* Game over styles */
.hoppy-game-over-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #FF6B6B;
  text-shadow: 3px 3px 0 #333;
  margin-bottom: 0.5rem;
}

.hoppy-death-reason {
  font-size: 1.1rem;
  color: #ffa726;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hoppy-final-score {
  font-size: 2rem;
  color: white;
  font-weight: bold;
  margin-bottom: 0.25rem;
  text-shadow: 2px 2px 0 #333;
}

.hoppy-final-coins {
  font-size: 1.2rem;
  color: #FFD700;
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hoppy-best-score {
  font-size: 1.2rem;
  color: #81c784;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hoppy-medal {
  margin-bottom: 1rem;
  min-height: 3rem;
}

/* Share section spacing in Hoppy Harvey */
.hoppy-overlay-content .share-section {
  margin-bottom: 1rem;
}

/* Leaderboard in Hoppy Harvey */
.hoppy-leaderboard {
  margin: 1rem 0;
}

.hoppy-leaderboard .leaderboard {
  background: rgba(255, 255, 255, 0.9);
  max-width: 280px;
}

.hoppy-leaderboard-msg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  margin: 0.5rem 0;
  animation: leaderboard-celebrate 0.5s ease-out;
}

@keyframes leaderboard-celebrate {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.hoppy-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.hoppy-buttons .play-button {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-width: 120px;
}

.hoppy-buttons .play-button:first-child {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.hoppy-buttons .play-button.secondary {
  margin-left: 0;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
}

/* Character selection options */
.character-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.character-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.character-option:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.character-option:has(input:checked) {
  background: #e8f5e9;
  border-color: #4CAF50;
}

.character-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.character-preview {
  font-size: 3rem;
  line-height: 1;
}

.character-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
}

/* Hoppy Harvey icon for home page */
.hoppy-harvey-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hoppy-harvey-icon .hoppy-char {
  font-size: 3rem;
  animation: hoppy-bounce 0.6s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

@keyframes hoppy-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hoppy-harvey-icon .hoppy-lanes {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 60px;
  z-index: 1;
}

.hoppy-harvey-icon .hoppy-lane {
  height: 8px;
  border-radius: 2px;
}

.hoppy-harvey-icon .hoppy-lane.grass {
  background: #4CAF50;
}

.hoppy-harvey-icon .hoppy-lane.road {
  background: #424242;
}

.hoppy-harvey-icon .hoppy-lane.water {
  background: #2196F3;
}

/* Mobile responsiveness for Hoppy Harvey */
@media (max-width: 480px) {
  .hoppy-current-score .score-value {
    font-size: 2rem;
  }
  
  .hoppy-high-score {
    font-size: 0.85rem;
  }
  
  .hoppy-title {
    font-size: 2rem;
  }
  
  .hoppy-game-over-title {
    font-size: 2rem;
  }
  
  .hoppy-final-score {
    font-size: 1.5rem;
  }
  
  .hoppy-overlay-content {
    padding: 1.5rem;
  }
  
  .hoppy-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hoppy-buttons .play-button {
    width: 100%;
    max-width: 200px;
  }
  
  .character-options {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .character-preview {
    font-size: 2.5rem;
  }
  
  .character-name {
    font-size: 0.8rem;
  }
}

@media (max-width: 375px) {
  .hoppy-current-score .score-value {
    font-size: 1.8rem;
  }
  
  .hoppy-title {
    font-size: 1.7rem;
  }
  
  .hoppy-instructions {
    font-size: 0.9rem;
  }
}

/* Prevent pull-to-refresh on mobile */
.hoppy-harvey-page {
  position: fixed;
  overflow: hidden;
}

/* Ensure no scrollbars */
.hoppy-harvey-page::-webkit-scrollbar {
  display: none;
}

.hoppy-harvey-page {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* NEW Badge Styles */
.new-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ff6b6b, #feca57);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
  animation: badge-pulse 2s ease-in-out infinite;
  z-index: 10;
}

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

/* Theme Selection Styles */
.theme-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  justify-content: center;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 3px solid transparent;
  background: #f8f9fa;
  transition: all 0.2s ease;
  min-width: 90px;
}

.theme-option:hover {
  transform: scale(1.05);
  background: #f0f0f0;
}

.theme-option input[type="radio"] {
  display: none;
}

.theme-option input[type="radio"]:checked + .theme-icon {
  transform: scale(1.15);
}

.theme-option:has(input[type="radio"]:checked) {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.theme-icon {
  font-size: 2rem;
  transition: transform 0.2s ease;
}

.theme-name {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #333;
  font-weight: 500;
}

/* =============================================
   CONNECT FOUR GAME STYLES
   ============================================= */

/* Home icon */
.connect-four-icon {
  width: 68px;
  height: 52px;
  display: grid;
  grid-template-columns: repeat(5, 10px);
  grid-template-rows: repeat(3, 10px);
  gap: 2px;
  justify-content: center;
  align-content: center;
  padding: 4px;
  background: #2563eb;
  border-radius: 4px;
  overflow: hidden;
}

.connect-four-icon .c4-slot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1e40af;
}

.connect-four-icon .c4-slot.red {
  background: #ef4444;
}

.connect-four-icon .c4-slot.yellow {
  background: #eab308;
}

/* Game container */
.connect-four-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  padding-top: 0.5rem;
}

.connect-four-header {
  text-align: center;
  margin-bottom: 0.75rem;
}

.connect-four-header h1 {
  color: white;
  font-size: 1.75rem;
  margin: 0 0 0.5rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.player-turn {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1.25rem;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: bold;
  color: white;
  display: inline-block;
  transition: all 0.3s ease;
}

.player-turn.red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.player-turn.yellow {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
}

/* Board */
.connect-four-board-wrapper {
  perspective: 1000px;
  overflow: hidden;
  border-radius: 12px;
}

.connect-four-column-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 0 12px 0.35rem;
}

.connect-four-column-label {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
}

.connect-four-board {
  display: flex;
  gap: 4px;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  padding: 12px;
  border-radius: 12px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.connect-four-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.connect-four-column:hover {
  transform: translateY(-2px);
}

.connect-four-column:active {
  transform: translateY(0);
}

.connect-four-column.keyboard-selected .connect-four-cell {
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.4),
    0 0 0 3px rgba(255, 255, 255, 0.55);
}

.connect-four-cell {
  width: 44px;
  height: 44px;
  background: #1e40af;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4);
}

.connect-four-disc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.3s ease;
}

.connect-four-disc.red {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.3),
    inset 0 -3px 6px rgba(0, 0, 0, 0.2),
    inset 0 3px 6px rgba(255, 255, 255, 0.3);
}

.connect-four-disc.yellow {
  background: linear-gradient(135deg, #fde047 0%, #eab308 50%, #ca8a04 100%);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.3),
    inset 0 -3px 6px rgba(0, 0, 0, 0.2),
    inset 0 3px 6px rgba(255, 255, 255, 0.3);
}

.connect-four-disc.dropping {
  animation: drop-disc 0.3s ease-out;
}

@keyframes drop-disc {
  0% {
    transform: translateY(-60px);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  80% {
    transform: translateY(3px);
  }
  100% {
    transform: translateY(0);
  }
}

.connect-four-disc.winning {
  animation: winning-pulse 0.6s ease-in-out infinite;
}

@keyframes winning-pulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.1);
    filter: brightness(1.3);
  }
}

/* Status */
.connect-four-status {
  min-height: 40px;
  margin: 0.75rem 0;
  font-size: 1.25rem;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.connect-four-controls-hint {
  margin: 0.65rem 0 0.2rem;
  color: white;
  font-size: 0.88rem;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
}

.connect-four-status.winner {
  animation: winner-bounce 0.5s ease;
}

.connect-four-status.invalid {
  color: #fee2e2;
  animation: invalid-shake 0.35s ease;
}

@keyframes winner-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

@keyframes invalid-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Controls */
.connect-four-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.connect-four-controls .control-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.connect-four-controls .sound-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.connect-four-controls .sound-btn.sound-off {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.connect-four-controls .restart-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.connect-four-controls .home-btn {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
}

.connect-four-controls .control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.connect-four-controls .control-btn:active {
  transform: scale(0.95);
}

/* Scoreboard */
.connect-four-scoreboard {
  display: flex;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.connect-four-scoreboard .score-item {
  text-align: center;
  color: white;
}

.connect-four-scoreboard .score-label {
  display: block;
  font-size: 0.8rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.connect-four-scoreboard .score-value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
}

.connect-four-scoreboard .score-item.red .score-value {
  color: #f87171;
}

.connect-four-scoreboard .score-item.yellow .score-value {
  color: #fde047;
}

/* Mobile responsive */
@media (max-width: 400px) {
  .connect-four-cell {
    width: 38px;
    height: 38px;
  }
  
  .connect-four-disc {
    width: 30px;
    height: 30px;
  }
  
  .connect-four-board {
    padding: 8px;
    gap: 3px;
  }
  
  .connect-four-column {
    gap: 3px;
  }
  
  .connect-four-header h1 {
    font-size: 1.5rem;
  }
  
  .connect-four-scoreboard {
    gap: 0.75rem;
    padding: 0.5rem 1rem;
  }
  
  .connect-four-scoreboard .score-label {
    font-size: 0.7rem;
  }
  
  .connect-four-scoreboard .score-value {
    font-size: 1.25rem;
  }
}

/* Even smaller screens */
@media (max-width: 340px) {
  .connect-four-cell {
    width: 34px;
    height: 34px;
  }
  
  .connect-four-disc {
    width: 26px;
    height: 26px;
  }
}

/* Connect Four Game Over Overlay */
.connect-four-game-over-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.connect-four-game-over-overlay.hidden {
  display: none;
}

.connect-four-game-over-overlay .game-over-content {
  background: linear-gradient(135deg, #1a1a3e, #2a1a4e);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  max-width: 420px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.connect-four-game-over-overlay h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.connect-four-game-over-overlay p {
  color: #ccc;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.connect-four-game-over-overlay .final-score-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.connect-four-game-over-overlay .final-score-row.hidden {
  display: none;
}

.connect-four-game-over-overlay .final-score-label {
  color: #aaa;
  font-size: 1.2rem;
}

.connect-four-game-over-overlay .final-score-value {
  color: #ffd700;
  font-size: 2rem;
  font-weight: bold;
}

.connect-four-leaderboard-msg {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a1a2e;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  animation: pulse 1s ease infinite;
}

.connect-four-leaderboard-msg.hidden {
  display: none;
}

.connect-four-leaderboard {
  margin-bottom: 1.5rem;
}

.connect-four-game-over-overlay .game-over-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.connect-four-game-over-overlay .game-button {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
}

.connect-four-game-over-overlay .game-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.connect-four-game-over-overlay .game-button.secondary {
  background: linear-gradient(135deg, #555, #444);
}

.connect-four-game-over-overlay .game-button.secondary:hover {
  box-shadow: 0 4px 15px rgba(100, 100, 100, 0.4);
}

/* ===== NUMBER CRUNCH (2048) ===== */
.number-crunch-bg {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  min-height: 100vh;
  padding: 0.5rem;
}

.number-crunch-board {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 1;
  touch-action: none;
  user-select: none;
}

.nc-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  font-weight: 800;
  font-size: clamp(1rem, 5vw, 1.6rem);
  color: #f9f6f2;
  transition: all 0.12s ease;
}

.nc-cell.nc-new { animation: ncPop 0.2s ease-out; }
@keyframes ncPop {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Tile colors */
.nc-val-0 { background: rgba(255,255,255,0.06); }
.nc-val-2 { background: #eee4da; color: #776e65; }
.nc-val-4 { background: #ede0c8; color: #776e65; }
.nc-val-8 { background: #f2b179; color: #fff; }
.nc-val-16 { background: #f59563; color: #fff; }
.nc-val-32 { background: #f67c5f; color: #fff; }
.nc-val-64 { background: #f65e3b; color: #fff; }
.nc-val-128 { background: #edcf72; color: #fff; font-size: clamp(0.9rem, 4.5vw, 1.4rem); }
.nc-val-256 { background: #edcc61; color: #fff; font-size: clamp(0.9rem, 4.5vw, 1.4rem); }
.nc-val-512 { background: #edc850; color: #fff; font-size: clamp(0.9rem, 4.5vw, 1.4rem); }
.nc-val-1024 { background: #edc53f; color: #fff; font-size: clamp(0.75rem, 3.5vw, 1.2rem); }
.nc-val-2048 { background: #edc22e; color: #fff; font-size: clamp(0.75rem, 3.5vw, 1.2rem); text-shadow: 0 0 10px rgba(255,255,255,0.5); }
.nc-val-4096 { background: #3c3a32; color: #fff; font-size: clamp(0.75rem, 3.5vw, 1.2rem); }
.nc-val-8192 { background: #3c3a32; color: #fff; font-size: clamp(0.75rem, 3.5vw, 1.2rem); }

/* Direction buttons */
.number-crunch-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 0.75rem;
}
.nc-btn-row {
  display: flex;
  gap: 6px;
}
.nc-dir-btn {
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.nc-dir-btn:active {
  background: rgba(255,255,255,0.25);
  transform: scale(0.95);
}

/* Overlay */
.number-crunch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}
.number-crunch-overlay .overlay-content {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  color: #fff;
  max-width: 320px;
  width: 90%;
}
.number-crunch-overlay h2 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.number-crunch-overlay p { margin: 0 0 1rem; opacity: 0.8; }

/* Home page icon */
.number-crunch-icon { display: flex; align-items: center; justify-content: center; }
.nc-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 70px;
}
.nc-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.5rem;
  font-weight: 800;
  padding: 2px;
  color: #fff;
}
.nc-tile.t2 { background: #eee4da; color: #776e65; }
.nc-tile.t4 { background: #ede0c8; color: #776e65; }
.nc-tile.t8 { background: #f2b179; }
.nc-tile.t16 { background: #f59563; }
.nc-tile.t32 { background: #f67c5f; }
.nc-tile.t64 { background: #f65e3b; }
.nc-tile.t128 { background: #edcf72; font-size: 0.4rem; }
.nc-tile.t256 { background: #edcc61; font-size: 0.4rem; }
.nc-tile.t2048 { background: #edc22e; font-size: 0.35rem; }

/* ===== SPACE BLASTERS ===== */
.space-blasters-bg { background: #0a0a1a; min-height: 100vh; padding: 0.5rem; }
.canvas-wrapper { display: flex; justify-content: center; width: 100%; }
.canvas-wrapper canvas { max-width: 100%; border-radius: 8px; display: block; }

/* Home icon */
.space-blasters-icon { display: flex; align-items: center; justify-content: center; }
.sb-preview { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sb-preview .sb-alien { font-size: 1.2rem; }
.sb-preview .sb-ship { font-size: 1.5rem; }

/* ===== PADDLE BATTLE ===== */
.paddle-battle-bg { background: #0f172a; min-height: 100vh; padding: 0.5rem; }

/* Home icon */
.paddle-battle-icon { display: flex; align-items: center; justify-content: center; }
.pb-preview { display: flex; align-items: center; gap: 12px; }
.pb-paddle { width: 6px; height: 30px; border-radius: 3px; }
.pb-paddle.left { background: #60a5fa; }
.pb-paddle.right { background: #f87171; }
.pb-ball { width: 10px; height: 10px; border-radius: 50%; background: #fbbf24; }

/* ===== BUBBLE POP ===== */
.bubble-pop-bg { background: #1e1b4b; min-height: 100vh; padding: 0.5rem; }

/* Home icon */
.bubble-pop-icon { display: flex; align-items: center; justify-content: center; }
.bp-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; width: 60px; }
.bp-bubble { width: 16px; height: 16px; border-radius: 50%; }
.bp-bubble.red { background: #f87171; }
.bp-bubble.blue { background: #60a5fa; }
.bp-bubble.green { background: #4ade80; }
.bp-bubble.yellow { background: #fbbf24; }
.bp-bubble.purple { background: #c084fc; }

/* ===== BATTY BALL ===== */
.batty-ball-page {
  background: linear-gradient(180deg, #0a3d0a 0%, #1a5c1a 30%, #2d8a2d 60%, #8B6914 80%, #654321 100%);
  min-height: 100vh;
}
.batty-ball-wrapper { max-width: 520px; margin: 0 auto; padding: 10px 15px; }
.batty-ball-scoreboard {
  display: flex; justify-content: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap;
}
.batty-ball-scoreboard .score-item { min-width: 50px; }
.batty-ball-container { text-align: center; }
.batty-ball-container h1 {
  color: #fff; font-size: 1.5rem; margin: 0 0 4px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.batty-ball-sound-toggle {
  position: fixed; top: 10px; right: 10px; z-index: 100;
  background: rgba(0,0,0,0.4); border: none; border-radius: 50%;
  width: 44px; height: 44px; font-size: 1.3rem; cursor: pointer;
}
.batty-ball-pitch-info {
  color: #ffd700; font-size: 1.1rem; font-weight: bold;
  min-height: 1.5em; text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Baseball Field — Stadium Look */
.baseball-field {
  position: relative; width: 100%; height: 380px;
  border-radius: 12px; overflow: hidden; margin: 6px 0;
  background: #1a5c1a;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.4);
}

/* Stadium crowd stands (top section) */
.stadium-crowd {
  position: absolute; top: 0; left: 0; right: 0; height: 22%;
  background:
    repeating-linear-gradient(90deg,
      #4a3728 0px, #4a3728 8px, #5c4433 8px, #5c4433 16px
    );
  border-bottom: 3px solid #3a2a1a;
  z-index: 1;
}
.stadium-crowd::after {
  content: "👤👤👤👥👤👤👥👤👤👤👥👤👤👤👥👤";
  position: absolute; bottom: 2px; left: 0; right: 0;
  font-size: 0.6rem; letter-spacing: 2px;
  text-align: center; opacity: 0.5;
  overflow: hidden; white-space: nowrap;
}

/* Grass with mow stripes */
.field-grass {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(180deg,
      #2d8a2d 0px, #2d8a2d 20px,
      #34943d 20px, #34943d 40px
    );
}

/* Infield dirt arc */
.field-infield-dirt {
  position: absolute;
  width: 70%; height: 55%;
  bottom: 5%; left: 15%;
  background: radial-gradient(ellipse at 50% 100%, #c4a35a 0%, #b8963f 40%, transparent 70%);
  border-radius: 50% 50% 0 0;
  opacity: 0.7;
}

/* Diamond shape */
.field-diamond {
  position: absolute;
  width: 100px; height: 100px;
  bottom: 20%; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(196, 163, 90, 0.3);
  border: 2px solid rgba(255,255,255,0.4);
}

/* Base paths */
.base-path {
  position: absolute; background: rgba(255,255,255,0.2);
  z-index: 2;
}
.base-path-1 { width: 2px; height: 70px; bottom: 22%; left: calc(50% + 35px); transform: rotate(-45deg); transform-origin: bottom center; }
.base-path-2 { width: 2px; height: 70px; bottom: 22%; left: calc(50% - 35px); transform: rotate(45deg); transform-origin: bottom center; }
.base-path-3 { width: 2px; height: 70px; bottom: calc(22% + 50px); left: calc(50% - 35px); transform: rotate(-45deg); transform-origin: bottom center; }
.base-path-home { width: 2px; height: 70px; bottom: calc(22% + 50px); left: calc(50% + 35px); transform: rotate(45deg); transform-origin: bottom center; }

/* Pitcher's mound */
.pitchers-mound {
  position: absolute; top: 30%; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 20px;
  background: radial-gradient(ellipse, #c4a35a 0%, transparent 70%);
  border-radius: 50%;
  z-index: 2;
}

/* Pitcher — emoji based */
.bb-pitcher {
  position: absolute; top: 12%; left: 50%;
  transform: translateX(-50%);
  z-index: 5; transition: transform 0.3s;
}
.pitcher-emoji { font-size: 2.2rem; display: block; line-height: 1; }
.bb-pitcher.winding-up { transform: translateX(-50%) rotate(-15deg) scale(1.1); }
.bb-pitcher.throwing { transform: translateX(-50%) scale(1.05); }

/* Ball */
.bb-ball {
  position: absolute; font-size: 2rem; z-index: 10;
  pointer-events: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Timing ring — shrinks toward batter */
.timing-ring {
  position: absolute; bottom: 10%; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 80px;
  border: 3px solid rgba(255, 215, 0, 0.6);
  border-radius: 50%;
  pointer-events: none; z-index: 8;
}
@keyframes timingRingShrink {
  0% { width: 120px; height: 120px; opacity: 0; border-color: rgba(255,215,0,0.2); }
  40% { opacity: 0.5; }
  70% { width: 60px; height: 60px; opacity: 0.9; border-color: rgba(76,255,76,0.8); }
  85% { width: 40px; height: 40px; opacity: 1; border-color: rgba(76,255,76,1); }
  100% { width: 20px; height: 20px; opacity: 0; }
}

/* Batter — emoji based */
.bb-batter {
  position: absolute; bottom: 5%; left: 50%;
  transform: translateX(-50%); z-index: 5;
  transition: transform 0.12s;
}
.batter-emoji { font-size: 2.8rem; display: block; line-height: 1; }
.bb-batter.swinging {
  transform: translateX(-50%) scaleX(-1);
  transition: transform 0.1s ease-out;
}

/* Strike Zone */
.strike-zone {
  position: absolute; bottom: 10%; left: 50%;
  transform: translateX(-50%);
  width: 55px; height: 70px;
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 4px; pointer-events: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.strike-zone.sweet-spot-active {
  border-color: rgba(76, 255, 76, 0.6);
  box-shadow: 0 0 15px rgba(76, 255, 76, 0.3);
}

/* Hit Result overlay */
.bb-hit-result {
  position: absolute; top: 40%; left: 50%;
  transform: translate(-50%, -50%); z-index: 20;
  background: rgba(0,0,0,0.85); color: #fff;
  padding: 12px 24px; border-radius: 12px;
  font-size: 1.15rem; font-weight: bold;
  white-space: nowrap; animation: bbPopIn 0.25s ease-out;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
@keyframes bbPopIn {
  from { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Home run screen shake */
@keyframes homeRunShake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-4px) translateY(2px); }
  20% { transform: translateX(4px) translateY(-2px); }
  30% { transform: translateX(-3px) translateY(1px); }
  40% { transform: translateX(3px) translateY(-1px); }
  50% { transform: translateX(-2px); }
  60% { transform: translateX(2px); }
  70% { transform: translateX(-1px); }
}
.home-run-shake { animation: homeRunShake 0.5s ease-out; }

/* Firework emojis */
.firework-emoji {
  position: absolute; z-index: 25;
  animation: fireworkPop 1s ease-out forwards;
  pointer-events: none;
}
@keyframes fireworkPop {
  0% { transform: scale(0); opacity: 1; }
  50% { transform: scale(1.5); opacity: 1; }
  100% { transform: scale(2) translateY(-30px); opacity: 0; }
}

/* Foul label */
.foul-label {
  position: absolute; top: 35%; z-index: 22;
  transform: translateX(-50%);
  color: #ff6b6b; font-size: 1.1rem; font-weight: bold;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  animation: foulFade 1s ease-out forwards;
}
@keyframes foulFade {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* Info bar — bases, count, stats */
.batty-ball-info-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin: 8px 0; color: #fff;
  flex-wrap: wrap;
}

/* Controls */
.batty-ball-controls { margin: 8px 0; }
.swing-button {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; border: none; border-radius: 20px;
  padding: 18px 56px; font-size: 1.5rem; font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  transition: transform 0.1s, box-shadow 0.1s;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.swing-button:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 6px 20px rgba(0,0,0,0.45); }
.swing-button:active:not(:disabled) { transform: scale(0.93); }
.swing-button:disabled { opacity: 0.4; cursor: not-allowed; }
.control-hint { color: rgba(255,255,255,0.6); font-size: 0.85rem; margin-top: 6px; }

/* Base Runners diamond */
.base-runners { color: #fff; }
.base-diamond-mini {
  display: grid;
  grid-template-areas: ". second ." "third . first" ". home .";
  grid-template-columns: 24px 24px 24px;
  grid-template-rows: 24px 24px 24px;
  font-size: 1rem;
}
.mini-base.home { grid-area: home; text-align: center; }
.mini-base.first { grid-area: first; text-align: center; color: #fbbf24; }
.mini-base.second { grid-area: second; text-align: center; color: #fbbf24; }
.mini-base.third { grid-area: third; text-align: center; color: #fbbf24; }

/* Count display */
.count-display { display: flex; flex-direction: column; gap: 3px; }
.count-row { display: flex; align-items: center; gap: 4px; }
.count-label { color: rgba(255,255,255,0.6); font-size: 0.75rem; font-weight: bold; width: 12px; }
.count-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.strike-off { background: rgba(255,255,255,0.15); }
.strike-on { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,0.5); }

/* Mini batting stats */
.batting-stats-mini { display: flex; gap: 12px; }
.mini-stat { text-align: center; }
.mini-stat-label { display: block; font-size: 0.65rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; }
.mini-stat-value { display: block; font-size: 0.95rem; font-weight: bold; color: #fbbf24; }

/* Final Stats — primary row */
.batty-ball-final-stats {
  display: flex; justify-content: center; gap: 24px; margin: 15px 0 8px; flex-wrap: wrap;
}
.batty-ball-final-stats .stat { text-align: center; }
.batty-ball-final-stats .stat-label { display: block; font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.batty-ball-final-stats .stat-value { display: block; font-size: 1.8rem; font-weight: bold; color: #fbbf24; }

/* Final Stats — secondary row */
.batty-ball-final-stats-row2 {
  display: flex; justify-content: center; gap: 20px; margin-bottom: 12px;
}
.stat-sm { text-align: center; }
.stat-sm .stat-label { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.5); }
.stat-value-sm { display: block; font-size: 1.1rem; font-weight: bold; color: rgba(255,255,255,0.85); }

.batty-ball-leaderboard-msg { color: #4ade80; font-weight: bold; font-size: 1.1rem; margin: 10px 0; }
.batty-ball-buttons { margin-top: 15px; }

/* Home page icon */
.battyball-icon { display: flex; align-items: center; justify-content: center; }
.bb-preview { display: flex; align-items: center; gap: 8px; font-size: 2rem; }

/* Mobile */
@media (max-width: 600px) {
  .baseball-field { height: 300px; }
  .swing-button { padding: 20px 64px; font-size: 1.6rem; border-radius: 24px; }
  .bb-hit-result { font-size: 1rem; padding: 10px 18px; }
  .batty-ball-scoreboard { gap: 8px; }
  .batty-ball-info-bar { gap: 12px; }
  .pitcher-emoji { font-size: 1.8rem; }
  .batter-emoji { font-size: 2.4rem; }
  .bb-ball { font-size: 1.6rem; }
}
.desktop-only { display: block; }
.mobile-only { display: none; }
@media (hover: none) and (pointer: coarse) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
}

/* ===== Hall of Fame ===== */
.hall-of-fame-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
}

.hall-of-fame-container h1 {
  text-align: center;
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 0.25rem;
}

.hof-subtitle {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* Stats Banner */
.hof-stats-banner {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hof-stat {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 1rem;
  padding: 1.25rem 2rem;
  text-align: center;
  min-width: 140px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.hof-stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
}

.hof-stat-label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 0.25rem;
}

/* Sections */
.hof-section {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hof-section h2 {
  color: #333;
  margin-bottom: 0.25rem;
  font-size: 1.5rem;
}

.hof-section-desc {
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.hof-empty {
  text-align: center;
  color: #999;
  font-size: 1.1rem;
  padding: 2rem;
}

/* Champions Grid */
.hof-champions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.hof-champion-card {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  border-radius: 0.75rem;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform 0.2s;
}

.hof-champion-card:hover {
  transform: translateY(-3px);
}

.hof-champion-emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hof-champion-game {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.hof-champion-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #333;
  margin-bottom: 0.25rem;
}

.hof-champion-score {
  font-size: 0.9rem;
  color: #c0392b;
  font-weight: 700;
}

/* All-Stars Table */
.hof-allstars-table {
  border-radius: 0.5rem;
  overflow: hidden;
}

.hof-table-header {
  display: grid;
  grid-template-columns: 50px 1fr 120px 120px;
  padding: 0.75rem 1rem;
  background: #f0f0f0;
  font-weight: 700;
  font-size: 0.85rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hof-table-row {
  display: grid;
  grid-template-columns: 50px 1fr 120px 120px;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
  transition: background 0.15s;
}

.hof-table-row:hover {
  background: #f9f9f9;
}

.hof-top-3 {
  background: #fffbeb;
}

.hof-top-3:hover {
  background: #fff7db;
}

.hof-col-rank {
  font-size: 1.1rem;
  text-align: center;
}

.hof-col-name {
  font-weight: 700;
  color: #333;
}

.hof-col-games {
  color: #666;
  font-size: 0.9rem;
  text-align: center;
}

.hof-col-total {
  font-weight: 700;
  color: #667eea;
  text-align: right;
}

/* Recent Scores */
.hof-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hof-recent-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  transition: background 0.15s;
}

.hof-recent-item:hover {
  background: #eef0f2;
}

.hof-recent-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.hof-recent-details {
  flex: 1;
  min-width: 0;
}

.hof-recent-player {
  display: block;
  font-weight: 700;
  color: #333;
}

.hof-recent-game {
  display: block;
  font-size: 0.8rem;
  color: #888;
}

.hof-recent-right {
  text-align: right;
  flex-shrink: 0;
}

.hof-recent-score {
  display: block;
  font-weight: 700;
  color: #333;
}

.hof-recent-time {
  display: block;
  font-size: 0.75rem;
  color: #aaa;
}

/* Footer */
.hof-footer {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.hof-footer a {
  color: #667eea;
  font-weight: 700;
  text-decoration: none;
}

.hof-footer a:hover {
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 600px) {
  .hall-of-fame-container {
    padding: 1rem;
  }

  .hall-of-fame-container h1 {
    font-size: 2rem;
  }

  .hof-stats-banner {
    gap: 0.75rem;
  }

  .hof-stat {
    min-width: 100px;
    padding: 1rem 1.25rem;
  }

  .hof-stat-number {
    font-size: 1.5rem;
  }

  .hof-section {
    padding: 1.25rem;
  }

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

  .hof-table-header,
  .hof-table-row {
    grid-template-columns: 40px 1fr 80px 90px;
    font-size: 0.85rem;
    padding: 0.6rem 0.5rem;
  }

  .hof-recent-item {
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
  }
}

/* ========== STREAK BANNER ========== */

.streak-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(255, 107, 53, 0.3);
  animation: streak-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes streak-pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.streak-banner.streak-celebrate {
  animation: streak-bounce 0.6s ease-in-out 3;
}

@keyframes streak-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.streak-fire { font-size: 1.3rem; }
.streak-text { letter-spacing: 0.02em; }
.streak-milestone {
  background: rgba(255, 255, 255, 0.25);
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* ===== Favorites ===== */
.favorites-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 2px dashed rgba(255, 107, 107, 0.3);
}

.favorites-heading {
  font-size: 1.2rem;
  margin: 0 0 0.75rem 0;
  color: #ff6b6b;
}

.favorites-count {
  background: #ff6b6b;
  color: white;
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  margin-left: 0.25rem;
}

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

.favorites-grid .game-card {
  font-size: 0.85rem;
  padding: 0.75rem;
}

.favorites-grid .game-card h2 {
  font-size: 0.9rem;
}

.favorites-grid .game-card p {
  font-size: 0.7rem;
}

.favorites-grid .game-icon {
  transform: scale(0.8);
}

.fav-heart {
  position: absolute;
  top: 6px;
  right: 6px;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
  transition: transform 0.2s;
  padding: 4px;
  line-height: 1;
}

.fav-heart:hover {
  transform: scale(1.3);
}

.fav-heart.fav-pop {
  animation: favPop 0.4s ease-out;
}

@keyframes favPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.6); }
  100% { transform: scale(1); }
}

.fav-star-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.9rem;
}

/* ==================== Recently Played Section ==================== */
.recent-games-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 2px dashed rgba(102, 126, 234, 0.3);
}

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

.recent-heading {
  font-size: 1.2rem;
  margin: 0;
  color: #667eea;
}

.recent-count {
  background: #667eea;
  color: white;
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  margin-left: 0.25rem;
}

.recent-clear-btn {
  background: none;
  border: 1px solid rgba(102, 126, 234, 0.3);
  color: #999;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.recent-clear-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  border-color: #667eea;
}

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

.recent-grid .game-card {
  font-size: 0.85rem;
  padding: 0.75rem;
}

.recent-grid .game-card h2 {
  font-size: 0.9rem;
}

.recent-grid .game-card p {
  font-size: 0.7rem;
}

.recent-grid .game-icon {
  transform: scale(0.8);
}

.recent-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.9rem;
}

/* ==================== Player Stats Page ==================== */
.player-stats-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}
.player-stats-container h1 {
  font-size: 2.5rem;
  margin-bottom: 0.3rem;
}
.player-stats-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* Search Box */
.player-search-box {
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.player-search-form {
  display: flex;
  justify-content: center;
}
.search-input-wrapper {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 500px;
}
.player-search-input {
  flex: 1;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.3);
  color: white;
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.2s;
}
.player-search-input::placeholder { color: rgba(255,255,255,0.4); }
.player-search-input:focus { border-color: #ffd700; }
.player-search-btn {
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #1a1a2e;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s;
}
.player-search-btn:hover { transform: scale(1.05); }

/* Quick Picks */
.quick-picks {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}
.quick-picks-label {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}
.quick-pick-chip {
  background: rgba(255,255,255,0.12);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.quick-pick-chip:hover {
  background: rgba(255,215,0,0.3);
  color: #ffd700;
}

/* Profile Card */
.player-profile-card {
  background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,170,0,0.1));
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}
.profile-avatar {
  font-size: 3rem;
  background: rgba(255,255,255,0.1);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-info h2 {
  font-size: 1.8rem;
  margin: 0;
  text-align: left;
}
.profile-joined {
  color: rgba(255,255,255,0.6);
  margin: 0;
  font-size: 0.9rem;
  text-align: left;
}
.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-number {
  font-size: 1.8rem;
  font-weight: bold;
  color: #ffd700;
}
.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.2rem;
}

/* Personal Bests */
.personal-bests-section {
  margin-bottom: 2rem;
  text-align: left;
}
.personal-bests-section h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  text-align: center;
}
.personal-bests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.pb-card {
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1rem;
  transition: transform 0.15s, background 0.15s;
}
.pb-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.12);
}
.pb-game-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.pb-emoji { font-size: 1.3rem; }
.pb-game-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.pb-score {
  font-size: 1.8rem;
  font-weight: bold;
  color: #ffd700;
  margin: 0.3rem 0;
}
.pb-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
}
.pb-rank { font-weight: bold; }
.rank-gold { color: #ffd700; }
.rank-silver { color: #c0c0c0; }
.rank-bronze { color: #cd7f32; }
.pb-play-link {
  display: inline-block;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.pb-play-link:hover { color: #ffd700; }

/* Recent Activity */
.recent-activity-section { margin-bottom: 2rem; }
.recent-activity-section h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  text-align: center;
}
.recent-activity-table {
  overflow-x: auto;
}
.recent-activity-table table {
  width: 100%;
  border-collapse: collapse;
}
.recent-activity-table th {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.recent-activity-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.score-cell {
  font-weight: bold;
  color: #ffd700;
}
.time-cell {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

/* No Stats Found */
.no-stats-found {
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 1rem;
}
.no-stats-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.no-stats-found h3 { margin-bottom: 0.5rem; }
.no-stats-found a { color: #ffd700; }
.did-you-mean { margin-top: 1.5rem; }
.did-you-mean p { color: rgba(255,255,255,0.5); margin-bottom: 0.5rem; }

/* Player Stats Mobile */
@media (max-width: 600px) {
  .player-stats-container h1 { font-size: 1.8rem; }
  .search-input-wrapper { flex-direction: column; }
  .profile-stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-number { font-size: 1.4rem; }
  .personal-bests-grid { grid-template-columns: 1fr; }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-info h2, .profile-joined { text-align: center; }
}

/* ============================================
   ACHIEVEMENTS PAGE
   ============================================ */

.achievements-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.achievements-container h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}

.achievements-subtitle {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* Progress Bar */
.achievements-progress {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.achievements-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.achievements-count {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a2e;
}

.achievements-pct {
  font-size: 0.95rem;
  color: #888;
  font-weight: 500;
}

.achievements-progress-track {
  height: 16px;
  background: #e8e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.achievements-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ffaa00, #ff8c00);
  border-radius: 10px;
  transition: width 0.6s ease;
  min-width: 0;
}

/* Achievement Grid */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.achievement-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 14px;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.achievement-card.unlocked {
  border-left: 4px solid #ffd700;
}

.achievement-card.unlocked:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.2);
}

.achievement-card.locked {
  opacity: 0.55;
  border-left: 4px solid #ccc;
  filter: grayscale(30%);
}

.achievement-emoji {
  font-size: 2.5rem;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f8f8ff;
}

.achievement-card.unlocked .achievement-emoji {
  background: linear-gradient(135deg, #fff9e6, #fff3cc);
  animation: unlocked-glow 3s ease-in-out infinite;
}

@keyframes unlocked-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(255,215,0,0); }
  50% { box-shadow: 0 0 12px rgba(255,215,0,0.25); }
}

.achievement-info {
  flex: 1;
  min-width: 0;
}

.achievement-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1a1a2e;
  margin-bottom: 0.2rem;
}

.achievement-desc {
  font-size: 0.9rem;
  color: #666;
}

.achievement-date {
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.3rem;
}

/* Footer */
.achievements-footer {
  text-align: center;
  padding: 2rem 0;
  color: #888;
}

.achievements-footer p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.achievements-back-link {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.achievements-back-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ============================================
   ACHIEVEMENT TOAST NOTIFICATION
   ============================================ */

.achievement-toast {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #1a1a2e, #2d2d5e);
  color: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 2px rgba(255,215,0,0.4);
  z-index: 10000;
  transition: top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  max-width: 400px;
  width: calc(100% - 2rem);
}

.achievement-toast.show {
  top: 20px;
}

.achievement-toast.hide {
  top: -120px;
  opacity: 0;
}

.achievement-toast-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  animation: toast-bounce 0.6s ease;
}

@keyframes toast-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.achievement-toast-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #ffd700;
  font-weight: 700;
}

.achievement-toast-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.15rem 0;
}

.achievement-toast-desc {
  font-size: 0.85rem;
  color: #b0b0cc;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .achievements-container h1 { font-size: 2rem; }
  .achievements-grid { grid-template-columns: 1fr; }
  .achievement-card { padding: 1rem; }
  .achievement-emoji { font-size: 2rem; width: 48px; height: 48px; }
  .achievement-toast { max-width: 95%; padding: 0.75rem 1rem; }
  .achievement-toast-icon { font-size: 2rem; }
}

/* ===== DAILY CHALLENGE ===== */
.daily-challenge-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.challenge-header {
  text-align: center;
  margin-bottom: 2rem;
}

.challenge-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
  color: #fff;
}

.challenge-date {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

/* Challenge Card */
.challenge-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  margin-bottom: 2rem;
}

.challenge-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
  animation: challengeShimmer 8s ease-in-out infinite;
}

@keyframes challengeShimmer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10%, 10%); }
}

.challenge-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  position: relative;
}

.challenge-game-icon {
  margin: 1rem 0;
  position: relative;
}

.challenge-emoji {
  font-size: 4rem;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.challenge-game-name {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 1.5rem;
  position: relative;
}

.challenge-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.target-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.target-score {
  font-size: 3rem;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
  line-height: 1;
}

.challenge-status {
  margin-bottom: 1.5rem;
  position: relative;
}

.status-pending { color: rgba(255,255,255,0.9); font-size: 1.1rem; }
.status-complete { color: #ffd700; font-size: 1.3rem; font-weight: 700; margin-bottom: 0.25rem; }
.status-score { color: rgba(255,255,255,0.9); font-size: 1rem; }
.status-beat { color: #7dff7d; font-size: 1.1rem; font-weight: 600; }
.status-close { color: rgba(255,255,255,0.7); font-size: 0.95rem; }

.challenge-play-btn {
  display: inline-block;
  background: #ffd700;
  color: #333;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 0.9rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

.challenge-play-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* Sections */
.challenge-section {
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.challenge-section h2 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}

/* Challengers List */
.challengers-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.challenger-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  transition: background 0.2s;
}

.challenger-row:hover { background: rgba(255,255,255,0.1); }

.challenger-row.target-beat {
  background: rgba(125, 255, 125, 0.1);
  border-left: 3px solid #7dff7d;
}

.challenger-rank {
  font-size: 1.2rem;
  min-width: 2rem;
  text-align: center;
  color: rgba(255,255,255,0.7);
}

.challenger-name {
  flex: 1;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
}

.challenger-score {
  color: #ffd700;
  font-weight: 700;
  font-size: 1rem;
}

.challenger-badge {
  font-size: 0.8rem;
  color: #7dff7d;
  font-weight: 600;
}

.no-challengers {
  text-align: center;
  padding: 1rem;
  color: rgba(255,255,255,0.6);
}

/* Streak Stats */
.streak-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.streak-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.streak-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #ffd700;
}

.streak-stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

/* Past Challenges */
.past-challenges-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.past-challenge-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  font-size: 0.9rem;
}

.past-challenge-row.today {
  background: rgba(255,255,255,0.1);
  border-left: 3px solid #667eea;
}

.past-challenge-row.beat {
  background: rgba(125,255,125,0.08);
}

.pc-status { font-size: 1.1rem; min-width: 1.5rem; text-align: center; }
.pc-date { color: rgba(255,255,255,0.6); min-width: 5.5rem; font-size: 0.85rem; }
.pc-game { color: #fff; flex: 1; font-weight: 500; }
.pc-result { color: rgba(255,255,255,0.7); font-size: 0.85rem; text-align: right; }

/* Mobile */
@media (max-width: 600px) {
  .challenge-header h1 { font-size: 2rem; }
  .challenge-card { padding: 1.5rem 1rem; }
  .challenge-emoji { font-size: 3rem; }
  .challenge-game-name { font-size: 1.4rem; }
  .target-score { font-size: 2.2rem; }
  .challenge-play-btn { font-size: 1.1rem; padding: 0.75rem 2rem; }
  .streak-stats { gap: 1rem; }
  .streak-stat-value { font-size: 1.5rem; }
  .past-challenge-row { flex-wrap: wrap; gap: 0.3rem; }
  .pc-game { min-width: 100%; order: 3; padding-left: 2.1rem; }
  .pc-result { order: 2; }
}

/* ========================================
   Celebration / Confetti System
   ======================================== */

.celebration-banner {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
  color: white;
  font-family: "Fredoka One", "Luckiest Guy", "Segoe UI", sans-serif;
  max-width: 90vw;
  min-width: 280px;
}

.celebration-record {
  border-color: #FFD700;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 215, 0, 0.5), 0 0 120px rgba(255, 215, 0, 0.2);
}

.celebration-podium {
  border-color: #FFA500;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 165, 0, 0.4);
}

.celebration-leaderboard {
  border-color: #87CEEB;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(135, 206, 235, 0.3);
}

.celebration-personal_best {
  border-color: #7CFC00;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(124, 252, 0, 0.3);
}

.celebration-emoji {
  font-size: 4rem;
  margin-bottom: 8px;
  animation: celebrationBounce 0.6s ease-in-out 0.5s;
}

.celebration-title {
  font-size: 1.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

.celebration-record .celebration-title {
  background: linear-gradient(135deg, #FFD700, #FFA500, #FF6347, #FF69B4, #FFD700);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: celebrationShimmer 2s ease-in-out infinite;
}

.celebration-subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  font-weight: 400;
}

@keyframes celebrationPop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(0.95); }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

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

@keyframes celebrationShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.celebration-fade-out {
  animation: celebrationFadeOut 0.6s ease-out forwards;
}

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

@media (max-width: 600px) {
  .celebration-banner {
    padding: 16px 24px !important;
    max-width: 95vw;
  }
  .celebration-emoji { font-size: 3rem; }
  .celebration-title { font-size: 1.3rem; letter-spacing: 1px; }
  .celebration-subtitle { font-size: 0.95rem; }
}

/* ─── Maze Craze ─── */

.maze-craze-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 1rem;
}

.maze-wrapper {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.maze-header h1 {
  color: #e0e0ff;
  margin: 0.5rem 0;
  font-size: 1.8rem;
}

.maze-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 0.5rem 0;
}

.maze-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.maze-stat .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #8888bb;
  letter-spacing: 1px;
}

.maze-stat .stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e0e0ff;
}

.maze-status {
  color: #aab;
  font-size: 1rem;
  margin: 0.5rem 0;
  min-height: 1.5em;
}

.maze-canvas {
  display: block;
  margin: 0.5rem auto;
  border-radius: 8px;
  border: 2px solid #4a4a8a;
  touch-action: none;
}

.maze-controls {
  margin: 1rem auto;
}

.maze-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dpad-middle {
  display: flex;
  gap: 4px;
  align-items: center;
}

.dpad-center {
  width: 50px;
  height: 50px;
}

.dpad-btn {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 10px;
  background: rgba(100, 120, 200, 0.3);
  color: #c0c0ff;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.dpad-btn:active {
  background: rgba(100, 120, 200, 0.6);
  transform: scale(0.92);
}

.maze-instructions {
  color: #667;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.maze-instructions p {
  margin: 0.2rem 0;
}

/* Maze game over overlay */
.maze-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 30, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.3s;
}

.maze-overlay.hidden {
  display: none;
}

.maze-overlay-content {
  background: linear-gradient(145deg, #1e1e3a, #2a2a5a);
  border-radius: 16px;
  padding: 2rem;
  max-width: 450px;
  width: 90%;
  text-align: center;
  color: #e0e0ff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
}

.maze-overlay-content h2 {
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
}

.maze-final-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0;
}

.maze-final-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.maze-final-stat .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #8888bb;
}

.maze-final-stat .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.maze-leaderboard-msg {
  color: #4ecdc4;
  font-weight: 600;
  margin: 0.5rem 0;
}

.maze-leaderboard-msg.hidden { display: none; }

.maze-buttons {
  margin-top: 1rem;
}

.maze-sound-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 50;
}

/* ─── Maze Craze Home Icon ─── */
.maze-craze-icon {
  background: linear-gradient(135deg, #1a1a2e, #2a2a5a);
}

.mc-preview {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto;
}

.mc-wall {
  position: absolute;
  background: #6a6aaa;
}

.mc-wall.mc-h {
  height: 2px;
}

.mc-wall.mc-v {
  width: 2px;
}

.mc-player {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 14px;
  line-height: 1;
}

.mc-exit {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 14px;
  line-height: 1;
}

@media (max-width: 500px) {
  .maze-stats { gap: 0.8rem; }
  .maze-stat .stat-value { font-size: 1.1rem; }
  .maze-final-stats { gap: 1rem; }
  .maze-final-stat .stat-value { font-size: 1.3rem; }
  .dpad-btn { width: 55px; height: 55px; font-size: 1.5rem; }
  .dpad-center { width: 55px; height: 55px; }
}

/* ===== Sky Stacker ===== */

/* Game card icon */
.sky-stacker-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ss-preview {
  position: relative;
  width: 60px;
  height: 60px;
}

.ss-block {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 22%;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.ss-block.moving {
  animation: ss-swing 1.2s ease-in-out infinite alternate;
}

@keyframes ss-swing {
  0% { transform: translateX(-80%); }
  100% { transform: translateX(-20%); }
}

/* Play page background */
.sky-stacker-bg {
  background: linear-gradient(180deg, #87CEEB 0%, #E0F7FA 100%);
  min-height: 100vh;
}

/* ====== GRAVITY RUNNER ====== */

/* Homepage card icon */
.gravity-runner-icon .gr-preview {
  position: relative;
  width: 60px;
  height: 60px;
}

.gravity-runner-icon .gr-ceiling {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #e94560;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(233, 69, 96, 0.6);
}

.gravity-runner-icon .gr-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #4a8fe7;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(74, 143, 231, 0.6);
}

.gravity-runner-icon .gr-runner {
  position: absolute;
  bottom: 8px;
  left: 12px;
  width: 14px;
  height: 14px;
  background: #00d2ff;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
  animation: gr-flip 2s ease-in-out infinite;
}

.gravity-runner-icon .gr-spike {
  position: absolute;
  bottom: 4px;
  right: 10px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 16px solid #e94560;
  filter: drop-shadow(0 0 4px rgba(233, 69, 96, 0.5));
}

@keyframes gr-flip {
  0%, 40% { bottom: 8px; }
  50%, 90% { bottom: 38px; }
  100% { bottom: 8px; }
}

/* Play page */
.gravity-runner-bg {
  background: linear-gradient(180deg, #0f0c29 0%, #1a1a2e 50%, #16213e 100%);
  min-height: 100vh;
}

.gravity-runner-hint {
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  margin: 0.25rem 0;
  transition: opacity 0.5s ease;
}

.gravity-runner-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.gr-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  min-width: 70px;
}

.gr-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}

.gr-stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: #00d2ff;
}

@media (max-width: 480px) {
  .gravity-runner-stats {
    gap: 0.5rem;
  }
  .gr-stat {
    padding: 0.4rem 0.6rem;
    min-width: 60px;
  }
}

/* ===== WORD SEARCH ===== */

.word-search-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a2e 0%, #1a1a4e 50%, #0d2b45 100%);
  padding: 1rem;
  position: relative;
}

.ws-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.ws-sound-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  color: white;
}

.ws-header h1 {
  text-align: center;
  color: #fff;
  margin: 0.5rem 0;
  font-size: 1.8rem;
}

.ws-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 0.8rem 0;
}

.ws-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.08);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
}

.ws-stat .stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ws-stat .stat-value {
  font-size: 1.3rem;
  color: #fff;
  font-weight: 700;
}

.ws-status {
  text-align: center;
  color: #ffd700;
  font-size: 1rem;
  margin: 0.5rem 0;
  font-weight: 600;
}

/* Word list chips */
.ws-word-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.8rem 0;
  padding: 0.5rem;
}

.ws-word-chip {
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.3s ease;
}

.ws-word-chip.ws-word-found {
  background: rgba(76, 175, 80, 0.3);
  border-color: #4caf50;
  text-decoration: line-through;
  color: rgba(255,255,255,0.5);
}

/* Grid */
.ws-grid-container {
  position: relative;
  margin: 0.5rem auto;
  max-width: 500px;
}

.ws-grid {
  display: grid;
  gap: 2px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.ws-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  position: relative;
  border: 1px solid rgba(255,255,255,0.05);
}

.ws-cell:hover {
  background: rgba(255,255,255,0.15);
}

.ws-cell.ws-selecting {
  background: rgba(255, 215, 0, 0.35);
  border-color: rgba(255, 215, 0, 0.6);
  transform: scale(1.05);
  z-index: 2;
}

.ws-cell.ws-found {
  background: hsla(var(--found-hue, 120), 60%, 40%, 0.3);
  border-color: hsla(var(--found-hue, 120), 60%, 50%, 0.5);
  color: #fff;
}

/* SVG overlay for found lines */
.ws-selection-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.ws-found-line {
  animation: ws-line-appear 0.4s ease-out;
}

@keyframes ws-line-appear {
  from { opacity: 0; stroke-width: 0; }
  to { opacity: 0.35; }
}

/* Floating points */
.ws-floating-points {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffd700;
  font-weight: 800;
  font-size: 1rem;
  text-shadow: 0 0 8px rgba(255,215,0,0.8);
  pointer-events: none;
  z-index: 10;
  animation: ws-float-up 1.2s ease-out forwards;
}

@keyframes ws-float-up {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -200%) scale(1.3); }
}

/* Instructions */
.ws-instructions {
  text-align: center;
  margin-top: 0.8rem;
}

.ws-instructions p {
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  margin: 0.2rem 0;
}

/* Game Over Overlay */
.ws-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s;
}

.ws-overlay.hidden { display: none; }

.ws-overlay-content {
  background: linear-gradient(135deg, #1a1a4e, #0d2b45);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 2rem;
  max-width: 450px;
  width: 90%;
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
}

.ws-overlay-content h2 {
  color: #ffd700;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.ws-overlay-content p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
}

.ws-final-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.ws-final-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.08);
  padding: 0.6rem 1rem;
  border-radius: 12px;
}

.ws-final-stat .stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}

.ws-final-stat .stat-value {
  font-size: 1.4rem;
  color: #fff;
  font-weight: 700;
}

.ws-leaderboard-msg {
  color: #ffd700;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

.ws-leaderboard-msg.hidden { display: none; }

.ws-buttons {
  margin-top: 1rem;
}

/* Word Search homepage card icon */
.word-search-icon {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ws-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  width: 64px;
  height: 64px;
}

.ws-icon-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  font-size: 0.55rem;
  font-weight: 800;
  color: rgba(255,255,255,0.6);
}

.ws-icon-cell.highlight {
  background: rgba(255, 215, 0, 0.3);
  color: #ffd700;
}

/* Responsive */
@media (max-width: 480px) {
  .ws-cell {
    font-size: 0.85rem;
    border-radius: 4px;
  }

  .ws-header h1 {
    font-size: 1.4rem;
  }

  .ws-stats {
    gap: 0.8rem;
  }

  .ws-stat {
    padding: 0.4rem 0.6rem;
    min-width: 60px;
  }

  .ws-word-chip {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
}

/* ==================== */
/* Turbo Type            */
/* ==================== */

.turbo-type-bg {
  background: linear-gradient(135deg, #0a0a2e 0%, #1a1a4e 100%);
  min-height: 100vh;
  padding: 1rem;
}

.tt-input-area {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1rem;
}

.tt-input {
  width: 100%;
  max-width: 500px;
  padding: 0.8rem 1.2rem;
  font-size: 1.2rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: #fff;
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tt-input:focus {
  border-color: #4eff4e;
  box-shadow: 0 0 15px rgba(78, 255, 78, 0.3);
}

.tt-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.tt-combo {
  color: #ff6b35;
  font-weight: bold;
  animation: combo-pulse 0.5s ease-in-out;
}

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

/* Turbo Type Home Card */
.turbo-type-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.tt-icon-words {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.tt-icon-word {
  font-size: 0.8rem;
  font-weight: bold;
  font-family: monospace;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(78, 255, 78, 0.15);
  border: 1px solid rgba(78, 255, 78, 0.4);
  color: #4eff4e;
  animation: tt-fall 2s ease-in infinite;
}

.tt-w1 { animation-delay: 0s; }
.tt-w2 { animation-delay: 0.6s; }
.tt-w3 { animation-delay: 1.2s; }

@keyframes tt-fall {
  0% { opacity: 0; transform: translateY(-10px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(8px); }
  100% { opacity: 0; transform: translateY(15px); }
}

.tt-icon-cursor {
  font-size: 1.2rem;
  color: #fff;
  animation: tt-blink 1s step-end infinite;
}

@keyframes tt-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (max-width: 600px) {
  .tt-input {
    font-size: 1rem;
    padding: 0.6rem 1rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   💣 BOOM SWEEPER (Minesweeper)
   ═══════════════════════════════════════════════════════════════ */

.boom-sweeper-page {
  min-height: 100vh;
  padding: 1rem;
}

.boom-sweeper-page .game-wrapper {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

/* Header & Stats */
.bs-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.bs-header h1 {
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
}

.bs-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.bs-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bs-stat .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.7;
  letter-spacing: 0.05em;
}

.bs-stat .stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Status message */
.bs-status {
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  min-height: 1.5em;
  opacity: 0.8;
  transition: all 0.3s;
}

.bs-status.win {
  color: #4caf50;
  font-weight: 700;
  font-size: 1.2rem;
  opacity: 1;
}

.bs-status.lose {
  color: #f44336;
  font-weight: 700;
  font-size: 1.2rem;
  opacity: 1;
}

/* Grid */
.bs-grid {
  display: grid;
  gap: 1px;
  margin: 0 auto 1rem;
  background: #667;
  border: 3px solid #556;
  border-radius: 4px;
  padding: 2px;
  max-width: min(95vw, 600px);
  aspect-ratio: 1;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.bs-grid-8 { max-width: min(80vw, 440px); }
.bs-grid-12 { max-width: min(90vw, 540px); }
.bs-grid-16 { max-width: min(95vw, 600px); }

/* Cells */
.bs-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #bcc;
  border: none;
  padding: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: clamp(0.55rem, 2.5vw, 1rem);
  line-height: 1;
  transition: background 0.1s, transform 0.1s;
  aspect-ratio: 1;
  border-radius: 2px;
  position: relative;
}

.bs-cell.hidden-cell {
  background: linear-gradient(145deg, #cdd, #a9b);
  box-shadow: inset -1px -1px 0 #899, inset 1px 1px 0 #dee;
}

.bs-cell.hidden-cell:hover {
  background: linear-gradient(145deg, #dee, #bac);
}

.bs-cell.hidden-cell:active {
  background: #b8b8c8;
  box-shadow: inset 1px 1px 0 #899;
}

.bs-cell.revealed {
  background: #e4e4ee;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1);
  cursor: default;
}

.bs-cell.flagged {
  background: linear-gradient(145deg, #cdd, #a9b);
  box-shadow: inset -1px -1px 0 #899, inset 1px 1px 0 #dee;
  font-size: clamp(0.6rem, 2.5vw, 1.1rem);
  animation: flagBounce 0.3s ease;
}

.bs-cell.mine {
  background: #ffcccc;
}

.bs-cell.exploded {
  background: #ff4444 !important;
  animation: explode 0.4s ease;
}

/* Number colors */
.bs-cell.num-1 { color: #0000ff; }
.bs-cell.num-2 { color: #008000; }
.bs-cell.num-3 { color: #ff0000; }
.bs-cell.num-4 { color: #800080; }
.bs-cell.num-5 { color: #800000; }
.bs-cell.num-6 { color: #008080; }
.bs-cell.num-7 { color: #000000; }
.bs-cell.num-8 { color: #808080; }

/* Instructions */
.bs-instructions {
  text-align: center;
  opacity: 0.6;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.bs-instructions p {
  margin: 0.2rem 0;
}

/* Player display */
.boom-sweeper-page .player-display {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 0.5rem;
}

/* Game Over Modal */
.boom-sweeper-page .game-over-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.3s ease;
}

.boom-sweeper-page .game-over-overlay.hidden {
  display: none;
}

.boom-sweeper-page .game-over-content {
  background: var(--card-bg, #1a1a2e);
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s ease;
}

.boom-sweeper-page .game-over-content h2 {
  font-size: 1.8rem;
  margin: 0 0 1rem;
}

.boom-sweeper-page .game-over-overlay.won .game-over-content {
  border: 2px solid #4caf50;
}

.boom-sweeper-page .game-over-overlay.lost .game-over-content {
  border: 2px solid #f44336;
}

.boom-sweeper-page .final-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.boom-sweeper-page .final-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.boom-sweeper-page .final-stat .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.7;
}

.boom-sweeper-page .final-stat .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.boom-sweeper-page .bs-leaderboard {
  margin: 1rem 0;
}

.boom-sweeper-page .leaderboard-live:empty {
  display: none;
}

.boom-sweeper-page .leaderboard-live .highlight {
  background: rgba(76, 175, 80, 0.15);
  border-radius: 4px;
}

.boom-sweeper-page .result-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Animations */
@keyframes flagBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@keyframes explode {
  0% { transform: scale(1); background: #ff4444; }
  30% { transform: scale(1.4); background: #ff8800; }
  100% { transform: scale(1); background: #ff4444; }
}

@keyframes bs-shake {
  0%, 100% { transform: translateX(0); }
  10%, 50%, 90% { transform: translateX(-4px); }
  30%, 70% { transform: translateX(4px); }
}

.bs-shake {
  animation: bs-shake 0.5s ease;
}

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

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

/* Homepage card icon */
.boom-sweeper-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bs-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 4px;
  background: #667;
  border-radius: 4px;
  width: 60px;
  height: 60px;
}

.bs-preview .bs-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #cdd;
  border-radius: 2px;
  font-size: 0.55rem;
  font-weight: 700;
  color: #333;
  cursor: default;
}

.bs-preview .bs-cell.flag {
  font-size: 0.5rem;
}

.bs-preview .bs-cell.mine {
  font-size: 0.5rem;
  background: #ffcccc;
}

.bs-preview .bs-cell.empty {
  background: #e4e4ee;
}

.game-card:hover .bs-preview .bs-cell {
  animation: bsPreviewPulse 0.6s ease infinite alternate;
}

.game-card:hover .bs-preview .bs-cell:nth-child(2) { animation-delay: 0.1s; }
.game-card:hover .bs-preview .bs-cell:nth-child(3) { animation-delay: 0.2s; }
.game-card:hover .bs-preview .bs-cell:nth-child(4) { animation-delay: 0.3s; }
.game-card:hover .bs-preview .bs-cell:nth-child(5) { animation-delay: 0.15s; }
.game-card:hover .bs-preview .bs-cell:nth-child(6) { animation-delay: 0.25s; }
.game-card:hover .bs-preview .bs-cell:nth-child(7) { animation-delay: 0.35s; }
.game-card:hover .bs-preview .bs-cell:nth-child(8) { animation-delay: 0.05s; }
.game-card:hover .bs-preview .bs-cell:nth-child(9) { animation-delay: 0.2s; }

@keyframes bsPreviewPulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

/* Mobile responsive */
@media (max-width: 480px) {
  .boom-sweeper-page {
    padding: 0.5rem;
  }

  .bs-header h1 {
    font-size: 1.3rem;
  }

  .bs-stats {
    gap: 0.75rem;
  }

  .bs-stat .stat-value {
    font-size: 1.1rem;
  }

  .bs-cell {
    font-size: clamp(0.45rem, 2vw, 0.8rem);
  }

  .boom-sweeper-page .game-over-content {
    padding: 1.25rem;
  }

  .boom-sweeper-page .game-over-content h2 {
    font-size: 1.4rem;
  }
}

/* ─── Mole Patrol ─── */

.mole-patrol-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #2d5016 0%, #1a3a0a 50%, #0d1f05 100%);
}

.mp-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.mp-header h1 {
  font-size: 1.8rem;
  color: #90ee90;
  text-shadow: 0 0 20px rgba(144, 238, 144, 0.5);
  margin-bottom: 0.5rem;
}

.mp-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

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

.mp-stat .stat-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
}

.mp-stat .stat-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.mp-lives {
  text-align: center;
  font-size: 1.2rem;
  margin: 0.3rem 0;
  letter-spacing: 0.1em;
}

.mp-status {
  text-align: center;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.mp-combo-active {
  color: #ff6b35 !important;
  animation: mp-combo-pulse 0.4s ease;
}

@keyframes mp-combo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.mp-timer-danger {
  color: #ff4444 !important;
  animation: mp-timer-blink 0.5s ease infinite;
}

@keyframes mp-timer-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Grid */
.mp-grid {
  display: grid;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
  padding: 1rem;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.mp-hole {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mp-mound {
  position: absolute;
  bottom: 0;
  left: 5%;
  width: 90%;
  height: 35%;
  background: radial-gradient(ellipse at center, #5a3a1a 0%, #3d2610 100%);
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.mp-mole {
  position: absolute;
  width: 70%;
  height: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.8rem, 5vw, 3rem);
  border-radius: 50%;
  z-index: 2;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.15s ease-out, opacity 0.1s ease;
}

.mp-mole-up {
  transform: translateY(-10%);
  opacity: 1;
  animation: mp-pop-up 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mp-pop-up {
  0% { transform: translateY(100%) scale(0.5); opacity: 0; }
  70% { transform: translateY(-20%) scale(1.1); opacity: 1; }
  100% { transform: translateY(-10%) scale(1); opacity: 1; }
}

.mp-mole-down {
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.2s ease-in, opacity 0.15s ease;
}

.mp-mole-whacked {
  animation: mp-whack 0.25s ease-out forwards;
}

@keyframes mp-whack {
  0% { transform: translateY(-10%) scale(1); }
  30% { transform: translateY(0%) scale(1.3, 0.6); }
  100% { transform: translateY(100%) scale(0.5); opacity: 0; }
}

.mp-mole-whacked-golden {
  animation: mp-whack-golden 0.3s ease-out forwards;
}

@keyframes mp-whack-golden {
  0% { transform: translateY(-10%) scale(1); }
  30% { transform: translateY(-20%) scale(1.4); filter: brightness(2); }
  100% { transform: translateY(100%) scale(0.3); opacity: 0; }
}

.mp-mole-explode {
  animation: mp-explode 0.3s ease-out forwards;
}

@keyframes mp-explode {
  0% { transform: translateY(-10%) scale(1); }
  30% { transform: scale(1.8); filter: brightness(3); }
  100% { transform: scale(0); opacity: 0; }
}

.mp-mole-miss {
  opacity: 0.5;
}

.mp-mole-normal { cursor: pointer; }
.mp-mole-golden { cursor: pointer; filter: drop-shadow(0 0 8px gold); }
.mp-mole-bomb { cursor: pointer; }

/* Floating text */
.mp-float-text {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  font-weight: 900;
  z-index: 10;
  pointer-events: none;
  animation: mp-float 1s ease-out forwards;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes mp-float {
  0% { transform: translateX(-50%) translateY(0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-60px); opacity: 0; }
}

/* Particles */
.mp-particle {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  animation: mp-particle-fly 0.6s ease-out forwards;
}

@keyframes mp-particle-fly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* Screen shake */
.mp-shake {
  animation: mp-shake-anim 0.3s ease;
}

@keyframes mp-shake-anim {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px) rotate(-1deg); }
  40% { transform: translateX(5px) rotate(1deg); }
  60% { transform: translateX(-3px) rotate(-0.5deg); }
  80% { transform: translateX(3px) rotate(0.5deg); }
}

.mp-instructions {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.mp-instructions p {
  margin: 0.2rem 0;
}

/* Home page card icon */
.mole-patrol-icon {
  position: relative;
}

.mp-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 60px;
  margin: 0 auto;
}

.mp-icon-hole {
  width: 18px;
  height: 18px;
  background: radial-gradient(ellipse, #5a3a1a, #3d2610);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.mp-icon-mole {
  animation: mp-icon-pop 2s ease-in-out infinite;
}

.mp-icon-mole:nth-child(2) { animation-delay: 0s; }
.mp-icon-mole:nth-child(4) { animation-delay: 0.7s; }
.mp-icon-mole:nth-child(6) { animation-delay: 1.4s; }

@keyframes mp-icon-pop {
  0%, 40%, 100% { transform: scale(0.5); opacity: 0.3; }
  20%, 30% { transform: scale(1.1); opacity: 1; }
}

.mp-icon-hammer {
  position: absolute;
  top: -5px;
  right: 5px;
  font-size: 1.2rem;
  animation: mp-icon-hammer-swing 1.5s ease-in-out infinite;
}

@keyframes mp-icon-hammer-swing {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-30deg); }
  35% { transform: rotate(15deg); }
}

/* Responsive */
@media (max-width: 480px) {
  .mp-header h1 {
    font-size: 1.4rem;
  }

  .mp-stats {
    gap: 0.75rem;
  }

  .mp-stat .stat-value {
    font-size: 1.1rem;
  }

  .mp-grid {
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .mole-patrol-page .game-over-content {
    padding: 1.25rem;
  }

  .mole-patrol-page .game-over-content h2 {
    font-size: 1.4rem;
  }
}

/* ═══════════════════════════════════════════════
   PIXEL FLOOD
   ═══════════════════════════════════════════════ */

/* ─── Home Card Icon ─── */
.pixel-flood-icon {
  position: relative;
}

.pf-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 60px;
  height: 60px;
  margin: 0 auto;
}

.pf-icon-cell {
  border-radius: 4px;
  animation: pf-icon-pulse 3s ease-in-out infinite;
}

.pf-icon-cell:nth-child(1) { animation-delay: 0s; }
.pf-icon-cell:nth-child(2) { animation-delay: 0.3s; }
.pf-icon-cell:nth-child(3) { animation-delay: 0.6s; }
.pf-icon-cell:nth-child(4) { animation-delay: 0.2s; }
.pf-icon-cell:nth-child(5) { animation-delay: 0.5s; }
.pf-icon-cell:nth-child(6) { animation-delay: 0.8s; }
.pf-icon-cell:nth-child(7) { animation-delay: 0.4s; }
.pf-icon-cell:nth-child(8) { animation-delay: 0.7s; }
.pf-icon-cell:nth-child(9) { animation-delay: 1.0s; }

@keyframes pf-icon-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.9); }
}

.pf-icon-wave {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 1.2rem;
  animation: pf-icon-wave 2s ease-in-out infinite;
}

@keyframes pf-icon-wave {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-3px) rotate(-10deg); }
  75% { transform: translateX(3px) rotate(10deg); }
}

/* ─── Game Page ─── */
.pixel-flood-page {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  padding: 1rem;
}

.pf-header h1 {
  text-align: center;
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.pf-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.pf-stat {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 0.4rem 0.8rem;
  text-align: center;
}

.pf-stat .stat-label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
}

.pf-stat .stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
}

.pf-status {
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  min-height: 1.5em;
}

/* ─── Grid ─── */
.pf-grid {
  display: grid;
  margin: 0 auto;
  gap: 1px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.pf-cell {
  transition: background-color 0.2s ease, box-shadow 0.15s ease;
}

.pf-cell.pf-flooded {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}

/* ─── Color Picker ─── */
.pf-color-picker {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 1rem auto;
  flex-wrap: wrap;
}

.pf-color-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 1.2rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-color-btn:hover:not(:disabled) {
  transform: scale(1.15);
  border-color: #fff;
  box-shadow: 0 0 15px rgba(255,255,255,0.4);
}

.pf-color-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.pf-color-btn.pf-color-current {
  opacity: 0.3;
  transform: scale(0.85);
  cursor: not-allowed;
  border-color: rgba(255,255,255,0.1);
}

/* ─── Instructions ─── */
.pf-instructions {
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* ─── Floating Points ─── */
.pf-floating-points {
  position: absolute;
  color: #2ecc71;
  font-weight: bold;
  font-size: 1.2rem;
  pointer-events: none;
  animation: pf-float-up 1.2s ease-out forwards;
  z-index: 10;
  text-shadow: 0 0 8px rgba(46,204,113,0.6);
}

.pf-floating-points.pf-big-flood {
  font-size: 1.6rem;
  color: #f1c40f;
  text-shadow: 0 0 12px rgba(241,196,15,0.8);
}

@keyframes pf-float-up {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-60px); }
}

/* ─── Confetti ─── */
.pf-confetti {
  position: fixed;
  top: -10px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 100;
  animation: pf-confetti-fall linear forwards;
}

@keyframes pf-confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ─── Leaderboard in modal ─── */
.pf-leaderboard {
  margin: 1rem 0;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .pf-header h1 { font-size: 1.4rem; }
  .pf-stats { gap: 0.5rem; }
  .pf-stat { padding: 0.3rem 0.6rem; }
  .pf-stat .stat-value { font-size: 0.95rem; }
  .pf-color-btn { width: 42px; height: 42px; font-size: 1rem; }

  .pixel-flood-page .game-over-content {
    padding: 1.25rem;
  }

  .pixel-flood-page .game-over-content h2 {
    font-size: 1.4rem;
  }
}

/* ═══════════════════════════════════════════════════════
   LIGHTS OUT 💡
   ═══════════════════════════════════════════════════════ */

.lights-out-page {
  background: linear-gradient(135deg, #0a0a2e 0%, #1a1a4e 50%, #0d0d3d 100%);
  min-height: 100vh;
  padding-bottom: 2rem;
}

.lo-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.lo-header h1 {
  font-size: 2rem;
  color: #f1c40f;
  text-shadow: 0 0 20px rgba(241, 196, 15, 0.5);
  margin-bottom: 0.5rem;
}

.lo-stats {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.lo-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.4rem 0.8rem;
  min-width: 70px;
}

.lo-stat .stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lo-stat .stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
}

.lo-status {
  text-align: center;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.8rem;
  min-height: 1.5em;
}

/* Grid */
.lo-grid {
  display: grid;
  gap: 6px;
  max-width: 400px;
  margin: 0 auto 1rem;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  border: 2px solid rgba(241, 196, 15, 0.2);
}

.lo-cell {
  aspect-ratio: 1;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.15s ease;
  font-size: 0;
}

.lo-cell.lit {
  background: radial-gradient(circle at 40% 40%, #ffe066, #f1c40f, #d4a40a);
  box-shadow: 0 0 15px rgba(241, 196, 15, 0.6), 0 0 30px rgba(241, 196, 15, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.lo-cell.dark {
  background: radial-gradient(circle at 40% 40%, #2a2a5e, #1a1a3e, #0d0d2e);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 5px rgba(0, 0, 0, 0.3);
}

.lo-cell:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.lo-cell:active {
  transform: scale(0.95);
}

.lo-glow {
  position: absolute;
  inset: -4px;
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.4);
  pointer-events: none;
  animation: lo-pulse 2s ease-in-out infinite;
}

@keyframes lo-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.lo-cell.lo-toggling {
  animation: lo-toggle-flash 0.3s ease;
}

@keyframes lo-toggle-flash {
  0% { filter: brightness(2); transform: scale(1.15); }
  100% { filter: brightness(1); transform: scale(1); }
}

.lo-cell.lo-hint-glow {
  animation: lo-hint-pulse 0.5s ease-in-out 3;
  z-index: 2;
}

@keyframes lo-hint-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(46, 204, 113, 0.5); }
  50% { box-shadow: 0 0 30px rgba(46, 204, 113, 1), 0 0 50px rgba(46, 204, 113, 0.5); outline: 3px solid #2ecc71; }
}

/* Actions */
.lo-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.lo-hint-btn, .lo-reset-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.lo-hint-btn:hover, .lo-reset-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(241, 196, 15, 0.5);
}

.lo-instructions {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.lo-instructions p {
  margin: 0.2rem 0;
}

/* Confetti */
.lo-confetti {
  position: fixed;
  top: -10px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 1000;
  animation: lo-confetti-fall linear forwards;
}

@keyframes lo-confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Home page icon */
.lights-out-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lo-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 50px;
  height: 50px;
}

.lo-icon-cell {
  border-radius: 3px;
  transition: all 0.3s;
}

.lo-icon-cell.lit {
  background: #f1c40f;
  box-shadow: 0 0 6px rgba(241, 196, 15, 0.6);
}

.lo-icon-cell.dark {
  background: #2a2a5e;
}

.game-card:hover .lo-icon-cell.lit {
  animation: lo-icon-blink 0.8s ease-in-out infinite alternate;
}

.game-card:hover .lo-icon-cell.dark {
  animation: lo-icon-blink-reverse 0.8s ease-in-out infinite alternate;
}

@keyframes lo-icon-blink {
  0% { background: #f1c40f; box-shadow: 0 0 6px rgba(241, 196, 15, 0.6); }
  100% { background: #2a2a5e; box-shadow: none; }
}

@keyframes lo-icon-blink-reverse {
  0% { background: #2a2a5e; box-shadow: none; }
  100% { background: #f1c40f; box-shadow: 0 0 6px rgba(241, 196, 15, 0.6); }
}

/* Game over modal adjustments */
.lights-out-page .game-over-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.lights-out-page .game-over-overlay.hidden {
  display: none;
}

.lights-out-page .game-over-content {
  background: linear-gradient(135deg, #1a1a4e, #0a0a2e);
  border: 2px solid rgba(241, 196, 15, 0.3);
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
}

.lights-out-page .game-over-content h2 {
  color: #f1c40f;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.lights-out-page .final-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.lights-out-page .final-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  min-width: 80px;
}

.lights-out-page .final-stat .stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.lights-out-page .final-stat .stat-value {
  font-size: 1.4rem;
  font-weight: bold;
  color: #f1c40f;
}

@media (max-width: 480px) {
  .lo-grid {
    max-width: 90vw;
    padding: 10px;
    gap: 4px;
  }
  .lo-header h1 {
    font-size: 1.5rem;
  }
  .lo-stats {
    gap: 0.6rem;
  }
  .lights-out-page .game-over-content {
    padding: 1.2rem;
  }
  .lights-out-page .game-over-content h2 {
    font-size: 1.4rem;
  }
}

/* ═══════════════════════════════════════════
   2048
   ═══════════════════════════════════════════ */

.twenty48-page {
  background: linear-gradient(135deg, #fad390 0%, #f6b93b 30%, #e58e26 70%, #fa983a 100%);
  min-height: 100vh;
  padding: 1rem;
}

.t48-header h1 {
  text-align: center;
  font-size: 2rem;
  color: #776e65;
  margin-bottom: 0.5rem;
}

.t48-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.t48-stat {
  background: #bbada0;
  border-radius: 8px;
  padding: 0.4rem 1rem;
  text-align: center;
  min-width: 80px;
}

.t48-stat .stat-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #eee4da;
  font-weight: bold;
}

.t48-stat .stat-value {
  display: block;
  font-size: 1.3rem;
  font-weight: bold;
  color: #fff;
}

.t48-status {
  text-align: center;
  font-size: 1rem;
  color: #776e65;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.t48-board-container {
  display: flex;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.t48-board {
  display: grid;
  grid-template-columns: repeat(var(--grid-size), 1fr);
  grid-template-rows: repeat(var(--grid-size), 1fr);
  gap: 8px;
  background: #bbada0;
  border-radius: 12px;
  padding: 8px;
  width: min(80vw, 400px);
  height: min(80vw, 400px);
  position: relative;
  touch-action: none;
}

.t48-cell-bg {
  background: rgba(238, 228, 218, 0.35);
  border-radius: 6px;
}

.t48-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  border-radius: 6px;
  transition: all 0.12s ease;
  user-select: none;
  z-index: 1;
}

.t48-tile-new {
  animation: t48-pop 0.2s ease;
}

@keyframes t48-pop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* Tile colors */
.t48-tile-2 { background: #eee4da; color: #776e65; }
.t48-tile-4 { background: #ede0c8; color: #776e65; }
.t48-tile-8 { background: #f2b179; color: #f9f6f2; }
.t48-tile-16 { background: #f59563; color: #f9f6f2; }
.t48-tile-32 { background: #f67c5f; color: #f9f6f2; }
.t48-tile-64 { background: #f65e3b; color: #f9f6f2; }
.t48-tile-128 { background: #edcf72; color: #f9f6f2; font-size: 1.6rem; box-shadow: 0 0 15px 2px rgba(237, 207, 114, 0.4); }
.t48-tile-256 { background: #edcc61; color: #f9f6f2; font-size: 1.6rem; box-shadow: 0 0 20px 4px rgba(237, 204, 97, 0.5); }
.t48-tile-512 { background: #edc850; color: #f9f6f2; font-size: 1.6rem; box-shadow: 0 0 25px 6px rgba(237, 200, 80, 0.6); }
.t48-tile-1024 { background: #edc53f; color: #f9f6f2; font-size: 1.3rem; box-shadow: 0 0 30px 8px rgba(237, 197, 63, 0.7); }
.t48-tile-2048 { background: #edc22e; color: #f9f6f2; font-size: 1.3rem; box-shadow: 0 0 40px 10px rgba(237, 194, 46, 0.8); animation: t48-glow 1s ease-in-out infinite alternate; }
.t48-tile-4096 { background: #3c3a32; color: #f9f6f2; font-size: 1.1rem; box-shadow: 0 0 40px 10px rgba(60, 58, 50, 0.6); }
.t48-tile-8192 { background: #3c3a32; color: #f9f6f2; font-size: 1.1rem; box-shadow: 0 0 50px 12px rgba(60, 58, 50, 0.8); }

@keyframes t48-glow {
  from { box-shadow: 0 0 30px 8px rgba(237, 194, 46, 0.6); }
  to { box-shadow: 0 0 50px 15px rgba(237, 194, 46, 1); }
}

.t48-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.t48-undo-btn, .t48-reset-btn {
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.t48-undo-btn {
  background: #8f7a66;
  color: #f9f6f2;
}

.t48-undo-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.t48-undo-btn:hover:not(:disabled) {
  background: #776055;
  transform: translateY(-2px);
}

.t48-reset-btn {
  background: #f67c5f;
  color: #fff;
}

.t48-reset-btn:hover {
  background: #e56b4e;
  transform: translateY(-2px);
}

.t48-instructions {
  text-align: center;
  color: #776e65;
  font-size: 0.85rem;
  opacity: 0.8;
}

.t48-instructions p {
  margin: 0.2rem 0;
}

/* Mobile D-pad controls */
.t48-mobile-controls {
  display: flex;
  justify-content: center;
  margin: 0.8rem 0;
}

.t48-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.t48-dpad-middle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.t48-dpad-center {
  width: 52px;
  height: 52px;
}

.t48-dpad-btn {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 10px;
  background: #bbada0;
  color: #f9f6f2;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.t48-dpad-btn:hover {
  background: #9e8e82;
}

.t48-dpad-btn:active {
  background: #8f7a6e;
  transform: scale(0.93);
}

/* Hide D-pad on desktop (keyboard/mouse), show on touch/small screens */
@media (hover: hover) and (pointer: fine) {
  .t48-mobile-controls {
    display: none;
  }
}

/* Game over overlay */
.twenty48-page .game-over-overlay {
  display: flex;
}

.twenty48-page .game-over-overlay.hidden {
  display: none;
}

/* Homepage card icon */
.t48-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 60px;
  height: 60px;
  padding: 4px;
  background: #bbada0;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.game-card:hover .t48-icon-grid {
  transform: scale(1.1) rotate(2deg);
}

.t48-icon-cell {
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: bold;
  color: #776e65;
}

.t48-icon-cell:nth-child(1) { background: #eee4da; }
.t48-icon-cell:nth-child(2) { background: #ede0c8; }
.t48-icon-cell:nth-child(3) { background: #f2b179; }
.t48-icon-cell:nth-child(4) { background: rgba(238,228,218,0.35); }
.t48-icon-cell:nth-child(5) { background: #edc22e; }
.t48-icon-cell:nth-child(6) { background: rgba(238,228,218,0.35); }
.t48-icon-cell:nth-child(7) { background: #f59563; }
.t48-icon-cell:nth-child(8) { background: #f67c5f; }
.t48-icon-cell:nth-child(9) { background: #edcf72; }

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

.game-card:hover .t48-icon-cell:nth-child(5) {
  animation: t48-pulse 0.8s ease-in-out infinite;
}

/* Mobile */
@media (max-width: 480px) {
  .t48-board {
    width: min(90vw, 350px);
    height: min(90vw, 350px);
    gap: 5px;
    padding: 5px;
  }
  .t48-tile {
    font-size: 1.4rem;
  }
  .t48-tile-128, .t48-tile-256, .t48-tile-512 {
    font-size: 1.1rem;
  }
  .t48-tile-1024, .t48-tile-2048 {
    font-size: 0.9rem;
  }
  .t48-tile-4096, .t48-tile-8192 {
    font-size: 0.8rem;
  }
  .t48-header h1 {
    font-size: 1.5rem;
  }
  .t48-stats {
    gap: 0.5rem;
  }
  .t48-stat {
    padding: 0.3rem 0.6rem;
    min-width: 60px;
  }
  .t48-stat .stat-value {
    font-size: 1rem;
  }
}

/* ═══════════════════════════════════════
   EMOJI CATCHER
   ═══════════════════════════════════════ */

.emoji-catcher-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  min-height: 100vh;
  color: #fff;
}

.ec-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 0.5rem;
}

.ec-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.ec-header h1 {
  font-size: 1.8rem;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.ec-stats {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.ec-stat {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 0.3rem 0.7rem;
  text-align: center;
  min-width: 65px;
}

.ec-stat .stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  opacity: 0.8;
  display: block;
}

.ec-stat .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
}

.ec-status {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.ec-sound-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 100;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  cursor: pointer;
}

/* Arena */
.ec-arena {
  position: relative;
  width: 100%;
  height: 55vh;
  min-height: 300px;
  max-height: 500px;
  background: linear-gradient(180deg, 
    rgba(100,150,255,0.2) 0%, 
    rgba(100,200,100,0.3) 85%, 
    rgba(80,160,80,0.5) 100%);
  border-radius: 16px;
  overflow: hidden;
  cursor: none;
  touch-action: none;
  border: 2px solid rgba(255,255,255,0.2);
}

.ec-tap-to-start {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  font-weight: bold;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  animation: ec-pulse 1.5s ease-in-out infinite;
  z-index: 5;
}

@keyframes ec-pulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.05); }
}

/* Basket */
.ec-basket {
  position: absolute;
  bottom: 3%;
  transform: translateX(-50%);
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
  transition: left 0.05s linear;
  z-index: 10;
  text-align: center;
  line-height: 1;
}

/* Falling emojis */
.ec-falling-emoji {
  position: absolute;
  font-size: 2rem;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  animation: ec-wobble 2s ease-in-out infinite;
}

@keyframes ec-wobble {
  0%, 100% { transform: translateX(-50%) rotate(-5deg); }
  50% { transform: translateX(-50%) rotate(5deg); }
}

.ec-bonus {
  font-size: 2.4rem;
  animation: ec-glow 1s ease-in-out infinite;
}

@keyframes ec-glow {
  0%, 100% { filter: drop-shadow(0 0 8px gold) drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
  50% { filter: drop-shadow(0 0 16px gold) drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
}

.ec-bad {
  animation: ec-wobble-fast 0.5s ease-in-out infinite;
}

@keyframes ec-wobble-fast {
  0%, 100% { transform: translateX(-50%) rotate(-8deg); }
  50% { transform: translateX(-50%) rotate(8deg); }
}

/* Float text for catch feedback */
.ec-float-text {
  position: absolute;
  font-size: 1.2rem;
  font-weight: 900;
  pointer-events: none;
  z-index: 20;
  transform: translateX(-50%);
  animation: ec-float-up 0.8s ease-out forwards;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

@keyframes ec-float-up {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-60px); }
}

/* Combo active animation */
.ec-combo-active {
  color: #ffd700 !important;
  animation: ec-combo-glow 0.5s ease-in-out infinite;
}

@keyframes ec-combo-glow {
  0%, 100% { text-shadow: 0 0 4px rgba(255,215,0,0.5); }
  50% { text-shadow: 0 0 12px rgba(255,215,0,0.8); }
}

.ec-timer-danger {
  color: #ff4444 !important;
  animation: ec-timer-flash 0.5s ease-in-out infinite;
}

@keyframes ec-timer-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Shake */
.ec-shake {
  animation: ec-shake-anim 0.3s ease-in-out;
}

@keyframes ec-shake-anim {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Game Over Overlay */
.ec-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.emoji-catcher-page .ec-overlay.hidden {
  display: none;
}

.ec-overlay-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 2rem;
  max-width: 450px;
  width: 100%;
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.ec-overlay-content h2 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.ec-final-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.ec-final-stat {
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  min-width: 80px;
}

.ec-final-stat .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  opacity: 0.8;
  display: block;
}

.ec-final-stat .stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  display: block;
}

.ec-leaderboard {
  margin: 1rem 0;
}

.ec-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Homepage card animation */
.ec-icon {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  line-height: 1;
}

.ec-icon span {
  display: inline-block;
  animation: ec-card-fall 2s ease-in-out infinite;
}

.ec-icon span:nth-child(1) { animation-delay: 0s; }
.ec-icon span:nth-child(2) { animation-delay: 0.3s; }
.ec-icon span:nth-child(3) { animation-delay: 0.6s; }
.ec-icon span:nth-child(4) { animation-delay: 0.9s; }

@keyframes ec-card-fall {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.game-card:hover .ec-icon span {
  animation-duration: 0.8s;
}

/* Mobile */
@media (max-width: 600px) {
  .ec-arena {
    height: 50vh;
    min-height: 250px;
  }
  .ec-basket {
    font-size: 2rem;
  }
  .ec-falling-emoji {
    font-size: 1.6rem;
  }
  .ec-header h1 {
    font-size: 1.4rem;
  }
  .ec-stat {
    padding: 0.2rem 0.5rem;
    min-width: 55px;
  }
  .ec-stat .stat-value {
    font-size: 0.95rem;
  }
  .ec-arena {
    cursor: default;
  }
}

/* ═══════════════════════════════════════
   Quick Draw — Western Reaction Game 🤠
   ═══════════════════════════════════════ */

.quick-draw-page {
  background: linear-gradient(180deg, #1a0a00 0%, #3d1c00 20%, #8B4513 50%, #DAA520 80%, #F4A460 100%) !important;
  min-height: 100vh;
}

.quick-draw-page .qd-overlay.hidden { display: none !important; }

.qd-sound-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 100;
  background: rgba(139, 69, 19, 0.7);
  border: 2px solid #DAA520;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.qd-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

.qd-header {
  text-align: center;
  margin-bottom: 12px;
}

.qd-header h1 {
  font-size: 2rem;
  color: #FFD700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 8px;
}

.qd-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.qd-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.3);
  border: 2px solid #DAA520;
  border-radius: 12px;
  padding: 8px 16px;
  min-width: 80px;
}

.qd-stat .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #DAA520;
  letter-spacing: 1px;
}

.qd-stat .stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: #FFD700;
}

.qd-status {
  text-align: center;
  color: #F4A460;
  font-size: 1.1rem;
  margin-bottom: 12px;
  min-height: 1.6em;
}

.qd-wait-text { color: #F4A460; }
.qd-shoot-text { color: #FFD700; font-weight: bold; font-size: 1.3rem; animation: qd-pulse 0.3s ease infinite; }
.qd-false-text { color: #E74C3C; }
.qd-result-text { color: #fff; }

/* Arena */
.qd-arena {
  position: relative;
  width: 100%;
  height: 300px;
  background: radial-gradient(ellipse at center, #5C3317 0%, #3B1F0B 60%, #1a0a00 100%);
  border: 3px solid #DAA520;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(218, 165, 32, 0.3), inset 0 0 40px rgba(0,0,0,0.5);
}

.qd-tap-to-start {
  font-size: 1.3rem;
  color: #DAA520;
  animation: qd-bounce 1.5s ease infinite;
}

@keyframes qd-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.qd-draw-text {
  font-size: 1rem;
  color: transparent;
  font-weight: 900;
  text-transform: uppercase;
  transition: all 0.1s ease;
  pointer-events: none;
}

.qd-draw-text.qd-draw-show {
  font-size: 4rem;
  color: #FFD700;
  text-shadow: 0 0 20px #FF6B35, 0 0 40px #E74C3C, 0 0 60px #FFD700;
  animation: qd-shake 0.1s ease infinite;
}

@keyframes qd-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-2px, 1px) rotate(-1deg); }
  50% { transform: translate(2px, -1px) rotate(1deg); }
  75% { transform: translate(-1px, -2px) rotate(-0.5deg); }
}

.qd-draw-active {
  background: radial-gradient(ellipse at center, #8B4513 0%, #5C3317 60%, #3B1F0B 100%) !important;
  border-color: #FFD700 !important;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), inset 0 0 20px rgba(255, 107, 53, 0.3) !important;
}

.qd-false-start {
  background: radial-gradient(ellipse at center, #5C1010 0%, #3B0808 60%, #1a0000 100%) !important;
  border-color: #E74C3C !important;
}

.qd-clicked-fast {
  border-color: #2ECC71 !important;
  box-shadow: 0 0 20px rgba(46, 204, 113, 0.4) !important;
}

.qd-clicked-ok {
  border-color: #F1C40F !important;
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.4) !important;
}

.qd-clicked-slow {
  border-color: #E74C3C !important;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.4) !important;
}

.qd-reaction-display {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 8px;
  pointer-events: none;
}
.qd-reaction-display.qd-fast { color: #2ECC71; }
.qd-reaction-display.qd-ok { color: #F1C40F; }
.qd-reaction-display.qd-slow { color: #E74C3C; }

/* Distractions */
.qd-distraction {
  position: absolute;
  font-size: 2.5rem;
  animation: qd-distract 1.2s ease forwards;
  pointer-events: none;
  z-index: 5;
}

@keyframes qd-distract {
  0% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  20% { opacity: 1; transform: scale(1.2) rotate(10deg); }
  60% { opacity: 0.8; transform: scale(1) rotate(-5deg); }
  100% { opacity: 0; transform: scale(0.3) rotate(20deg); }
}

/* Round Results */
.qd-round-results {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.qd-round-item {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.85rem;
  border: 1px solid rgba(218, 165, 32, 0.3);
}

.qd-round-num {
  color: #DAA520;
  font-weight: bold;
}

.qd-round-item.qd-fast .qd-round-time { color: #2ECC71; }
.qd-round-item.qd-ok .qd-round-time { color: #F1C40F; }
.qd-round-item.qd-slow .qd-round-time { color: #E74C3C; }
.qd-round-item.qd-false_start { border-color: #E74C3C; }
.qd-round-item.qd-false_start .qd-round-time { color: #E74C3C; font-size: 0.75rem; }

/* Game Over Overlay */
.qd-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26, 10, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 20px;
}

.qd-overlay-content {
  background: linear-gradient(135deg, #3d1c00, #5C3317);
  border: 3px solid #DAA520;
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 30px rgba(218, 165, 32, 0.3);
}

.qd-overlay-content h2 {
  font-size: 1.8rem;
  color: #FFD700;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.qd-overlay-content p {
  color: #F4A460;
  font-size: 1rem;
  margin-bottom: 16px;
}

.qd-final-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.qd-final-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.3);
  border: 2px solid #DAA520;
  border-radius: 12px;
  padding: 10px 20px;
}

.qd-final-stat .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #DAA520;
  letter-spacing: 1px;
}

.qd-final-stat .stat-value {
  font-size: 1.6rem;
  font-weight: bold;
  color: #FFD700;
}

.qd-leaderboard {
  margin: 16px 0;
}

.qd-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Confetti */
.qd-confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  top: -10px;
  animation: qd-confetti-fall linear forwards;
  pointer-events: none;
  z-index: 10;
}

@keyframes qd-confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(350px) rotate(720deg); opacity: 0; }
}

@keyframes qd-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Homepage Card */
.qd-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.qd-icon-cowboy {
  font-size: 2.5rem;
  transition: transform 0.3s ease;
}

.qd-icon-bang {
  font-size: 1.5rem;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s ease;
}

.game-card:hover .qd-icon-cowboy {
  transform: scale(1.1) rotate(-5deg);
}

.game-card:hover .qd-icon-bang {
  opacity: 1;
  transform: scale(1.3);
}

/* Mobile */
@media (max-width: 600px) {
  .qd-header h1 { font-size: 1.5rem; }
  .qd-arena { height: 250px; }
  .qd-draw-text.qd-draw-show { font-size: 3rem; }
  .qd-overlay-content { padding: 16px; }
}

/* ═══════════════════════════════════════════════════════
   SLIDE PUZZLE
   ═══════════════════════════════════════════════════════ */

/* Homepage icon */
.sp-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 64px;
  height: 64px;
}
.sp-icon-tile {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}
.sp-icon-empty {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}
.game-card:hover .sp-icon-grid {
  animation: sp-icon-wobble 0.5s ease;
}
@keyframes sp-icon-wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

/* Game page */
.slide-puzzle-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white;
  padding: 20px;
}

.sp-header {
  text-align: center;
  margin-bottom: 16px;
}
.sp-header h1 {
  font-size: 2rem;
  margin: 0 0 12px;
}
.sp-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.sp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sp-stat .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.7;
  letter-spacing: 1px;
}
.sp-stat .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #a78bfa;
}

.sp-status {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 16px;
  opacity: 0.9;
}

/* Board — absolute positioning for smooth slide animations */
.sp-board {
  position: relative;
  max-width: 400px;
  margin: 0 auto 20px;
  aspect-ratio: 1;
  padding: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.1);
}

.sp-tile {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: top 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              left 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.15s ease, box-shadow 0.15s ease;
  background: linear-gradient(
    135deg,
    hsl(var(--tile-hue, 240) 70% 55%),
    hsl(var(--tile-hue, 240) 60% 40%)
  );
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 3px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}
.sp-tile:hover:not(.sp-empty) {
  transform: scale(1.05);
  box-shadow: 0 5px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}
.sp-tile:active:not(.sp-empty) {
  transform: scale(0.95);
}
.sp-tile.sp-empty {
  background: rgba(255,255,255,0.03);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
  cursor: default;
}
.sp-tile.sp-correct {
  box-shadow: 0 3px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2), 0 0 12px rgba(74, 222, 128, 0.4);
  border: 2px solid rgba(74, 222, 128, 0.5);
}

/* Shake animation for invalid moves */
@keyframes sp-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.sp-tile.sp-shake {
  animation: sp-shake 0.3s ease;
}

/* Actions */
.sp-actions {
  text-align: center;
  margin-bottom: 16px;
}
.sp-shuffle-btn {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.sp-shuffle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.sp-instructions {
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
}
.sp-instructions p {
  margin: 4px 0;
}

/* Win celebration bounce */
@keyframes sp-celebrate {
  0% { transform: scale(1); }
  30% { transform: scale(1.2) rotate(-3deg); }
  50% { transform: scale(0.9) rotate(2deg); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.sp-tile.sp-celebrate {
  animation: sp-celebrate 0.5s ease;
  z-index: 10;
}

/* Keyboard hint */
.sp-keyboard-hint {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.5;
  margin-top: 8px;
}

/* Game over overlay specificity fix */
.slide-puzzle-page .game-over-overlay.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 480px) {
  .sp-board { max-width: 320px; padding: 6px; }
  .sp-tile { font-size: 1.3rem; border-radius: 6px; }
  .sp-header h1 { font-size: 1.5rem; }
}

/* ═══════════════════════════════════════
   Trivia Blast — Knowledge Quiz 🧠
   ═══════════════════════════════════════ */

.trivia-blast-page {
  background: linear-gradient(135deg, #1a0533 0%, #2d1b69 30%, #4a1a8a 60%, #1e3a5f 100%) !important;
  min-height: 100vh;
}

.trivia-blast-page .game-over-overlay.hidden { display: none !important; }

.tb-sound-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 100;
  background: rgba(75, 0, 130, 0.7);
  border: 2px solid #9B59B6;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.tb-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

.tb-header {
  text-align: center;
  margin-bottom: 12px;
}

.tb-header h1 {
  font-size: 2rem;
  color: #E8D5FF;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 8px;
}

.tb-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.tb-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.3);
  border: 2px solid #9B59B6;
  border-radius: 12px;
  padding: 8px 16px;
  min-width: 80px;
}

.tb-stat .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #BB8FCE;
  letter-spacing: 1px;
}

.tb-stat .stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: #E8D5FF;
}

/* Timer Bar */
.tb-timer-bar {
  width: 100%;
  height: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
}

.tb-timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #2ECC71, #27AE60);
  border-radius: 4px;
  transition: width 0.3s linear;
}

.tb-timer-fill.tb-timer-warning {
  background: linear-gradient(90deg, #F1C40F, #F39C12);
}

.tb-timer-fill.tb-timer-danger {
  background: linear-gradient(90deg, #E74C3C, #C0392B);
  animation: tb-timer-pulse 0.5s ease infinite;
}

@keyframes tb-timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Game Area */
.tb-game-area {
  text-align: center;
}

.tb-question {
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(155, 89, 182, 0.4);
  border-radius: 16px;
  padding: 24px 20px;
  margin-bottom: 16px;
}

.tb-question-text {
  font-size: 1.3rem;
  color: #fff;
  line-height: 1.5;
  margin: 0;
}

.tb-hint-btn {
  background: rgba(241, 196, 15, 0.2);
  border: 2px solid #F1C40F;
  border-radius: 10px;
  color: #F1C40F;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.tb-hint-btn:hover {
  background: rgba(241, 196, 15, 0.35);
  transform: scale(1.03);
}

.tb-hint-btn.hidden {
  display: none;
}

.tb-hint-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: #888;
  color: #888;
}

/* Answer Grid */
.tb-answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tb-answer-btn {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(155, 89, 182, 0.5);
  border-radius: 12px;
  color: #fff;
  padding: 16px 12px;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1.3;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tb-answer-btn .answer-label {
  display: inline-block;
  background: rgba(155, 89, 182, 0.4);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-weight: bold;
  font-size: 0.85rem;
  margin-right: 8px;
  flex-shrink: 0;
}

.tb-answer-btn .answer-text {
  flex: 1;
}

.tb-answer-btn:hover:not(:disabled) {
  background: rgba(155, 89, 182, 0.3);
  border-color: #BB8FCE;
  transform: scale(1.02);
}

.tb-answer-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.tb-answer-btn.tb-correct {
  background: rgba(46, 204, 113, 0.4) !important;
  border-color: #2ECC71 !important;
  color: #2ECC71 !important;
  animation: tb-correct-flash 0.4s ease;
}

@keyframes tb-correct-flash {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); }
  50% { box-shadow: 0 0 20px 8px rgba(46, 204, 113, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.tb-answer-btn.tb-wrong {
  background: rgba(231, 76, 60, 0.4) !important;
  border-color: #E74C3C !important;
  color: #E74C3C !important;
  animation: tb-wrong-shake 0.4s ease;
}

@keyframes tb-wrong-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.tb-answer-btn.tb-reveal-correct {
  background: rgba(46, 204, 113, 0.2) !important;
  border-color: #2ECC71 !important;
  color: #2ECC71 !important;
}

.tb-answer-btn.tb-eliminated {
  opacity: 0.2;
  pointer-events: none;
  border-style: dashed;
}

.tb-answer-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

/* Score Pop */
.tb-score-pop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: bold;
  color: #2ECC71;
  text-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
  animation: tb-pop-up 0.8s ease forwards;
  pointer-events: none;
  z-index: 10;
}

.tb-score-pop.tb-pop-wrong {
  color: #E74C3C;
  text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

@keyframes tb-pop-up {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  30% { transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1); }
}

/* Game Over */
.trivia-blast-page .game-over-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26, 5, 51, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 20px;
}

.trivia-blast-page .overlay-content {
  background: linear-gradient(135deg, #2d1b69, #4a1a8a);
  border: 3px solid #9B59B6;
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 30px rgba(155, 89, 182, 0.3);
}

.trivia-blast-page .overlay-content h2 {
  font-size: 1.8rem;
  color: #E8D5FF;
  margin-bottom: 8px;
}

.trivia-blast-page .overlay-content p {
  color: #BB8FCE;
  margin-bottom: 16px;
}

.tb-final-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tb-final-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.3);
  border: 2px solid #9B59B6;
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 70px;
}

.tb-final-stat .stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #BB8FCE;
  letter-spacing: 1px;
}

.tb-final-stat .stat-value {
  font-size: 1.4rem;
  font-weight: bold;
  color: #E8D5FF;
}

.tb-leaderboard {
  margin: 16px 0;
}

.tb-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Confetti */
.tb-confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  top: -10px;
  animation: tb-confetti-fall linear forwards;
  pointer-events: none;
  z-index: 100;
}

@keyframes tb-confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Homepage Card Icon */
.tb-icon {
  position: relative;
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tb-icon-sparkle {
  position: absolute;
  top: -4px;
  right: -8px;
  font-size: 1rem;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s ease;
}

.game-card:hover .tb-icon-sparkle {
  opacity: 1;
  transform: scale(1.2);
}

.game-card:hover .tb-icon {
  animation: tb-icon-bounce 0.5s ease;
}

@keyframes tb-icon-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Mobile */
@media (max-width: 600px) {
  .tb-header h1 { font-size: 1.5rem; }
  .tb-question-text { font-size: 1.1rem; }
  .tb-answers-grid { grid-template-columns: 1fr; }
  .tb-answer-btn { padding: 14px 10px; font-size: 1rem; min-height: 50px; }
  .tb-final-stats { gap: 8px; }
  .trivia-blast-page .overlay-content { padding: 16px; }
}

/* ═══════════════════════════════════════════════════════════ */
/*                     WORD SCRAMBLE                          */
/* ═══════════════════════════════════════════════════════════ */

.word-scramble-bg {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
}

/* Category badge */
.ws-category-badge {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
  padding: 4px 16px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  display: inline-block;
}

/* Scramble area */
.ws-scramble-area {
  text-align: center;
  padding: 20px;
  margin: 10px 0;
}

/* Letter tiles */
.ws-letters {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.ws-letter-tile {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(233,69,96,0.3);
  animation: ws-tile-pop 0.3s ease forwards;
  opacity: 0;
  transform: scale(0.5);
  text-transform: uppercase;
}

@keyframes ws-tile-pop {
  to { opacity: 1; transform: scale(1); }
}

/* Answer slots */
.ws-answer-slots {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ws-answer-slot {
  width: 44px;
  height: 48px;
  border: 2px dashed rgba(255,255,255,0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: bold;
  color: #fff;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.ws-answer-slot.filled {
  border-style: solid;
  background: rgba(255,255,255,0.1);
}

.ws-answer-slot.correct-pos {
  border-color: #4ecdc4;
  background: rgba(78,205,196,0.2);
  box-shadow: 0 0 8px rgba(78,205,196,0.3);
}

.ws-answer-slot.wrong-pos {
  border-color: #ffd93d;
  background: rgba(255,217,61,0.15);
}

.ws-answer-slot.revealed {
  border-color: #888;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
}

/* Shake animation */
.ws-shake {
  animation: ws-shake 0.4s ease;
}
@keyframes ws-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Reshuffle animation */
.ws-reshuffle .ws-letter-tile {
  animation: ws-tile-pop 0.2s ease forwards;
}

/* Input area */
.ws-input-area {
  text-align: center;
  padding: 0 16px;
}

.ws-input {
  width: 100%;
  max-width: 360px;
  padding: 14px 20px;
  font-size: 1.4rem;
  font-weight: bold;
  text-align: center;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  outline: none;
  letter-spacing: 4px;
  text-transform: uppercase;
  transition: border-color 0.3s;
}

.ws-input:focus {
  border-color: #e94560;
  box-shadow: 0 0 12px rgba(233,69,96,0.3);
}

.ws-input::placeholder {
  color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
  text-transform: none;
  font-size: 1rem;
}

/* Buttons */
.ws-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ws-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.ws-hint-btn {
  background: rgba(255,217,61,0.2);
  color: #ffd93d;
}
.ws-hint-btn:hover { background: rgba(255,217,61,0.3); }
.ws-hint-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.ws-shuffle-btn {
  background: rgba(78,205,196,0.2);
  color: #4ecdc4;
}
.ws-shuffle-btn:hover { background: rgba(78,205,196,0.3); }

.ws-skip-btn {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
}
.ws-skip-btn:hover { background: rgba(255,255,255,0.15); }

/* Hint area */
.ws-hint-area {
  text-align: center;
  padding: 8px 16px;
  background: rgba(255,217,61,0.12);
  border-radius: 8px;
  margin: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ws-hint-label {
  color: #ffd93d;
  font-weight: 600;
}

.ws-hint-text {
  color: rgba(255,255,255,0.9);
}

/* Feedback */
.ws-feedback {
  text-align: center;
  padding: 10px 16px;
  margin: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  animation: ws-feedback-pop 0.3s ease;
}

@keyframes ws-feedback-pop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.ws-feedback-success {
  background: rgba(78,205,196,0.15);
  color: #4ecdc4;
}

.ws-feedback-error {
  background: rgba(233,69,96,0.15);
  color: #e94560;
}

.ws-feedback-info {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
}

/* Streak display */
.ws-streak {
  color: #ff6b35;
  font-weight: bold;
}

/* Game Over Overlay */
.word-scramble-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.word-scramble-overlay.hidden {
  display: none;
}

.word-scramble-overlay .overlay-content {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  border: 2px solid rgba(233,69,96,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  color: #fff;
}

.word-scramble-overlay h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.word-scramble-overlay p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
}

/* Confetti */
.ws-confetti-bit {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: ws-confetti-fall 0.8s ease-out forwards;
  pointer-events: none;
  z-index: 50;
}

.ws-confetti-big {
  width: 10px;
  height: 10px;
  animation: ws-confetti-fall-big 1.5s ease-out forwards;
  top: 0;
}

@keyframes ws-confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(80px) rotate(360deg); opacity: 0; }
}

@keyframes ws-confetti-fall-big {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg) scale(0.5); opacity: 0; }
}

/* Homepage card icon */
.ws-icon {
  position: relative;
  font-size: 2.5rem;
}

.ws-icon-letter {
  position: absolute;
  top: -4px;
  right: -8px;
  font-size: 0.9rem;
  font-weight: bold;
  background: #e94560;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  transform: rotate(15deg);
}

.game-card:hover .ws-icon-letter {
  opacity: 1;
  transform: rotate(-10deg) scale(1.1);
}

.game-card:hover .ws-icon {
  animation: ws-icon-spin 0.6s ease;
}

@keyframes ws-icon-spin {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
  100% { transform: rotate(0deg); }
}

/* Mobile */
@media (max-width: 600px) {
  .ws-letter-tile { width: 42px; height: 42px; font-size: 1.2rem; }
  .ws-answer-slot { width: 36px; height: 40px; font-size: 1.1rem; }
  .ws-input { font-size: 1.2rem; padding: 12px 16px; }
  .ws-buttons { gap: 6px; }
  .ws-btn { padding: 6px 12px; font-size: 0.8rem; }
  .word-scramble-overlay .overlay-content { padding: 16px; }
}

/* ═══════════════════════════════════════════════
   🗺️ TREASURE HUNT
   ═══════════════════════════════════════════════ */

/* Homepage icon */
.th-icon { position: relative; font-size: 2.5rem; }
.th-icon-gem { position: absolute; bottom: -2px; right: -8px; font-size: 1rem; opacity: 0; transition: all 0.3s; }
.game-card:hover .th-icon-gem { opacity: 1; transform: scale(1.3); }

/* Header */
.th-header { text-align: center; margin-bottom: 12px; }
.th-header h1 { font-size: 1.6rem; margin-bottom: 8px; }
.th-stats { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.th-stat { display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,0.1); padding: 8px 14px; border-radius: 10px; min-width: 65px; }
.th-stat .stat-label { font-size: 0.7rem; text-transform: uppercase; opacity: 0.7; }
.th-stat .stat-value { font-size: 1.3rem; font-weight: bold; }

/* Clue banner */
.th-clue { text-align: center; font-size: 1.1rem; font-weight: bold; padding: 10px 16px; background: rgba(255,255,255,0.1); border-radius: 10px; margin-bottom: 12px; transition: all 0.3s; }
.th-clue-flash { transform: scale(1.05); background: rgba(255,215,0,0.2); }

/* Grid */
.th-grid { display: grid; gap: 3px; max-width: 500px; margin: 0 auto 12px; }
.th-cell { width: 100%; aspect-ratio: 1; border: none; border-radius: 6px; font-size: 1.2rem; cursor: pointer; background: linear-gradient(145deg, #4a3d6b, #3d2e5c); color: white; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.th-cell:hover:not(.th-revealed) { transform: scale(1.08); background: linear-gradient(145deg, #5a4d7b, #4d3e6c); box-shadow: 0 0 12px rgba(255,215,0,0.3); }
.th-cell:active:not(.th-revealed) { transform: scale(0.95); }

/* Revealed cell states */
.th-cell.th-revealed { cursor: default; opacity: 0.9; }
.th-cell.th-hot { background: linear-gradient(145deg, #ff4444, #cc2222) !important; }
.th-cell.th-warm { background: linear-gradient(145deg, #ff8c00, #cc6600) !important; }
.th-cell.th-cold { background: linear-gradient(145deg, #4488cc, #2266aa) !important; }
.th-cell.th-freezing { background: linear-gradient(145deg, #66bbdd, #4499bb) !important; }
.th-cell.th-found-treasure { background: linear-gradient(145deg, #ffd700, #ffaa00) !important; animation: th-sparkle 0.5s ease; font-size: 1.5rem; }
.th-cell.th-treasure { background: linear-gradient(145deg, #ffd700, #ffaa00) !important; }

@keyframes th-sparkle {
  0% { transform: scale(1); }
  50% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1); }
}

/* Legend */
.th-legend { display: flex; justify-content: center; gap: 16px; font-size: 0.8rem; opacity: 0.7; flex-wrap: wrap; }
.th-legend-item { white-space: nowrap; }

/* Game over overlay */
.treasure-hunt-page .game-over-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.treasure-hunt-page .game-over-overlay.hidden { display: none; }

/* Responsive */
@media (max-width: 480px) {
  .th-cell { font-size: 0.9rem; border-radius: 4px; }
  .th-stats { gap: 8px; }
  .th-stat { padding: 6px 10px; min-width: 55px; }
  .th-clue { font-size: 0.9rem; padding: 8px 12px; }
  .th-legend { font-size: 0.7rem; gap: 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   Balloon Pop
   ═══════════════════════════════════════════════════════════════ */

.balloon-pop-page .bp-header {
  text-align: center;
  margin-bottom: 10px;
}

.balloon-pop-page .bp-header h1 {
  font-size: 1.8rem;
  margin: 0 0 8px;
}

.balloon-pop-page .bp-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.balloon-pop-page .bp-stat {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 8px 14px;
  min-width: 65px;
  text-align: center;
}

.balloon-pop-page .bp-stat .stat-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

.balloon-pop-page .bp-stat .stat-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
}

.balloon-pop-page .timer-warning {
  color: #FF4444 !important;
  animation: timer-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes timer-pulse {
  from { opacity: 1; }
  to { opacity: 0.4; }
}

.balloon-pop-page .combo-active {
  color: #FFD700 !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  animation: combo-glow 0.3s ease-in-out infinite alternate;
}

@keyframes combo-glow {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

/* Game Area */
.balloon-pop-page .bp-game-area {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 450px;
  margin: 0 auto;
  background: linear-gradient(180deg, #87CEEB 0%, #B0E0FF 40%, #E8F4FD 70%, #98D982 95%, #7BC96A 100%);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2), inset 0 0 40px rgba(255,255,255,0.1);
}

/* Clouds background */
.balloon-pop-page .bp-game-area::before {
  content: '☁️';
  position: absolute;
  top: 15%;
  left: 10%;
  font-size: 2rem;
  opacity: 0.3;
  animation: cloud-drift 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.balloon-pop-page .bp-game-area::after {
  content: '☁️';
  position: absolute;
  top: 25%;
  right: 15%;
  font-size: 1.5rem;
  opacity: 0.2;
  animation: cloud-drift 25s linear infinite reverse;
  pointer-events: none;
  z-index: 0;
}

@keyframes cloud-drift {
  0% { transform: translateX(-20px); }
  50% { transform: translateX(20px); }
  100% { transform: translateX(-20px); }
}

.balloon-pop-page .bp-start-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
}

.balloon-pop-page .bp-start-message p {
  font-size: 1.6rem;
  font-weight: 700;
  color: #333;
  text-shadow: 0 2px 4px rgba(255,255,255,0.5);
  animation: bounce-text 1s ease-in-out infinite;
}

@keyframes bounce-text {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.balloon-pop-page .bp-start-message.hidden {
  display: none;
}

/* Balloons */
.balloon-pop-page .bp-balloon {
  position: absolute;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
  box-shadow: inset -8px -5px 15px rgba(255,255,255,0.4), inset 5px 5px 10px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.15);
}

.balloon-pop-page .bp-balloon-red {
  background: radial-gradient(circle at 35% 35%, #FF7B7B, #E74C3C 60%, #C0392B);
}

.balloon-pop-page .bp-balloon-green {
  background: radial-gradient(circle at 35% 35%, #6BEB8A, #2ECC71 60%, #27AE60);
}

.balloon-pop-page .bp-balloon-blue {
  background: radial-gradient(circle at 35% 35%, #7BB8F0, #4A90D9 60%, #2E6DB4);
}

.balloon-pop-page .bp-balloon-gold {
  background: radial-gradient(circle at 35% 35%, #FFE87C, #FFD700 60%, #DAA520);
  animation: gold-sparkle 0.6s ease-in-out infinite alternate;
}

@keyframes gold-sparkle {
  from { box-shadow: inset -8px -5px 15px rgba(255,255,255,0.5), inset 5px 5px 10px rgba(0,0,0,0.1), 0 0 15px rgba(255,215,0,0.4); }
  to { box-shadow: inset -8px -5px 15px rgba(255,255,255,0.7), inset 5px 5px 10px rgba(0,0,0,0.05), 0 0 25px rgba(255,215,0,0.7); }
}

.balloon-pop-page .bp-balloon-bomb {
  background: radial-gradient(circle at 40% 40%, #555, #333 60%, #111);
  border-radius: 50%;
}

.balloon-pop-page .bp-balloon-emoji {
  font-size: 1.4rem;
  pointer-events: none;
}

/* Balloon string */
.balloon-pop-page .bp-balloon-string {
  position: absolute;
  bottom: -20px;
  left: 50%;
  width: 2px;
  height: 20px;
  background: rgba(0,0,0,0.3);
  transform: translateX(-50%);
  pointer-events: none;
}

.balloon-pop-page .bp-balloon-string::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,0.2);
}

/* Pop particles */
.balloon-pop-page .bp-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 20;
  animation: particle-burst 0.4s ease-out forwards;
}

.balloon-pop-page .bp-explosion-particle {
  width: 10px;
  height: 10px;
  animation: particle-burst 0.5s ease-out forwards;
}

@keyframes particle-burst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0);
    opacity: 0;
  }
}

/* Floating score */
.balloon-pop-page .bp-floating-score {
  position: absolute;
  font-size: 1.1rem;
  font-weight: 800;
  color: #2ECC71;
  pointer-events: none;
  z-index: 25;
  animation: float-up 0.8s ease-out forwards;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transform: translateX(-50%);
}

.balloon-pop-page .bp-floating-score.negative {
  color: #E74C3C;
  font-size: 1.3rem;
}

.balloon-pop-page .bp-floating-score.combo-score {
  color: #FFD700;
  font-size: 1.4rem;
  text-shadow: 0 0 10px rgba(255,215,0,0.5), 0 1px 3px rgba(0,0,0,0.3);
}

@keyframes float-up {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-60px) scale(1.3);
  }
}

/* Screen shake */
.balloon-pop-page .bp-shake {
  animation: screen-shake 0.4s ease-out;
}

@keyframes screen-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5px, -3px); }
  20% { transform: translate(5px, 3px); }
  30% { transform: translate(-4px, 2px); }
  40% { transform: translate(4px, -2px); }
  50% { transform: translate(-3px, 1px); }
  60% { transform: translate(3px, -1px); }
  70% { transform: translate(-2px, 1px); }
  80% { transform: translate(2px, 0px); }
  90% { transform: translate(-1px, 0px); }
}

/* Game over overlay - must hide properly */
.balloon-pop-page .game-over-overlay {
  display: flex;
}

.balloon-pop-page .game-over-overlay.hidden {
  display: none;
}

/* Balloon pop game card icon */
.balloon-pop-icon {
  position: relative;
}

.balloon-pop-icon span {
  font-size: 2.5rem;
  animation: balloon-float-icon 2s ease-in-out infinite;
}

@keyframes balloon-float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Leaderboard in balloon pop */
.balloon-pop-page .bp-leaderboard {
  margin: 15px 0;
}

/* Responsive */
@media (max-width: 600px) {
  .balloon-pop-page .bp-game-area {
    height: 380px;
    border-radius: 12px;
  }
  .balloon-pop-page .bp-header h1 {
    font-size: 1.4rem;
  }
  .balloon-pop-page .bp-stats {
    gap: 6px;
  }
  .balloon-pop-page .bp-stat {
    padding: 6px 10px;
    min-width: 55px;
  }
  .balloon-pop-page .bp-stat .stat-value {
    font-size: 1.1rem;
  }
  .balloon-pop-page .bp-balloon {
    min-width: 40px;
    min-height: 48px;
  }
}

@media (max-width: 400px) {
  .balloon-pop-page .bp-game-area {
    height: 340px;
  }
}

/* ═══════════════════════════════════════════
   Color Rush - Stroop Effect Game (#39)
   ═══════════════════════════════════════════ */

.color-rush-page {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #1a1a2e 75%, #16213e 100%);
  min-height: 100vh;
}

.color-rush-page .cr-sound-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
}

.color-rush-page .cr-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

.color-rush-page .cr-header {
  text-align: center;
  margin-bottom: 1rem;
}

.color-rush-page .cr-header h1 {
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
  color: #fff;
  text-shadow: 0 0 20px rgba(170, 68, 255, 0.5);
}

.color-rush-page .cr-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.color-rush-page .cr-stat {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.4rem 0.8rem;
  text-align: center;
  backdrop-filter: blur(4px);
}

.color-rush-page .cr-stat .stat-label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.color-rush-page .cr-stat .stat-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.color-rush-page .cr-time-low {
  color: #FF4444 !important;
  animation: cr-pulse 0.5s ease-in-out infinite;
}

@keyframes cr-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── Arena ─── */

.color-rush-page .cr-arena {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  padding: 2rem 1rem;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

.color-rush-page .cr-arena.cr-flash-correct {
  background: rgba(68, 204, 68, 0.2);
}

.color-rush-page .cr-arena.cr-flash-wrong {
  background: rgba(255, 68, 68, 0.2);
}

.color-rush-page .cr-tap-start {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  animation: cr-bounce 1.5s ease-in-out infinite;
  user-select: none;
}

@keyframes cr-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ─── Word Display ─── */

.color-rush-page .cr-word-display {
  text-align: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.color-rush-page .cr-instruction {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.color-rush-page .cr-word {
  font-size: 4.5rem;
  font-weight: 900;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.05em;
  line-height: 1.2;
  transition: color 0.1s ease;
  user-select: none;
}

.color-rush-page .cr-word.cr-pop {
  animation: cr-word-pop 0.25s ease-out;
}

@keyframes cr-word-pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ─── Feedback ─── */

.color-rush-page .cr-feedback {
  font-size: 2.5rem;
  font-weight: 700;
  margin-top: 0.5rem;
  animation: cr-feedback-pop 0.3s ease-out;
}

.color-rush-page .cr-feedback.cr-correct {
  color: #44CC44;
  text-shadow: 0 0 10px rgba(68, 204, 68, 0.5);
}

.color-rush-page .cr-feedback.cr-wrong {
  color: #FF4444;
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

@keyframes cr-feedback-pop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

/* ─── Color Buttons ─── */

.color-rush-page .cr-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: 400px;
  margin-top: 1rem;
}

.color-rush-page .cr-color-btn {
  padding: 1rem 0.5rem;
  border-radius: 14px;
  border: 3px solid;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  min-height: 56px;
}

.color-rush-page .cr-color-btn:active {
  transform: scale(0.93);
}

.color-rush-page .cr-color-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

@media (min-width: 480px) {
  .color-rush-page .cr-buttons {
    grid-template-columns: repeat(3, 1fr);
  }
  .color-rush-page .cr-word {
    font-size: 5.5rem;
  }
}

@media (min-width: 640px) {
  .color-rush-page .cr-buttons {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ─── Game Over Overlay ─── */

.color-rush-page .cr-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 30, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  overflow-y: auto;
}

.color-rush-page .cr-overlay.hidden {
  display: none !important;
}

.color-rush-page .cr-overlay-content {
  background: rgba(30, 30, 60, 0.95);
  border-radius: 20px;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  border: 2px solid rgba(170, 68, 255, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.color-rush-page .cr-overlay-content h2 {
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
  color: #fff;
}

.color-rush-page .cr-overlay-content p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 1.5rem;
}

.color-rush-page .cr-final-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.color-rush-page .cr-final-stat {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem;
}

.color-rush-page .cr-final-stat .stat-label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.color-rush-page .cr-final-stat .stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

/* ─── Leaderboard ─── */

.color-rush-page .cr-leaderboard {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

/* ─── Result Buttons ─── */

.color-rush-page .cr-result-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.color-rush-page .cr-result-buttons .play-button {
  width: 100%;
  max-width: 280px;
}

/* ─── Hidden utility ─── */

.color-rush-page .hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   Tic-Tac-Toe — Game Over Overlay & Leaderboard
   ═══════════════════════════════════════════════════════════════ */

.ttt-game-over-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: ttt-fade-in 0.3s ease;
}

.ttt-game-over-overlay.hidden {
  display: none !important;
}

@keyframes ttt-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ttt-game-over-content {
  background: linear-gradient(135deg, #2d1b69 0%, #1a1a2e 50%, #16213e 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  max-width: 420px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ttt-game-over-content h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.ttt-game-over-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.ttt-final-score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(255, 215, 0, 0.15);
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.ttt-final-score-row.hidden {
  display: none !important;
}

.ttt-final-score-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

.ttt-final-score-value {
  color: #ffd700;
  font-size: 1.8rem;
  font-weight: bold;
}

.ttt-leaderboard-msg {
  color: #ffd700;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.ttt-leaderboard-msg.hidden {
  display: none !important;
}

.ttt-leaderboard {
  margin-bottom: 1.5rem;
}

.ttt-game-over-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.ttt-game-over-buttons .play-button {
  width: 100%;
  max-width: 280px;
}

.ttt-streak {
  text-align: center;
  font-size: 1.1rem;
  color: #ff6b35;
  font-weight: bold;
  margin-top: 0.75rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 107, 53, 0.15);
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 53, 0.3);
}

.ttt-streak.hidden {
  display: none !important;
}

/* ============================================ */
/* SUDOKU                                       */
/* ============================================ */

.sudoku-page .sudoku-header {
  text-align: center;
  margin-bottom: 0.75rem;
}

.sudoku-page .sudoku-header h1 {
  margin-bottom: 0.5rem;
}

.sudoku-page .sudoku-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sudoku-page .sudoku-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  min-width: 60px;
}

.sudoku-page .sudoku-stat .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  opacity: 0.7;
}

.sudoku-page .sudoku-stat .stat-value {
  font-size: 1.1rem;
  font-weight: bold;
}

.sudoku-page .sudoku-status {
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
  min-height: 1.4em;
}

/* Board */
.sudoku-page .sudoku-board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 1px;
  max-width: 420px;
  margin: 0 auto 1rem;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
}

.sudoku-page .sudoku-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: background 0.15s, transform 0.15s;
  aspect-ratio: 1;
}

.sudoku-page .sudoku-cell:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Box borders (thicker lines for 3x3 groups) */
.sudoku-page .sudoku-cell.sudoku-box-left {
  border-left: 2px solid rgba(255, 255, 255, 0.5);
}

.sudoku-page .sudoku-cell.sudoku-box-top {
  border-top: 2px solid rgba(255, 255, 255, 0.5);
}

/* Given (pre-filled) cells */
.sudoku-page .sudoku-cell.sudoku-given {
  color: #fff;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

/* Editable cells */
.sudoku-page .sudoku-cell.sudoku-editable {
  color: #7dd3fc;
}

/* Selected cell */
.sudoku-page .sudoku-cell.sudoku-selected {
  background: rgba(99, 179, 237, 0.4) !important;
  box-shadow: inset 0 0 0 2px #63b3ed;
}

/* Highlighted (same row/col/box) */
.sudoku-page .sudoku-cell.sudoku-highlighted {
  background: rgba(99, 179, 237, 0.12);
}

/* Same number highlight */
.sudoku-page .sudoku-cell.sudoku-same-number {
  background: rgba(99, 179, 237, 0.22);
}

/* Error cells */
.sudoku-page .sudoku-cell.sudoku-error {
  color: #fc8181 !important;
  background: rgba(245, 101, 101, 0.15);
}

/* Correct (player-placed) */
.sudoku-page .sudoku-cell.sudoku-correct {
  color: #68d391;
}

/* Hint flash */
.sudoku-page .sudoku-cell.sudoku-hint {
  animation: sudoku-hint-flash 0.6s ease 3;
}

@keyframes sudoku-hint-flash {
  0%, 100% { background: rgba(0, 0, 0, 0.25); }
  50% { background: rgba(246, 224, 94, 0.4); }
}

/* Celebrate */
.sudoku-page .sudoku-cell.sudoku-celebrate {
  animation: sudoku-bounce 0.5s ease;
}

@keyframes sudoku-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Notes inside cells */
.sudoku-page .sudoku-cell.sudoku-has-notes {
  padding: 0;
}

.sudoku-page .sudoku-notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 100%;
  height: 100%;
}

.sudoku-page .sudoku-note {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: normal;
}

/* Number pad */
.sudoku-page .sudoku-controls {
  max-width: 420px;
  margin: 0 auto;
}

.sudoku-page .sudoku-numpad {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  margin-bottom: 0.75rem;
}

.sudoku-page .sudoku-num-btn {
  padding: 0.6rem 0;
  font-size: 1.3rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.sudoku-page .sudoku-num-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.sudoku-page .sudoku-num-btn:active {
  transform: scale(0.92);
}

/* Action buttons */
.sudoku-page .sudoku-action-btns {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.sudoku-page .sudoku-action-btn {
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}

.sudoku-page .sudoku-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sudoku-page .sudoku-action-btn.active {
  background: rgba(99, 179, 237, 0.4);
  box-shadow: 0 0 0 2px #63b3ed;
}

.sudoku-page .sudoku-controls-hint {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
}

/* Game over overlay */
.sudoku-page .sudoku-game-over {
  display: flex;
}

.sudoku-page .sudoku-game-over.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
  .sudoku-page .sudoku-board {
    max-width: 100%;
  }

  .sudoku-page .sudoku-cell {
    font-size: 1rem;
  }

  .sudoku-page .sudoku-num-btn {
    font-size: 1.1rem;
    padding: 0.5rem 0;
  }

  .sudoku-page .sudoku-note {
    font-size: 0.35rem;
  }

  .sudoku-page .sudoku-action-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }

  .sudoku-page .sudoku-controls-hint {
    font-size: 0.72rem;
  }
}

/* ─── BATTLESHIP ─────────────────────────────────────── */

.battleship-page .battleship-header {
  text-align: center;
  margin-bottom: 1rem;
}

.battleship-page .battleship-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.battleship-page .battleship-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.battleship-page .battleship-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.4rem 1rem;
}

.battleship-page .battleship-stat .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  opacity: 0.6;
}

.battleship-page .battleship-stat .stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: #4fc3f7;
}

.battleship-page .battleship-status {
  text-align: center;
  font-size: 1.1rem;
  padding: 0.6rem;
  margin-bottom: 1rem;
  background: rgba(79, 195, 247, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(79, 195, 247, 0.2);
}

/* Setup Phase */
.battleship-page .battleship-setup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Specificity override so hidden state wins */
.battleship-page .battleship-setup.hidden {
  display: none;
}

.battleship-page .setup-ship-list {
  text-align: center;
  width: 100%;
  max-width: 500px;
}

.battleship-page .setup-instruction {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.battleship-page .ship-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.battleship-page .ship-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.battleship-page .ship-btn:hover {
  border-color: rgba(79, 195, 247, 0.5);
  background: rgba(79, 195, 247, 0.1);
}

.battleship-page .ship-btn.selected {
  border-color: #4fc3f7;
  background: rgba(79, 195, 247, 0.2);
  box-shadow: 0 0 10px rgba(79, 195, 247, 0.3);
}

.battleship-page .ship-btn.placed {
  opacity: 0.5;
}

.battleship-page .ship-btn.placed.selected {
  opacity: 1;
}

.battleship-page .ship-color {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.battleship-page .setup-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.battleship-page .play-button.small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.battleship-page .start-battle-btn {
  margin-top: 1rem;
  font-size: 1.2rem;
  padding: 0.8rem 2rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(79, 195, 247, 0.3); }
  50% { box-shadow: 0 0 25px rgba(79, 195, 247, 0.6); }
}

/* Grid Styles */
.battleship-page .setup-grid-container,
.battleship-page .battle-grid-container {
  text-align: center;
}

.battleship-page .setup-grid-container h3,
.battleship-page .battle-grid-container h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #4fc3f7;
}

.battleship-page .battleship-grid {
  display: inline-block;
  background: rgba(0, 40, 80, 0.6);
  border: 2px solid rgba(79, 195, 247, 0.3);
  border-radius: 8px;
  padding: 2px;
}

.battleship-page .grid-labels-top {
  display: grid;
  grid-template-columns: 25px repeat(10, 35px);
  gap: 1px;
}

.battleship-page .grid-labels-top span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: bold;
}

.battleship-page .grid-row {
  display: grid;
  grid-template-columns: 25px repeat(10, 35px);
  gap: 1px;
}

.battleship-page .row-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: bold;
}

.battleship-page .grid-cell {
  width: 35px;
  height: 35px;
  background: rgba(0, 60, 120, 0.4);
  border: 1px solid rgba(79, 195, 247, 0.15);
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.15s;
  user-select: none;
}

.battleship-page .grid-cell:hover {
  background: rgba(79, 195, 247, 0.2);
  border-color: rgba(79, 195, 247, 0.4);
}

.battleship-page .grid-cell.ship-placed {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
}

.battleship-page .grid-cell.hit {
  background: rgba(231, 76, 60, 0.6) !important;
  border-color: #e74c3c;
  animation: hit-flash 0.3s ease-out;
}

@keyframes hit-flash {
  0% { transform: scale(1.3); background: rgba(255, 150, 50, 0.9); }
  100% { transform: scale(1); }
}

.battleship-page .grid-cell.miss {
  background: rgba(200, 220, 240, 0.15) !important;
  border-color: rgba(200, 220, 240, 0.3);
  color: rgba(200, 220, 240, 0.5);
  font-size: 1.2rem;
}

.battleship-page .grid-cell.sunk {
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
  opacity: 0.8;
  font-weight: bold;
  color: #fff;
}

/* Battle Phase */
.battleship-page .battleship-battle {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Specificity override so hidden state wins */
.battleship-page .battleship-battle.hidden {
  display: none;
}

.battleship-page .battle-grids {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.battleship-page .sunk-tracker {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  justify-content: center;
  min-height: 28px;
}

.battleship-page .sunk-label {
  font-size: 0.75rem;
  opacity: 0.6;
}

.battleship-page .sunk-ship-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid;
  border-radius: 10px;
  text-transform: capitalize;
  background: rgba(255, 255, 255, 0.05);
}

/* Enemy grid cursor */
.battleship-page .enemy-grid .grid-cell:not(.hit):not(.miss) {
  cursor: crosshair;
}

.battleship-page .enemy-grid .grid-cell.hit,
.battleship-page .enemy-grid .grid-cell.miss {
  cursor: default;
}

/* Player battle grid — no clicking */
.battleship-page .player-grid .grid-cell {
  cursor: default;
}

/* Game Over Overlay */
.battleship-page .game-over-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 10, 30, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 2rem;
}

.battleship-page .game-over-overlay.hidden {
  display: none;
}

.battleship-page .game-over-content {
  background: linear-gradient(135deg, #0a1628, #1a2940);
  border: 2px solid rgba(79, 195, 247, 0.3);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 0 40px rgba(79, 195, 247, 0.15);
}

.battleship-page .game-over-content h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.battleship-page .final-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.battleship-page .final-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  min-width: 80px;
}

.battleship-page .final-stat .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  opacity: 0.6;
}

.battleship-page .final-stat .stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: #4fc3f7;
}

.battleship-page .result-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.battleship-page .leaderboard-msg {
  padding: 0.5rem;
  font-size: 0.9rem;
  color: #f1c40f;
}

.battleship-page .battleship-leaderboard {
  margin: 1rem 0;
}

/* Celebration particles */
.celebration-particle {
  position: fixed;
  top: -40px;
  z-index: 10001;
  pointer-events: none;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* Home page icon */
.battleship-icon {
  background: linear-gradient(135deg, #0a3d6b, #1a6fa8);
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive */
@media (max-width: 900px) {
  .battleship-page .battle-grids {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .battleship-page .grid-labels-top {
    grid-template-columns: 20px repeat(10, 28px);
  }

  .battleship-page .grid-row {
    grid-template-columns: 20px repeat(10, 28px);
  }

  .battleship-page .grid-cell {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  .battleship-page .grid-labels-top span,
  .battleship-page .row-label {
    font-size: 0.55rem;
  }

  .battleship-page .ship-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }

  .battleship-page .battleship-header h1 {
    font-size: 1.5rem;
  }

  .battleship-page .game-over-content {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 360px) {
  .battleship-page .grid-labels-top {
    grid-template-columns: 18px repeat(10, 24px);
  }

  .battleship-page .grid-row {
    grid-template-columns: 18px repeat(10, 24px);
  }

  .battleship-page .grid-cell {
    width: 24px;
    height: 24px;
    font-size: 0.6rem;
  }
}


/* =========================================
   DARTS
   ========================================= */

.darts-page .darts-header {
  text-align: center;
  margin-bottom: 1rem;
}

.darts-page .darts-header h1 {
  font-size: 2rem;
  margin: 0;
}

.darts-page .darts-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.darts-page .darts-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.darts-page .darts-stat .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #aaa;
}

.darts-page .darts-stat .stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
}

.darts-page .darts-board-area {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  position: relative;
}

.darts-page .darts-canvas {
  cursor: crosshair;
  border-radius: 50%;
  background: #111;
  max-width: 100%;
  height: auto;
}

.darts-page .darts-round-score {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffd700;
  padding: 0.5rem;
  animation: darts-flash 0.5s ease;
}

.darts-page .darts-round-score.hidden {
  display: none;
}

@keyframes darts-flash {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.darts-page .darts-throws {
  text-align: center;
  margin: 0.5rem 0;
}

.darts-page .darts-throw-slots {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.darts-page .throw-slot {
  background: #1a1a2e;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  min-width: 80px;
  font-size: 1rem;
  font-weight: bold;
  color: #888;
  transition: all 0.3s;
}

.darts-page .throw-slot.filled {
  color: #fff;
  border-color: #555;
}

.darts-page .throw-slot.bullseye-throw {
  color: #ffd700;
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
}

.darts-page .throw-slot.triple-throw {
  color: #ff4444;
  border-color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
}

.darts-page .throw-slot.double-throw {
  color: #44ff44;
  border-color: #44ff44;
  background: rgba(68, 255, 68, 0.1);
}

.darts-page .darts-scoreboard {
  max-width: 300px;
  margin: 1rem auto;
  background: #1a1a2e;
  border-radius: 10px;
  padding: 0.75rem;
  min-height: 30px;
}

.darts-page .darts-sb-header {
  text-align: center;
  font-weight: bold;
  color: #aaa;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.darts-page .darts-sb-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0.5rem;
  color: #ccc;
  font-size: 0.9rem;
}

.darts-page .darts-sb-total {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0.5rem;
  color: #ffd700;
  font-weight: bold;
  font-size: 1rem;
  border-top: 1px solid #333;
  margin-top: 0.25rem;
}

.darts-page .game-over-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.darts-page .game-over-overlay.hidden {
  display: none;
}

.darts-page .game-over-content {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.darts-page .game-over-content h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 480px) {
  .darts-page .darts-canvas {
    width: 300px;
    height: 300px;
  }

  .darts-page .throw-slot {
    min-width: 60px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }

  .darts-page .darts-stats {
    gap: 1rem;
  }

  .darts-page .darts-header h1 {
    font-size: 1.5rem;
  }
}

/* === PIPE CONNECT === */
.pipe-connect-page {
  min-height: 100vh;
  padding: 1rem;
}

.pipe-connect-page .game-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.pipe-connect-page .game-header h1 {
  margin: 0;
  font-size: 1.6rem;
}

.pipe-connect-page .game-stats-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.pipe-connect-page .stat-item {
  text-align: center;
}

.pipe-connect-page .stat-label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pipe-connect-page .stat-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fbbf24;
}

.pipe-grid-container {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.pipe-grid {
  display: grid;
  gap: 2px;
  width: min(90vw, 400px);
  aspect-ratio: 1;
  background: #1e293b;
  border-radius: 12px;
  padding: 6px;
  border: 2px solid #334155;
}

.pipe-cell {
  background: #0f172a;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
  position: relative;
  aspect-ratio: 1;
}

.pipe-cell:hover {
  background: #1e293b;
}

.pipe-cell:active {
  transform: scale(0.92);
}

.pipe-cell.pipe-rotating {
  animation: pipeRotate 0.2s ease;
}

@keyframes pipeRotate {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(45deg) scale(1.05); }
  100% { transform: rotate(90deg); }
}

.pipe-cell.pipe-source {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.pipe-cell.pipe-drain {
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.pipe-cell.pipe-flooded {
  animation: pipeFlood 0.6s ease;
  background: rgba(74, 222, 128, 0.15);
}

@keyframes pipeFlood {
  0% { background: rgba(74, 222, 128, 0); }
  50% { background: rgba(74, 222, 128, 0.3); }
  100% { background: rgba(74, 222, 128, 0.15); }
}

.pipe-svg {
  width: 100%;
  height: 100%;
}

.pipe-hint-bar {
  text-align: center;
  padding: 0.5rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Overlay */
.pipe-connect-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.pipe-connect-overlay.hidden {
  display: none;
}

.pipe-connect-overlay .overlay-content {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.pipe-connect-overlay .overlay-content h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.pipe-connect-overlay .overlay-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pipe-connect-overlay .leaderboard-section {
  margin-top: 1.5rem;
  text-align: left;
}

.pipe-connect-overlay .leaderboard-list {
  list-style: none;
  padding: 0;
}

.pipe-connect-overlay .leaderboard-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid #334155;
}

/* Game card icon */
.pipe-connect-icon {
  font-size: 2.5rem;
}

.pc-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  width: 60px;
  height: 60px;
  margin: 0 auto;
  position: relative;
}

.pc-pipe {
  background: #94a3b8;
  border-radius: 2px;
}

.pc-pipe.pc-h {
  height: 6px;
  width: 100%;
  margin: auto 0;
}

.pc-pipe.pc-elbow {
  width: 6px;
  height: 100%;
  margin: 0 auto;
  border-radius: 0 0 6px 0;
}

.pc-pipe.pc-v {
  width: 6px;
  height: 100%;
  margin: 0 auto;
}

.pc-drop {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 16px;
}

@media (max-width: 480px) {
  .pipe-grid {
    width: min(95vw, 350px);
  }
  .pipe-connect-page .game-stats-bar {
    gap: 1rem;
  }
  .pipe-connect-page .stat-value {
    font-size: 1.1rem;
  }
}

/* ═══════════════════════════════════════════════════════
   NINJA SLICE
   ═══════════════════════════════════════════════════════ */

.ninja-slice-page .ninja-slice-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.ninja-slice-page .ninja-slice-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.ninja-slice-page .ninja-slice-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ninja-slice-page .ninja-slice-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.ninja-slice-page .ninja-slice-stat .stat-label {
  font-size: 0.75rem;
  opacity: 0.7;
  text-transform: uppercase;
}

.ninja-slice-page .ninja-slice-stat .stat-value {
  font-size: 1.3rem;
  font-weight: bold;
}

.ninja-slice-page .ninja-combo-banner {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff6b35, #f72585);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: bold;
  z-index: 100;
  animation: comboPulse 0.3s ease-out;
  box-shadow: 0 4px 15px rgba(247, 37, 133, 0.4);
}

.ninja-slice-page .ninja-combo-banner.hidden {
  display: none;
}

@keyframes comboPulse {
  0% { transform: translateX(-50%) scale(0.5); opacity: 0; }
  60% { transform: translateX(-50%) scale(1.2); }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.ninja-slice-page .ninja-slice-arena {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0;
}

.ninja-slice-page .ninja-canvas {
  border-radius: 12px;
  cursor: crosshair;
  touch-action: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 100%;
}

.ninja-slice-page .ninja-slice-game-over {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  overflow-y: auto;
}

.ninja-slice-page .ninja-slice-game-over.hidden {
  display: none;
}

.ninja-slice-page .ninja-slice-game-over .game-over-content {
  background: var(--card-bg, #2a2a3e);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.ninja-slice-icon {
  display: flex;
  gap: 0.2rem;
  font-size: 1.8rem;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .ninja-slice-page .ninja-slice-stats {
    gap: 1rem;
  }
  .ninja-slice-page .ninja-slice-stat .stat-value {
    font-size: 1.1rem;
  }
}

/* === Generic leaderboard & personal best messages === */
.leaderboard-msg {
  color: #fbbf24;
  font-weight: bold;
  font-size: 1.1rem;
  margin: 8px 0;
  animation: leaderboard-pulse 1s ease-in-out 3;
}
.leaderboard-msg.hidden { display: none; }

.personal-best-msg {
  color: #4ade80;
  font-weight: bold;
  font-size: 1.1rem;
  margin: 6px 0;
  animation: personal-best-glow 1.5s ease-in-out 2;
}
.personal-best-msg.hidden { display: none; }

@keyframes leaderboard-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}
@keyframes personal-best-glow {
  0%, 100% { text-shadow: 0 0 5px rgba(74, 222, 128, 0.3); }
  50% { text-shadow: 0 0 15px rgba(74, 222, 128, 0.8); }
}

/* ================ RHYTHM TAP ================ */
.rhythm-tap-page {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
}

.rhythm-tap-header {
  text-align: center;
  margin-bottom: 10px;
}

.rhythm-tap-header h1 {
  color: #fff;
  margin: 0;
  font-size: 1.5rem;
}

.rhythm-tap-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.rhythm-tap-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rhythm-tap-stat .stat-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.rhythm-tap-stat .stat-value {
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
}

.rhythm-judgment {
  text-align: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: #ffdd44;
  text-shadow: 0 0 20px rgba(255, 221, 68, 0.5);
  min-height: 2.2em;
  transition: opacity 0.2s;
  pointer-events: none;
}

.rhythm-judgment.hidden {
  opacity: 0;
}

.rhythm-tap-arena {
  display: flex;
  justify-content: center;
  touch-action: none;
}

.rhythm-canvas {
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.15);
  cursor: pointer;
}

.rhythm-key-hints {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 4px;
}

.key-hint {
  width: 92px;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.9rem;
  font-weight: bold;
  font-family: monospace;
  padding: 4px 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  margin: 0 1px;
  transition: all 0.1s;
}

.key-hint.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

/* Game Over Overlay */
.rhythm-tap-page .rhythm-tap-game-over {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.rhythm-tap-page .rhythm-tap-game-over.hidden {
  display: none;
}

.rhythm-tap-page .rhythm-tap-game-over .game-over-content {
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.rhythm-tap-icon {
  font-size: 1.8rem;
  display: flex;
  gap: 4px;
  justify-content: center;
}

@media (max-width: 480px) {
  .rhythm-tap-stats {
    gap: 8px;
  }
  .rhythm-tap-stat .stat-value {
    font-size: 0.9rem;
  }
  .key-hint {
    width: 70px;
    font-size: 0.75rem;
  }
  .rhythm-judgment {
    font-size: 1.4rem;
  }
}

/* ─── Reaction Rush ─── */
.reaction-rush-icon {
  font-size: 1.8rem;
  display: flex;
  gap: 4px;
  justify-content: center;
}

.rr-header {
  text-align: center;
  margin-bottom: 12px;
}

.rr-header h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.rr-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.rr-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rr-stat .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.7;
}

.rr-stat .stat-value {
  font-size: 1.2rem;
  font-weight: bold;
}

.rr-game-area {
  width: 100%;
  max-width: 500px;
  height: 320px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.15s ease;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
}

.rr-game-area.rr-waiting {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
}

.rr-game-area.rr-go {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.rr-game-area.rr-toosoon {
  background: linear-gradient(135deg, #e67e22, #f39c12);
}

.rr-game-area.rr-result.rr-lightning {
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
}

.rr-game-area.rr-result.rr-blazing {
  background: linear-gradient(135deg, #d35400, #e67e22);
}

.rr-game-area.rr-result.rr-good {
  background: linear-gradient(135deg, #2980b9, #3498db);
}

.rr-game-area.rr-result.rr-slow {
  background: linear-gradient(135deg, #7f8c8d, #95a5a6);
}

.rr-game-area.rr-result.rr-sleepy {
  background: linear-gradient(135deg, #2c3e50, #34495e);
}

.rr-game-area.rr-result.rr-correct-avoid {
  background: linear-gradient(135deg, #16a085, #1abc9c);
}

.rr-game-area.rr-color-red {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
}

.rr-game-area.rr-color-blue {
  background: linear-gradient(135deg, #2980b9, #3498db);
}

.rr-game-area.rr-color-green {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.rr-game-area.rr-color-yellow {
  background: linear-gradient(135deg, #f39c12, #f1c40f);
}

.rr-game-area.rr-color-purple {
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
}

.rr-prompt {
  text-align: center;
  color: white;
}

.rr-big-text {
  font-size: 2.5rem;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 8px;
}

.rr-sub-text {
  font-size: 1.1rem;
  opacity: 0.9;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.rr-results {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  min-height: 40px;
}

.rr-result-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  animation: rr-pop-in 0.3s ease;
}

@keyframes rr-pop-in {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.rr-dot-emoji {
  font-size: 1.2rem;
}

.rr-dot-time {
  font-size: 0.7rem;
  opacity: 0.7;
}

.rr-dot-lightning { border-color: #9b59b6; background: rgba(155, 89, 182, 0.15); }
.rr-dot-blazing { border-color: #e67e22; background: rgba(230, 126, 34, 0.15); }
.rr-dot-good { border-color: #3498db; background: rgba(52, 152, 219, 0.15); }
.rr-dot-slow { border-color: #95a5a6; background: rgba(149, 165, 166, 0.15); }
.rr-dot-sleepy { border-color: #7f8c8d; background: rgba(127, 140, 141, 0.15); }
.rr-dot-penalty { border-color: #e74c3c; background: rgba(231, 76, 60, 0.15); }

/* Game over overlay */
.reaction-rush-page .game-over-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.reaction-rush-page .game-over-overlay.hidden {
  display: none;
}

.reaction-rush-page .game-over-overlay .game-over-content {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  max-width: 420px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.rr-round-breakdown {
  margin: 16px 0;
  text-align: left;
}

.rr-round-breakdown h3 {
  font-size: 0.9rem;
  margin-bottom: 8px;
  opacity: 0.7;
}

.rr-breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 0.85rem;
}

.rr-br-lightning { background: rgba(155, 89, 182, 0.15); }
.rr-br-blazing { background: rgba(230, 126, 34, 0.15); }
.rr-br-good { background: rgba(52, 152, 219, 0.15); }
.rr-br-slow { background: rgba(149, 165, 166, 0.15); }
.rr-br-sleepy { background: rgba(127, 140, 141, 0.1); }
.rr-br-penalty { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }

@media (max-width: 480px) {
  .rr-game-area {
    height: 260px;
    border-radius: 16px;
  }
  .rr-big-text {
    font-size: 2rem;
  }
  .rr-stats {
    gap: 12px;
  }
}

/* ===== ICE CREAM STACK ===== */
.ice-cream-stack-page {
  background: linear-gradient(135deg, #87CEEB 0%, #E0F4FF 100%);
  min-height: 100vh;
}

.ice-cream-header h1 {
  text-align: center;
  font-size: 1.8rem;
  color: #D4A46A;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 8px;
}

.ice-cream-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ice-cream-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.7);
  padding: 8px 16px;
  border-radius: 12px;
  min-width: 60px;
}

.ice-cream-stat .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #888;
  letter-spacing: 1px;
}

.ice-cream-stat .stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
}

.ice-cream-arena {
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.ice-cream-canvas {
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  max-width: 100%;
  touch-action: manipulation;
}

.ice-cream-hint {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-top: 8px;
  animation: ics-pulse 2s ease-in-out infinite;
}

.ice-cream-key-hint {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(212, 164, 106, 0.35);
  color: #8a5d2d;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

@keyframes ics-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.ice-cream-perfect-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
  padding: 12px 28px;
  border-radius: 20px;
  font-size: 1.5rem;
  font-weight: bold;
  z-index: 100;
  animation: ics-banner 0.3s ease-out;
  pointer-events: none;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.ice-cream-perfect-banner.hidden { display: none; }

@keyframes ics-banner {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.ice-cream-game-over {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.ice-cream-stack-page .ice-cream-game-over.hidden { display: none; }

.ice-cream-game-over .game-over-content {
  background: white;
  border-radius: 20px;
  padding: 30px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
}

.ice-cream-game-over h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: #D4A46A;
}

.ice-cream-stack-icon {
  background: linear-gradient(135deg, #FFB5C5, #B5E8FF);
}

@media (max-width: 480px) {
  .ice-cream-stats { gap: 10px; }
  .ice-cream-stat { padding: 6px 10px; min-width: 50px; }
  .ice-cream-stat .stat-value { font-size: 1.1rem; }
  .ice-cream-header h1 { font-size: 1.4rem; }
}

/* === Rock Paper Scissors === */
.rps-icon { display: flex; gap: 2px; font-size: 1.3rem; }

.rps-header { text-align: center; margin-bottom: 12px; }
.rps-header h1 { font-size: 1.6rem; margin: 0; }

.rps-scoreboard {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 10px 0; font-size: 1.1rem;
}
.rps-player-score { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rps-name { font-size: 0.85rem; color: #94a3b8; font-weight: 500; }
.rps-score { font-size: 2rem; font-weight: 800; color: #fbbf24; }
.rps-vs { font-size: 0.9rem; color: #64748b; font-weight: 700; letter-spacing: 2px; }
.rps-round-info { font-size: 0.9rem; color: #94a3b8; margin-top: 4px; }

.rps-arena {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin: 16px 0; padding: 20px; min-height: 120px;
  background: rgba(255,255,255,0.03); border-radius: 16px;
}
.rps-hand { display: flex; flex-direction: column; align-items: center; }
.rps-emoji { font-size: 3.5rem; transition: transform 0.3s ease; }
.rps-hand-player .rps-emoji { transform: scaleX(-1); }
.rps-countdown {
  font-size: 1.2rem; font-weight: 700; color: #fbbf24; min-width: 120px; text-align: center;
}
.rps-countdown-active { animation: rps-pulse 0.5s ease-in-out infinite; }
@keyframes rps-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.rps-bounce .rps-emoji {
  animation: rps-bounce-anim 0.5s ease-in-out infinite;
}
@keyframes rps-bounce-anim {
  0%, 100% { transform: translateY(0) scaleX(-1); }
  50% { transform: translateY(-12px) scaleX(-1); }
}
.rps-hand-cpu .rps-bounce .rps-emoji,
.rps-hand-cpu.rps-bounce .rps-emoji {
  animation: rps-bounce-cpu 0.5s ease-in-out infinite;
}
@keyframes rps-bounce-cpu {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.rps-reveal .rps-emoji {
  animation: rps-pop 0.3s ease-out;
}
@keyframes rps-pop {
  0% { transform: scale(0.5); opacity: 0.5; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.rps-result {
  text-align: center; padding: 8px 16px; border-radius: 12px;
  font-size: 1.1rem; font-weight: 700; margin: 8px auto; max-width: 280px;
  animation: rps-slide-in 0.3s ease-out;
}
@keyframes rps-slide-in {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.rps-result-win { background: rgba(34,197,94,0.15); color: #22c55e; }
.rps-result-loss { background: rgba(239,68,68,0.15); color: #ef4444; }
.rps-result-draw { background: rgba(251,191,36,0.15); color: #fbbf24; }

.rps-timer-container {
  height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px;
  margin: 8px auto; max-width: 300px; overflow: hidden;
}
.rps-timer-bar {
  height: 100%; background: linear-gradient(90deg, #22c55e, #fbbf24);
  border-radius: 3px; transition: width 0.03s linear;
}
.rps-timer-danger { background: linear-gradient(90deg, #ef4444, #f97316) !important; }

.rps-round-actions {
  display: flex;
  justify-content: center;
  margin: 8px 0 6px;
}

.rps-secondary-btn {
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.rps-secondary-btn:hover:not(:disabled) {
  background: rgba(251,191,36,0.16);
  transform: translateY(-1px);
}

.rps-secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rps-moves {
  display: flex; justify-content: center; gap: 12px; margin: 16px 0;
}
.rps-move-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 20px; border-radius: 16px; border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); cursor: pointer; transition: all 0.2s;
}
.rps-move-btn:hover, .rps-move-btn:active {
  background: rgba(251,191,36,0.15); border-color: #fbbf24;
  transform: translateY(-2px);
}
.rps-move-emoji { font-size: 2.2rem; }
.rps-move-label { font-size: 0.8rem; color: #94a3b8; font-weight: 600; }
.rps-key-hint {
  font-size: 0.68rem;
  color: #fcd34d;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.rps-move-btn.rps-move-btn-keypress {
  transform: translateY(-2px) scale(1.03);
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251,191,36,0.25);
  background: rgba(251,191,36,0.18);
}
.rps-controls-hint {
  text-align: center;
  color: #94a3b8;
  font-size: 0.82rem;
  margin: 10px 0 6px;
}

.rps-history {
  display: flex; justify-content: center; gap: 6px; margin: 8px 0; flex-wrap: wrap;
}
.rps-history-dot {
  width: 28px; height: 28px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700;
}
.rps-dot-win { background: rgba(34,197,94,0.2); color: #22c55e; }
.rps-dot-loss { background: rgba(239,68,68,0.2); color: #ef4444; }
.rps-dot-draw { background: rgba(251,191,36,0.2); color: #fbbf24; }

.rps-page .game-over-overlay { display: none; }
.rps-page .game-over-overlay.hidden { display: none !important; }

.rps-recap-row {
  display: flex; justify-content: space-between; padding: 4px 12px;
  border-radius: 8px; margin: 3px 0; font-size: 0.9rem;
}
.rps-recap-row.win { background: rgba(34,197,94,0.1); }
.rps-recap-row.loss { background: rgba(239,68,68,0.1); }
.rps-recap-row.draw { background: rgba(251,191,36,0.1); }

.rps-round-recap { max-width: 280px; margin: 12px auto; }

@media (max-width: 480px) {
  .rps-emoji { font-size: 2.8rem; }
  .rps-move-btn { padding: 12px 16px; }
  .rps-move-emoji { font-size: 1.8rem; }
  .rps-arena { gap: 12px; padding: 12px; }
}

/* ===== CHECKERS ===== */
.checkers-page .game-container { max-width: 540px; }
.checkers-board-wrapper {
  display: flex; justify-content: center; align-items: center;
  margin: 16px auto; background: #3E2723; border-radius: 8px;
  padding: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.checkers-board-wrapper canvas { border-radius: 4px; cursor: pointer; max-width: 100%; }

.game-status-bar {
  text-align: center; font-size: 1rem; font-weight: 600;
  color: #64748b; padding: 8px; min-height: 2em;
}

.checkers-icon { background: linear-gradient(135deg, #6B8E4E, #3E2723); }

.checkers-page .game-over-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85); display: flex; align-items: center;
  justify-content: center; z-index: 1000; backdrop-filter: blur(4px);
}
.checkers-page .game-over-overlay.hidden { display: none !important; }

@media (max-width: 480px) {
  .checkers-board-wrapper { padding: 4px; }
}
