﻿* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 10px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 20% 10%, #fefae0, #d8f3dc 60%, #b7e4c7);
  font-family: "Segoe UI", "Microsoft JhengHei", sans-serif;
}

.hud {
  width: min(900px, 96vw);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: space-between;
  color: #1b4332;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: clamp(12px, 2.7vw, 16px);
}

.audio-controls {
  width: min(900px, 96vw);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: #1b4332;
  font-weight: 600;
  font-size: clamp(12px, 2.6vw, 15px);
}

#mute-btn {
  border: 0;
  border-radius: 10px;
  background: #2d6a4f;
  color: #ffffff;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

#volume-slider {
  width: min(220px, 44vw);
}

#game {
  width: min(900px, 96vw);
  height: min(70vh, calc(min(900px, 96vw) * 0.68));
  border: 2px solid #2d6a4f;
  background: linear-gradient(#e9ecef 0%, #dee2e6 68%, #c9ada7 68%, #9c6644 100%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  touch-action: none;
}

@media (max-width: 640px) {
  body {
    padding: 8px;
  }

  .audio-controls {
    gap: 8px;
  }

  #mute-btn {
    padding: 7px 10px;
  }

  #game {
    height: min(76vh, calc(min(900px, 96vw) * 0.8));
  }
}
