/*
 * 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;
  justify-content: center;
  align-items: center;
}

/* 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: 500px;
}

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;
}

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

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

.cell {
  width: 100px;
  height: 100px;
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 0.5rem;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.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: center;
  overflow: hidden;
}

.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) {
  #poolTable {
    width: 100%;
    height: auto;
    max-width: 600px;
  }

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

  .power-meter {
    right: -30px;
  }
}

/* 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: 400px;
}

.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;
}

/* 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: 400px;
}

.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 */
.tetris-cyan {
  background: linear-gradient(135deg, #00f5ff 0%, #00bcd4 100%);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.3);
}

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

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

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

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

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

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

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

.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;
}

.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;
}

.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: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1rem 2rem;
  border-radius: 10px;
  text-align: center;
  z-index: 100;
  animation: popIn 0.3s ease;
}

.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: 2rem;
  font-weight: bold;
}

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

.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%;
}

.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;
  }
}

@media (max-width: 600px) {
  #breakoutCanvas {
    width: 100%;
    max-width: 350px;
    height: auto;
    aspect-ratio: 3/2;
  }

  .breakout-controls {
    padding: 0.75rem;
  }

  .breakout-controls .control-item {
    font-size: 0.75rem;
  }
}

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

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

/* Desktop-only: shown on desktop, hidden on touch devices */
.desktop-only {
  display: flex;
}

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

  .desktop-only {
    display: none;
  }
}

/* ==================== 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%);
}

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

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