/* ======================= Responsive Asteroids CSS (Scaled Clean Version + Taller Header) ======================= */

/* --- Global Reset --- */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: VT323;
}

/* --- Buttons --- */
button {
  font-size: 2vw;
  box-shadow: 6px 6px #2e2e5c;
  transition: all 0.1s ease;
}

button:active {
  transform: translateY(4px);
  box-shadow: 0 2px #2e2e5c;
}

button:hover {
  filter: brightness(1.2);
}

/* --- Game Container --- */
.outer-container {
  width: 100%;
  height: 100vh;
  background: #eee;
  border: 5px solid gainsboro;
  margin: 0 auto;
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.game-window {
  width: 1280px;
  height: 720px;
  transform-origin: top left;
  transform: scale(calc(min(100vw / 1280, 100vh / 720)));
  background: #000;
  position: relative;
  overflow: hidden;
}

section {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: none;
}

section.active {
  display: block;
}

/* --- Landing --- */
#landing {
  background: url("../images/frontpage_background.jpg") center/cover no-repeat;
}

#landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 15vh; /* ⬆️ taller header */
  background-color: darkslateblue;
  border-bottom: 6px groove;
  padding: 0 2vw;
}

#landing-header h1 {
  font-size: 7vw;
  color: white;
  margin: 0;
  text-align: center;
}

.header-asteroid {
  height: 100%;
  width: auto;
}

/* --- Buttons on Start Page --- */
#landing-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6vh;
  height: calc(100% - 15vh); /* adjust for taller header */
}

#landing-buttons button {
  width: 30vw;
  height: 12vh;
  background-color: darkslateblue;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3vw;
  border-radius: 0.8vw;
}

/* --- Settings --- */
#settings {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
#settings.open { display: flex; }

#settings-panel {
  width: 50%;
  background: #4b448c;
  color: #fff;
  padding: 4vw;
  border-radius: 6px;
  border: 0.6vw groove rgba(230, 230, 230, 0.95);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
  text-align: center;
  overflow-y: auto;
}

#settings-panel h2 {
  font-size: 5vw;
  margin-bottom: 3vh;
}

#settings-panel h3 {
  font-size: 4vw;
  margin: 3vh 0 2vh;
}

#volume-slider {
  width: 100%;
  height: 2vh;
  background: #b8b5c8;
  outline: none;
}

/* --- Difficulty buttons --- */
#difficulty-row {
  display: flex;
  justify-content: space-between;
  gap: 4vw;
  margin-top: 3vh;
}

.diff-btn {
  flex: 1;
  height: 8vh;
  background: purple;
  color: white;
  border: 0.5vw solid transparent;
  font-size: 3vw;
}
.diff-btn.selected { border-color: black; }

.settings-actions {
  text-align: center;
  margin-top: 3vh;
}

#btn-close-settings {
  width: 18vw;
  height: 9vh;
  background: purple;
  color: white;
  border: none;
  font-size: 3vw;
  border-radius: 6px;
}

/* --- Tutorial --- */
#tutorial {
  background-color: gainsboro;
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
#tutorial.active { display: flex; }

#tutorial-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 90%;
  width: 90%;
  text-align: center;
  padding: 2%;
  box-sizing: border-box;
}

#tutorial-content h2 {
  font-size: 6vw;
  margin: 0;
}
#tutorial-content p {
  font-size: 3vw;
  margin: 0;
  line-height: 1.2;
}

.tutorial-img {
  width: 8vw;
  height: auto;
}

.tutorial-row {
  display: flex;
  justify-content: center;
  gap: 3vw;
}

#btn-start {
  width: 18vw;
  height: 10vh;
  background: darkslateblue;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 3vw;
  margin-top: 3vh;
}

/* --- Utility --- */
img, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

* {
  box-sizing: border-box;
}
