/* game.css */
/* ============ GAME SENTUH ANGKA STYLES (BRIGHT COLOR THEME) ============ */
:root {
  --primary: #ff6b6b;
  --secondary: #4ecdc4;
  --accent: #ffd166;
  --peach: #ff9a8b;
  --mint: #95e1d3;
  --light-bg: #f9f7f7;
  --text-dark: #2c3e50;
  --text-light: #ffffff;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--light-bg);
  color: var(--text-dark);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path fill="%23FFD166" opacity="0.15" d="M50,10 C65,10 77,22 77,37 C77,52 65,64 50,64 C35,64 23,52 23,37 C23,22 35,10 50,10 Z"/><path fill="%234ECDC4" opacity="0.15" d="M50,70 C65,70 77,82 77,97 C77,112 65,124 50,124 C35,124 23,112 23,97 C23,82 35,70 50,70 Z"/>');
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
  width: 100%;
}

header {
  text-align: center;
  padding: 25px 0;
  background: linear-gradient(135deg, var(--primary), var(--peach));
  color: var(--text-light);
  border-radius: 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: var(--accent);
}

.header-content {
  position: relative;
  z-index: 1;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.95;
}

.arabic-decoration {
  font-family: "Traditional Arabic", "Scheherazade", serif;
  font-size: 2rem;
  color: var(--accent);
  margin: 15px 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.islamic-pattern {
  height: 50px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><path fill="%23FF6B6B" opacity="0.2" d="M30,10 C40,10 47,17 47,27 C47,37 40,44 30,44 C20,44 13,37 13,27 C13,17 20,10 30,10 Z"/><path fill="%234ECDC4" opacity="0.2" d="M30,50 C40,50 47,57 47,67 C47,77 40,84 30,84 C20,84 13,77 13,67 C13,57 20,50 30,50 Z"/>');
  margin: 25px 0;
  opacity: 0.7;
}

.game-main-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow);
  border: 2px solid var(--mint);
  margin-bottom: 30px;
}

.back-button-container {
  margin-bottom: 25px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(255, 107, 107, 0.2);
  border: 2px solid var(--peach);
}

.back-btn:hover {
  background: var(--peach);
  transform: translateX(-5px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.back-btn:active {
  transform: translateX(-2px);
}

.back-btn i {
  font-size: 1.1rem;
}

.section-title {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 25px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title i {
  color: var(--accent);
}

.game-instructions {
  background: linear-gradient(135deg, #fff9f9, #fff0f0);
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 25px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  border-left: 5px solid var(--accent);
}

.game-instructions p {
  margin: 10px 0;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 500;
}

.game-instructions i {
  color: var(--accent);
  font-size: 1.2rem;
  min-width: 24px;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px 0;
  padding: 25px;
  background: linear-gradient(135deg, #f0f9f8, #e6f4f2);
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 2px solid var(--mint);
}

.number-btn,
.number-image-btn {
  aspect-ratio: 1;
  border: none;
  border-radius: 25px;
  color: white;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 12px rgba(255, 107, 107, 0.15);
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.number-image-btn {
  background: white;
  border: 3px solid var(--primary);
}

.number-btn:hover,
.number-image-btn:hover {
  transform: translateY(-8px) scale(1.08);
  box-shadow: 0 12px 20px rgba(255, 107, 107, 0.25);
}

.number-btn:active,
.number-image-btn:active {
  transform: translateY(-4px) scale(1.04);
}

.number-btn.active,
.number-image-btn.active {
  background: linear-gradient(135deg, var(--accent), #ffe082);
  animation: number-pulse 0.5s ease-out;
  border-color: var(--accent);
}

.number-image-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
  transition: transform 0.3s ease;
}

.number-image-btn:hover img {
  transform: scale(1.1);
}

.number-image-btn .number-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 22px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.number-image-btn:hover .number-overlay {
  opacity: 1;
}

.number-image-btn.active .number-overlay {
  opacity: 1;
  background: rgba(255, 215, 0, 0.4);
  animation: number-pulse 0.5s ease-out;
}

@keyframes number-pulse {
  0% {
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.15);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 209, 102, 0.6);
  }
  100% {
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.15);
  }
}

.audio-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 30px 0;
  padding: 25px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  border: 2px solid var(--mint);
}

.btn {
  padding: 18px 30px;
  border: none;
  border-radius: 15px;
  background: var(--primary);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 8px rgba(255, 107, 107, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 600;
  width: 100%;
}

.btn:hover {
  background: var(--peach);
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(255, 107, 107, 0.3);
}

.btn:active {
  transform: translateY(-2px);
}

.audio-btn {
  background: linear-gradient(135deg, var(--secondary), #6ce5de);
  font-size: 1.1rem;
  padding: 16px 24px;
}

.audio-btn:hover {
  background: linear-gradient(135deg, #3dbdb4, var(--secondary));
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 15px;
  padding: 15px;
  background: #f0f9f8;
  border-radius: 15px;
  border: 1px solid var(--mint);
}

.volume-control i {
  color: var(--primary);
  font-size: 1.5rem;
  min-width: 24px;
}

#volume-slider {
  flex: 1;
  height: 10px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, var(--primary) 0%, var(--accent) var(--volume, 70%), #e0e0e0 var(--volume, 70%));
  border-radius: 5px;
  outline: none;
  cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  border: 3px solid white;
  transition: all 0.2s ease;
}

#volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#volume-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  border: 3px solid white;
}

.current-number-display {
  text-align: center;
  padding: 30px;
  background: linear-gradient(135deg, var(--primary), var(--peach));
  border-radius: 20px;
  color: white;
  margin: 30px 0;
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.2);
  border: 3px solid var(--accent);
  position: relative;
  overflow: hidden;
}

.current-number-display::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
}

.number-display {
  font-size: 5rem;
  font-weight: bold;
  margin: 15px 0;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
  animation: number-pop 0.4s ease-out;
  position: relative;
  z-index: 1;
}

@keyframes number-pop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.number-name {
  font-size: 2rem;
  opacity: 0.95;
  font-style: italic;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.game-tips {
  background: rgba(255, 209, 102, 0.15);
  padding: 25px;
  border-radius: 18px;
  margin-top: 30px;
  border: 2px dashed var(--accent);
}

.game-tips p {
  margin: 8px 0;
  color: var(--primary);
  font-size: 1rem;
  line-height: 1.5;
}

.game-tips p:first-child {
  margin-bottom: 15px;
}

.game-tips strong {
  color: var(--accent);
  font-size: 1.1rem;
}

.game-tips i {
  color: var(--accent);
  margin-right: 10px;
  min-width: 20px;
}

footer {
  text-align: center;
  padding: 20px;
  background: var(--primary);
  color: white;
  border-radius: 15px;
  margin-top: 30px;
  box-shadow: var(--shadow);
}

footer p {
  margin: 5px 0;
}

footer i {
  color: var(--accent);
}

/* ============ STYLE UNTUK FITUR GAME BARU ============ */

.game-modes {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 2px solid var(--mint);
}

.mode-selector {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.mode-btn {
  padding: 15px 25px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f9f9f9, #f0f0f0);
  color: var(--text-dark);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.mode-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mode-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--peach));
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  background: white;
  padding: 20px;
  border-radius: 15px;
  margin: 25px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 2px solid var(--accent);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0f9f8, #e6f4f2);
}

.stat-item i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.stat-item span {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
}

.quiz-container {
  background: white;
  padding: 25px;
  border-radius: 15px;
  margin: 25px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 2px solid var(--primary);
  display: none;
}

.quiz-question {
  text-align: center;
  color: var(--primary);
  margin-bottom: 25px;
  font-size: 1.4rem;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.quiz-option {
  padding: 20px;
  background: linear-gradient(135deg, #f0f9f8, #e6f4f2);
  border: 2px solid var(--mint);
  border-radius: 12px;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}

.quiz-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.quiz-option .option-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.quiz-option:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #e6f4f2, #d4efeb);
}

.quiz-option.correct {
  background: linear-gradient(135deg, var(--secondary), #6ce5de);
  color: white;
  animation: correct-pulse 0.5s ease;
}

.quiz-option.wrong {
  background: linear-gradient(135deg, #ff8a80, #ff5252);
  color: white;
  animation: wrong-shake 0.5s ease;
}

.quiz-feedback {
  text-align: center;
  padding: 15px;
  border-radius: 10px;
  margin-top: 15px;
  font-weight: bold;
  font-size: 1.2rem;
  display: none;
}

.race-track {
  position: relative;
  height: 100px;
  background: linear-gradient(135deg, #ffe0b2, #ffcc80);
  border-radius: 15px;
  margin: 25px 0;
  overflow: hidden;
  display: none;
  border: 3px solid var(--accent);
}

.player-car {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: var(--primary);
  transition: left 0.3s ease;
}

.finish-line {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: var(--accent);
}

.race-progress {
  position: absolute;
  bottom: 10px;
  left: 20px;
  right: 20px;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #ffb74d);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.start-btn {
  background: linear-gradient(135deg, var(--secondary), #6ce5de);
  margin: 20px 0;
}

.start-btn:hover {
  background: linear-gradient(135deg, #3dbdb4, var(--secondary));
}

.hint-btn {
  background: linear-gradient(135deg, #9575cd, #b39ddb);
  margin-bottom: 20px;
}

.hint-btn:hover {
  background: linear-gradient(135deg, #7e57c2, #9575cd);
}

.achievements {
  background: white;
  padding: 25px;
  border-radius: 15px;
  margin: 25px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 2px solid var(--accent);
}

.achievements h3 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.badges {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f9f9f9, #f0f0f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
  border: 2px solid var(--accent);
  cursor: pointer;
}

.badge.locked {
  opacity: 0.5;
}

.badge.unlocked {
  background: linear-gradient(135deg, var(--accent), #ffe082);
  box-shadow: 0 4px 12px rgba(255, 209, 102, 0.4);
}

.badge.unlocked:hover {
  transform: scale(1.1) rotate(10deg);
}

@keyframes correct-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes wrong-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

@keyframes celebration {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* ============ RESPONSIVE DESIGN GAME ============ */

/* Tablet Landscape (768px - 1023px) */
@media (max-width: 1023px) {
  .container {
    padding: 15px;
    max-width: 90%;
  }

  .game-main-content {
    padding: 25px;
  }

  .number-grid {
    gap: 18px;
    padding: 20px;
  }

  .number-btn,
  .number-image-btn {
    font-size: 2.8rem;
    border-radius: 22px;
  }

  .number-image-btn .number-overlay {
    font-size: 2.8rem;
  }

  .number-display {
    font-size: 4.5rem;
  }

  .number-name {
    font-size: 1.8rem;
  }

  .game-stats {
    grid-template-columns: repeat(3, 1fr);
    padding: 15px;
  }

  .quiz-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .quiz-option .option-number {
    font-size: 2.2rem;
  }
}

/* Tablet Portrait (576px - 767px) */
@media (max-width: 767px) {
  header {
    padding: 20px 15px;
  }

  header h1 {
    font-size: 2.2rem;
  }

  header p {
    font-size: 1.1rem;
  }

  .arabic-decoration {
    font-size: 1.8rem;
  }

  .game-main-content {
    padding: 20px;
  }

  .back-btn {
    padding: 12px 20px;
    font-size: 1rem;
    width: 100%;
    justify-content: center;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .game-instructions p {
    font-size: 1rem;
    gap: 10px;
  }

  .number-grid {
    gap: 15px;
    padding: 18px;
  }

  .number-btn,
  .number-image-btn {
    font-size: 2.5rem;
    border-radius: 20px;
  }

  .number-image-btn .number-overlay {
    font-size: 2.5rem;
  }

  .audio-controls {
    padding: 20px;
  }

  .btn {
    padding: 16px 24px;
    font-size: 1.1rem;
  }

  .volume-control {
    padding: 12px;
    gap: 15px;
  }

  .current-number-display {
    padding: 25px;
  }

  .number-display {
    font-size: 4rem;
  }

  .number-name {
    font-size: 1.6rem;
  }

  .game-tips {
    padding: 20px;
  }

  .game-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 15px;
  }

  .mode-selector {
    flex-direction: column;
  }

  .mode-btn {
    width: 100%;
    justify-content: center;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .race-track {
    height: 80px;
  }

  .badge {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .quiz-option .option-number {
    font-size: 2rem;
  }
}

/* Mobile (576px ke bawah) */
@media (max-width: 576px) {
  .container {
    padding: 10px;
    max-width: 100%;
  }

  header {
    padding: 15px 10px;
    border-radius: 15px;
  }

  header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  header p {
    font-size: 1rem;
  }

  .arabic-decoration {
    font-size: 1.6rem;
    margin: 10px 0;
  }

  .islamic-pattern {
    height: 30px;
    margin: 15px 0;
    opacity: 0.5;
  }

  .game-main-content {
    padding: 15px;
    border-radius: 15px;
  }

  .back-button-container {
    margin-bottom: 20px;
  }

  .back-btn {
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .section-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
  }

  .game-instructions {
    padding: 15px;
    border-radius: 12px;
  }

  .game-instructions p {
    font-size: 0.95rem;
    margin: 8px 0;
    gap: 8px;
  }

  .game-instructions i {
    font-size: 1rem;
  }

  .number-grid {
    gap: 12px;
    padding: 15px;
    border-radius: 15px;
  }

  .number-btn,
  .number-image-btn {
    font-size: 2.2rem;
    border-radius: 18px;
  }

  .number-image-btn .number-overlay {
    font-size: 2.2rem;
  }

  .number-btn:hover,
  .number-image-btn:hover {
    transform: translateY(-5px) scale(1.05);
  }

  .audio-controls {
    padding: 15px;
    border-radius: 15px;
    gap: 15px;
  }

  .btn {
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 12px;
  }

  .volume-control {
    padding: 10px;
    gap: 12px;
    border-radius: 12px;
  }

  .volume-control i {
    font-size: 1.3rem;
  }

  #volume-slider {
    height: 8px;
  }

  #volume-slider::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }

  .current-number-display {
    padding: 20px;
    border-radius: 15px;
    margin: 25px 0;
  }

  .number-display {
    font-size: 3.5rem;
    margin: 10px 0;
  }

  .number-name {
    font-size: 1.4rem;
  }

  .game-tips {
    padding: 15px;
    border-radius: 15px;
  }

  .game-tips p {
    font-size: 0.9rem;
    margin: 6px 0;
  }

  footer {
    padding: 15px;
    border-radius: 12px;
  }

  .game-stats {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .stat-item {
    padding: 10px;
  }

  .stat-item i {
    font-size: 1.5rem;
  }

  .stat-item span {
    font-size: 1rem;
  }

  .race-track {
    height: 70px;
  }

  .player-car,
  .finish-line {
    font-size: 2rem;
  }

  .quiz-option .option-number {
    font-size: 1.8rem;
  }
}

/* Very Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
  header h1 {
    font-size: 1.6rem;
  }

  .arabic-decoration {
    font-size: 1.4rem;
  }

  .number-grid {
    gap: 10px;
    padding: 12px;
  }

  .number-btn,
  .number-image-btn {
    font-size: 1.8rem;
    border-radius: 15px;
  }

  .number-image-btn .number-overlay {
    font-size: 1.8rem;
  }

  .number-display {
    font-size: 3rem;
  }

  .number-name {
    font-size: 1.2rem;
  }

  .btn {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .badge {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }

  .quiz-option .option-number {
    font-size: 1.5rem;
  }
}

/* Fix untuk touch targets di game */
@media (max-width: 576px) {
  .number-btn,
  .number-image-btn,
  .btn,
  .back-btn,
  .mode-btn,
  .quiz-option {
    min-height: 48px;
  }

  .number-btn,
  .number-image-btn {
    -webkit-tap-highlight-color: rgba(255, 107, 107, 0.1);
  }
}

/* Animasi tambahan untuk feedback */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.number-btn:active,
.number-image-btn:active {
  animation: bounce 0.3s ease;
}
