/* MLG BASEBALL — 2014 montage parody styling */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #05030d;
  color: #fff;
  font-family: "Arial Black", "Arial Bold", Impact, Haettenschweiler, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(circle at 50% 40%, #221049 0%, #0a0518 55%, #05030d 100%);
}

#shell {
  position: relative;
  width: min(96vw, calc(96vh * 1.6));
  aspect-ratio: 16 / 10;
  border: 4px solid #39ff14;
  border-radius: 6px;
  box-shadow:
    0 0 0 3px #ff00e6,
    0 0 28px #39ff14,
    0 0 60px rgba(255, 0, 230, 0.55);
  overflow: hidden;
  background: #000;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: manipulation;
}

/* ---------- overlays ---------- */

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 4% 6%;
  background: rgba(4, 2, 12, 0.82);
  backdrop-filter: blur(2px);
  z-index: 5;
}

.overlay.hidden { display: none; }

.mlg-title {
  margin: 0;
  font-size: clamp(28px, 7.2vw, 74px);
  letter-spacing: 2px;
  line-height: 0.95;
  color: #fff;
  text-shadow:
    3px 3px 0 #ff00e6,
    -3px -3px 0 #00fff2,
    0 0 26px #39ff14;
  animation: wiggle 0.55s steps(2) infinite;
}

.mlg-title.rekt {
  color: #ff2d2d;
  text-shadow: 3px 3px 0 #000, -3px -3px 0 #ffe600, 0 0 30px #ff2d2d;
}

.mlg-sub {
  margin: 0;
  font-size: clamp(12px, 2.2vw, 22px);
  color: #ffe600;
  letter-spacing: 5px;
  text-shadow: 2px 2px 0 #000;
}

.rules {
  list-style: none;
  margin: 6px 0 2px;
  padding: 0;
  font-family: "Comic Sans MS", "Comic Sans", cursive, "Trebuchet MS", sans-serif;
  font-size: clamp(11px, 1.7vw, 17px);
  line-height: 1.75;
  color: #b9ffea;
  text-shadow: 1px 1px 0 #000;
}

.mlg-btn {
  margin-top: 6px;
  padding: 14px 30px;
  font-family: inherit;
  font-size: clamp(13px, 2.2vw, 22px);
  letter-spacing: 2px;
  color: #05030d;
  background: linear-gradient(180deg, #b6ff2e 0%, #39ff14 55%, #00c40f 100%);
  border: 3px solid #fff;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 0 22px #39ff14, 4px 4px 0 #ff00e6;
  transition: transform 0.08s ease-out, filter 0.12s ease-out;
}

.mlg-btn:hover { filter: brightness(1.12); }
.mlg-btn:active { transform: translate(3px, 3px) scale(0.98); }

.hiscore {
  margin: 4px 0 0;
  font-size: clamp(10px, 1.6vw, 15px);
  color: #ff9dfb;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 #000;
}

.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: clamp(6px, 1.6vw, 22px);
  margin: 6px 0 2px;
  width: min(100%, 620px);
}

.gap {
  margin: 2px 0 0;
  font-size: clamp(11px, 1.8vw, 17px);
  letter-spacing: 2px;
  color: #ffe600;
  text-shadow: 1px 1px 0 #000;
}

.hint {
  margin: 6px 0 0;
  font-family: "Comic Sans MS", "Comic Sans", cursive, "Trebuchet MS", sans-serif;
  font-size: clamp(10px, 1.4vw, 13px);
  letter-spacing: 1px;
  color: #8fd8ff;
  opacity: 0.85;
}

.statgrid div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.statgrid span {
  font-size: clamp(18px, 3.6vw, 38px);
  color: #ffe600;
  text-shadow: 2px 2px 0 #000, 0 0 14px #ffb300;
}

.statgrid em {
  font-style: normal;
  font-size: clamp(8px, 1.1vw, 11px);
  letter-spacing: 2px;
  color: #00fff2;
}

/* ---------- misc chrome ---------- */

.mute {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 6;
  width: 44px;
  height: 30px;
  font-family: inherit;
  letter-spacing: 1px;
  font-size: 12px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.55);
  color: #39ff14;
  border: 2px solid #39ff14;
  border-radius: 4px;
  cursor: pointer;
}

.mute.off { color: #ff2d2d; border-color: #ff2d2d; text-decoration: line-through; }

.footnote {
  margin: 0;
  font-family: "Comic Sans MS", "Comic Sans", cursive, "Trebuchet MS", sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  color: #6d5b9a;
}

@keyframes wiggle {
  0%   { transform: translate(0, 0) rotate(-0.6deg); }
  50%  { transform: translate(1px, -1px) rotate(0.6deg); }
  100% { transform: translate(0, 0) rotate(-0.6deg); }
}

@media (max-width: 560px) {
  .footnote { display: none; }
  #shell { width: 98vw; }
}
