* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.game-container {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 560px;
  width: 100%;
}

.game-header h1 {
  text-align: center;
  color: #fff;
  font-size: 2rem;
  letter-spacing: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  gap: 10px;
}

.stat {
  flex: 1;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
}

.stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.board-wrap {
  display: flex;
  justify-content: center;
}

#board {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  cursor: pointer;
  touch-action: none;
  max-width: 100%;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}

.audio-controls {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}

.btn-sm {
  font-size: 0.85rem;
  padding: 7px 16px;
}

.btn-sm.off {
  background: linear-gradient(135deg, #b8c0cf, #9aa3b2);
  color: #fff;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.btn {
  background: linear-gradient(135deg, #f6d365, #fda085);
  border: none;
  color: #5a3e00;
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.overlay.hidden {
  display: none;
}

.modal {
  background: #fff;
  border-radius: 20px;
  padding: 36px 44px;
  text-align: center;
  max-width: 340px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal h2 {
  color: #4a3fbf;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.modal p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 24px;
}
