/* ============================================================
   JOSE LAN — page Minecraft
   Style menu pause du jeu : fond dirt sombre, boutons stone.
   ============================================================ */

:root {
  --mc-text: #ffffff;
  --mc-yellow: #ffff55;
  --mc-gray: #aaaaaa;
  --mc-dark: rgba(0, 0, 0, .55);
  --font-pixel: "Press Start 2P", monospace;
  --font-terminal: "VT323", monospace;
}

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

body {
  background: #1a1e23 url("../assets/dirt.png");
  background-size: 64px;
  image-rendering: pixelated;
  color: var(--mc-text);
  font-family: var(--font-terminal);
  font-size: 1.35rem;
  min-height: 100vh;
  position: relative;
}

/* Voile sombre comme le menu pause */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--mc-dark);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

.grass-strip {
  height: 16px;
  background: url("../assets/grass.png");
  background-size: 64px;
  image-rendering: pixelated;
  border-bottom: 4px solid rgba(0,0,0,.4);
}

/* ---------- HEADER ---------- */
.mc-header { text-align: center; padding: 2.5rem 1rem 1rem; }

.mc-back {
  font-family: var(--font-terminal);
  color: var(--mc-gray);
  text-decoration: none;
  font-size: 1.2rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}
.mc-back:hover { color: var(--mc-text); text-decoration: underline; }

.mc-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.6rem, 6vw, 3rem);
  text-shadow: 4px 4px 0 #3f3f3f;
  letter-spacing: .05em;
}

/* Splash text jaune qui pulse, comme sur l'écran titre */
.mc-splash {
  color: var(--mc-yellow);
  font-family: var(--font-pixel);
  font-size: clamp(.55rem, 2vw, .8rem);
  text-shadow: 2px 2px 0 #3f3f00;
  transform: rotate(-4deg);
  display: inline-block;
  margin-top: 1rem;
  animation: splash-pulse .5s ease-in-out infinite alternate;
}
@keyframes splash-pulse { from { transform: rotate(-4deg) scale(1); } to { transform: rotate(-4deg) scale(1.08); } }

/* ---------- PANELS ---------- */
.mc-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 1.25rem 5rem;
}

.mc-panel { margin-top: 2.5rem; }

.mc-panel-title {
  font-family: var(--font-pixel);
  font-size: clamp(.75rem, 2.5vw, 1rem);
  margin-bottom: 1.2rem;
  text-shadow: 3px 3px 0 #3f3f3f;
}

/* ---------- BOUTONS FAÇON MINECRAFT ---------- */
.mc-button {
  display: block;
  text-decoration: none;
  text-align: center;
  background: url("../assets/stone.png");
  background-size: 64px;
  image-rendering: pixelated;
  border: 3px solid #000;
  box-shadow:
    inset 3px 3px 0 rgba(255,255,255,.35),
    inset -3px -3px 0 rgba(0,0,0,.45);
  padding: .9rem 1rem .8rem;
  margin-bottom: .9rem;
  cursor: pointer;
}
.mc-button:hover {
  box-shadow:
    inset 3px 3px 0 rgba(255,255,255,.5),
    inset -3px -3px 0 rgba(0,0,0,.55),
    0 0 0 3px var(--mc-text);
}
.mc-button:active {
  box-shadow:
    inset -3px -3px 0 rgba(255,255,255,.35),
    inset 3px 3px 0 rgba(0,0,0,.45);
}

.mc-button-label {
  display: block;
  font-family: var(--font-pixel);
  font-size: clamp(.7rem, 2.5vw, .95rem);
  color: var(--mc-text);
  text-shadow: 2px 2px 0 #3f3f3f;
}
.mc-button-sub {
  display: block;
  font-family: var(--font-terminal);
  font-size: 1.1rem;
  color: var(--mc-gray);
  margin-top: .4rem;
}

/* ---------- INSTRUCTIONS ---------- */
.mc-instructions {
  background: rgba(0,0,0,.5);
  border: 2px solid rgba(255,255,255,.25);
  padding: 1.2rem 1.4rem;
  line-height: 1.5;
}
.mc-instructions h3 { color: var(--mc-yellow); margin: .8rem 0 .3rem; font-weight: 400; }
.mc-instructions h3:first-child { margin-top: 0; }
.mc-instructions ol { padding-left: 1.5rem; }
.mc-instructions code {
  font-family: var(--font-terminal);
  background: rgba(255,255,255,.12);
  padding: 0 .35rem;
  color: var(--mc-yellow);
}
.mc-instructions p { margin: .3rem 0; }

/* ---------- FOOTER ---------- */
.mc-footer {
  text-align: center;
  color: var(--mc-gray);
  padding: 2rem 1rem;
  font-size: 1.15rem;
}

/* ---------- EASTER EGG : creeper caché ---------- */
.creeper {
  position: fixed;
  bottom: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: url("../assets/creeper.png");
  background-size: cover;
  image-rendering: pixelated;
  border: none;
  cursor: pointer;
  opacity: .18;
  transition: opacity .3s ease;
  z-index: 5;
}
.creeper:hover { opacity: 1; animation: hiss .15s linear infinite; }
@keyframes hiss { 50% { transform: translate(1px, -1px) scale(1.05); } }

.boom {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}
.boom.active { animation: boomflash .6s ease-out; }
@keyframes boomflash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

body.shake { animation: shake .5s linear; }
@keyframes shake {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-8px, 4px); }
  40% { transform: translate(8px, -4px); }
  60% { transform: translate(-6px, -3px); }
  80% { transform: translate(6px, 3px); }
}

/* ---------- EASTER EGG : faux debug F3 ---------- */
.debug-overlay {
  position: fixed;
  top: 0; left: 0;
  padding: 8px 10px;
  font-family: var(--font-terminal);
  font-size: 1.05rem;
  line-height: 1.35;
  color: #e0e0e0;
  background: rgba(0,0,0,.35);
  white-space: pre;
  display: none;
  z-index: 40;
  pointer-events: none;
}
.debug-overlay.active { display: block; }

/* ---------- Accessibilité / mobile ---------- */
.mc-button:focus-visible, .creeper:focus-visible {
  outline: 3px solid var(--mc-yellow);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

/* Infos du pack sous le titre téléchargement */
.mc-pack-info {
  color: var(--mc-gray);
  margin: -0.6rem 0 1rem;
  font-size: 1.15rem;
}
