:root {
  color-scheme: dark;
  font-size: 16px;
  --bg: #0f1823;
  --panel: #1a2635;
  --accent: #3ddc97;
  --accent-dark: #1f7a50;
  --text: #f4f4f4;
  --muted: #a7b4c3;
  --border: #33485e;
  --shadow: rgba(0, 0, 0, 0.45);
  --glow: rgba(61, 220, 151, 0.55);
  --glow-strong: rgba(61, 220, 151, 0.85);
  --music-red: #ff4f6d;
  --music-glow: rgba(255, 79, 109, 0.75);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body.intro-mode {
  overflow: hidden;
}

body.intro-mode .stage {
  visibility: hidden;
  pointer-events: none;
}

.minecraft-sky {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, #2b4a6f 0%, #152235 55%, #0b121b 100%);
  opacity: 0.9;
  z-index: -2;
}

.minecraft-sky::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://www.transparenttextures.com/patterns/brick-wall.png");
  opacity: 0.2;
}

.hero__tag {
  font-family: "Press Start 2P", cursive;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.intro {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 6vw;
  background: transparent;
  z-index: 1;
}

.intro h1 {
  font-family: "Press Start 2P", cursive;
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 1rem 0 0.5rem;
}

.hero__subtitle {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto;
}

.intro__content {
  background: rgba(15, 24, 35, 0.7);
  border: 2px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.5rem 3rem;
  box-shadow: 0 30px 60px var(--shadow);
}

.enter {
  margin-top: 1.8rem;
  background: var(--accent);
  border: none;
  color: #081b13;
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 12px var(--glow-strong);
}

.enter:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px var(--glow-strong);
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 18, 0.7);
  display: grid;
  place-items: center;
  z-index: 3;
  backdrop-filter: blur(8px);
}

.modal__panel {
  background: rgba(15, 24, 35, 0.95);
  border: 2px solid var(--border);
  border-radius: 1.5rem;
  padding: 2rem 2.5rem;
  width: min(420px, 90vw);
  text-align: center;
  box-shadow: 0 30px 60px var(--shadow);
}

.modal__panel h2 {
  font-family: "Press Start 2P", cursive;
  font-size: 1rem;
  margin: 0 0 0.6rem;
}

.modal__subtitle {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.modal__label {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.modal input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0d141f;
  color: var(--text);
  margin-bottom: 0.8rem;
}

.modal__error {
  color: var(--music-red);
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

.modal__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.modal__button {
  min-width: 120px;
}

.modal__button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
}

.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 6vw 3rem;
  gap: 1.5rem;
}

.frame {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 30px 60px var(--shadow);
  width: min(900px, 100%);
}

.frame img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  border-radius: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.controls-top,
.controls-bottom {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
}

.controls-top {
  width: min(900px, 100%);
  justify-content: space-between;
}

.control {
  background: rgba(15, 24, 35, 0.55);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 12px var(--glow);
}

.control:hover {
  transform: translateY(-2px);
  background: rgba(15, 24, 35, 0.75);
  box-shadow: 0 0 18px var(--glow-strong);
}

.control--music-paused {
  background: rgba(255, 79, 109, 0.2);
  border-color: rgba(255, 79, 109, 0.6);
  color: var(--music-red);
  box-shadow: 0 0 18px var(--music-glow);
}

@media (max-width: 700px) {
  .intro__content {
    padding: 2rem;
  }

  .frame img {
    height: 320px;
  }

  .controls-top {
    align-self: center;
  }
}
