/* milhouse.win — deliberately, lovingly bad */

:root {
  --ink: #10104a;
  --hot: #ff00c8;
  --lime: #39ff14;
  --cyan: #00fff2;
  --gold: #ffd400;
  --milhouse-blue: #4f6ee0;
  --panel: #fffbe6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive, sans-serif;
  color: var(--ink);
  background-color: #2b1f8f;
  background-image:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.35) 1.5px, transparent 2px),
    radial-gradient(circle at 36px 36px, rgba(255, 212, 0, 0.5) 2px, transparent 3px),
    repeating-linear-gradient(45deg, #2b1f8f 0 12px, #37299f 12px 24px);
  background-size: 48px 48px, 48px 48px, auto;
  overflow-x: hidden;
}

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden;
  white-space: nowrap;
  background: var(--gold);
  border-bottom: 4px ridge var(--hot);
  font-weight: bold;
  letter-spacing: 0.06em;
  padding: 6px 0;
}

.marquee__track {
  display: inline-block;
  padding-left: 100%;
  animation: scroll 22s linear infinite;
}

@keyframes scroll {
  to { transform: translateX(-100%); }
}

/* ---------- under construction ---------- */

.construction {
  height: 22px;
  background: repeating-linear-gradient(
    45deg, #ffd400 0 14px, #111 14px 28px
  );
  border-bottom: 3px solid #111;
}

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 28px 16px 34px;
}

.wordart {
  margin: 14px 0 6px;
  font-family: Impact, "Haettenschweiler", "Arial Black", sans-serif;
  font-size: clamp(2.2rem, 9vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: linear-gradient(
    180deg, var(--gold) 0%, var(--hot) 45%, var(--cyan) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 2px #000;
  paint-order: stroke fill;
  filter: drop-shadow(4px 4px 0 #000);
}

.hero__url {
  margin: 0;
  color: var(--lime);
  font-size: clamp(1rem, 3.5vw, 1.6rem);
  font-weight: bold;
  text-shadow: 2px 2px 0 #000;
}

.hero__sub {
  margin: 10px 0 0;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

.blink { animation: blink 1s steps(2, start) infinite; color: var(--hot); }
@keyframes blink { to { visibility: hidden; } }

/* ---------- milhouse ---------- */

.mh {
  display: block;
  height: auto;
  animation: bob 3s ease-in-out infinite;
}

.mh--hero {
  width: clamp(110px, 22vw, 165px);
  margin: 0 auto;
  filter: drop-shadow(5px 5px 0 rgba(0, 0, 0, 0.45));
  animation: bob 3s ease-in-out infinite, wobble 6s ease-in-out infinite;
}

.mh--tiny {
  width: 78px;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.4));
}

@keyframes bob { 50% { transform: translateY(-10px); } }
@keyframes wobble {
  0%, 100% { rotate: -7deg; }
  50%      { rotate: 7deg; }
}

/* ---------- layout ---------- */

.hr {
  height: 8px;
  margin: 0;
  background: repeating-linear-gradient(
    90deg,
    var(--hot) 0 16px, var(--cyan) 16px 32px,
    var(--lime) 32px 48px, var(--gold) 48px 64px
  );
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
}

main { padding: 0 12px; }

.panel {
  max-width: 780px;
  margin: 26px auto;
  padding: 18px;
  background: var(--panel);
  border: 5px ridge var(--gold);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.55);
  text-align: center;
}

.panel__title {
  margin: 0 0 4px;
  font-size: clamp(1.1rem, 4.5vw, 1.7rem);
  color: var(--hot);
  text-shadow: 1px 1px 0 #000;
}

.panel__note { margin: 0 0 16px; font-size: 0.9rem; opacity: 0.8; }

/* ---------- buttons ---------- */

.bigbutton, .smallbutton {
  font-family: inherit;
  font-weight: bold;
  color: #000;
  background: linear-gradient(180deg, #fff 0%, var(--cyan) 55%, #00a6a0 100%);
  border: 4px outset var(--cyan);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.08s;
}

.bigbutton {
  padding: 16px 28px;
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.smallbutton { margin-top: 14px; padding: 9px 16px; font-size: 0.95rem; }

.bigbutton:hover, .smallbutton:hover { background: linear-gradient(180deg, #fff, var(--hot)); }
.bigbutton:active, .smallbutton:active { border-style: inset; transform: translateY(2px); }
.bigbutton[disabled], .smallbutton[disabled] { opacity: 0.6; cursor: wait; }

/* ---------- the shot ---------- */

.shot { margin: 20px 0 0; }

.shot__frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border: 5px double #000;
  background: #000;
  line-height: 0;
}

.shot__frame img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 480px;
}

.shot__caption {
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  padding: 0 10px;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(0.95rem, 3.4vw, 1.5rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
     2px 2px 0 #000, -2px 2px 0 #000,
     2px -2px 0 #000, -2px -2px 0 #000;
}

.shot__meta { margin: 10px 0 0; font-size: 0.85rem; opacity: 0.75; }
.shot__error { color: #b00; font-weight: bold; }

/* ---------- wall ---------- */

.wall__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.wall__grid a {
  display: block;
  border: 3px solid #000;
  background: #000;
  line-height: 0;
  transition: transform 0.12s;
}
.wall__grid a:hover { transform: rotate(-2deg) scale(1.04); }
.wall__grid img { width: 100%; height: auto; display: block; }

.wall__grid--empty { min-height: 120px; }

/* ---------- lists ---------- */

.quotes, .guestbook { list-style: none; margin: 0; padding: 0; text-align: left; }

.quotes li {
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #fff;
  border-left: 6px solid var(--hot);
  font-size: 1.05rem;
}
.quotes li:nth-child(even) { border-left-color: var(--cyan); }

.guestbook li {
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #eef;
  border: 2px dashed #99a;
  font-size: 0.92rem;
}
.guestbook i { color: #667; font-size: 0.8rem; }

/* ---------- footer ---------- */

.footer {
  max-width: 780px;
  margin: 30px auto 0;
  padding: 22px 16px 40px;
  text-align: center;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

.webring a { color: var(--gold); }
.footer a { color: var(--cyan); }

.counter-wrap { margin: 22px 0 16px; font-weight: bold; }

.counter {
  display: inline-flex;
  gap: 3px;
  margin-top: 8px;
  padding: 5px;
  background: #000;
  border: 3px inset #777;
}

.counter__digit {
  display: inline-block;
  min-width: 22px;
  padding: 4px 2px;
  font-family: "Courier New", monospace;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--lime);
  background: #111;
  text-shadow: 0 0 6px var(--lime);
}

.badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

.badge {
  padding: 4px 8px;
  font-size: 0.72rem;
  color: #000;
  background: silver;
  border: 2px outset #ddd;
  text-shadow: none;
}
.badge--pink { background: var(--hot); color: #fff; }

.smallprint {
  margin-top: 22px;
  font-size: 0.72rem;
  opacity: 0.75;
  line-height: 1.5;
}

/* ---------- floating milhouse ---------- */

.floater {
  position: fixed;
  top: 0; left: 0;
  z-index: 50;
  pointer-events: none;
  will-change: transform;
}

/* ---------- mercy ---------- */

@media (prefers-reduced-motion: reduce) {
  .marquee__track, .mh, .mh--hero, .blink { animation: none; rotate: none; }
  .marquee__track { padding-left: 0; }
  .floater { display: none; }
  .wall__grid a { transition: none; }
}
