:root {
  --butter: #ffe36e;
  --cream: #fff8d6;
  --ink: #fff;
  --panel: rgba(0, 0, 0, 0.72);
  --hot: #ff5a00;
  --link: #7cf7ff;
  --visited: #ff9cf2;
}
* { box-sizing: border-box; }
html { background: #000; }
body {
  margin: 0;
  min-height: 100vh;
  background: #000;
  color: var(--ink);
  font: 17px/1.5 "Times New Roman", Times, serif;
  overflow-x: hidden;
}
a { color: var(--link); }
a:visited { color: var(--visited); }

/* Background stack */
#stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #021012; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.smoke { opacity: 0.9; }
.fire { mix-blend-mode: screen; opacity: 0.85; }
canvas.layer { filter: blur(2px); }

.entity {
  position: fixed; z-index: 1; left: 50%; bottom: 0;
  height: min(78vh, 140vw); width: auto; transform: translateX(-50%);
  filter: drop-shadow(0 0 24px rgba(255, 120, 0, 0.6));
  pointer-events: none;
}

/* In front of the entity: smoke wisps that fade out going up, then popcorn butter rising from the bottom */
.wisps, .drip { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wisps {
  z-index: 2; mix-blend-mode: screen; opacity: 0.6; filter: blur(3px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.55) 25%, transparent 50%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.55) 25%, transparent 50%);
}
.drip { z-index: 2; }
canvas.nogl { display: none; }

/* Page content */
main { position: relative; z-index: 3; max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }
.home main { padding-bottom: 40vh; }
.reveal { height: 62vh; }

.marquee {
  overflow: hidden; white-space: nowrap; margin: 12px 0;
  background: #000; color: #ffef00; border: 2px ridge #ffd000;
  font: bold 15px/2 "Courier New", monospace;
}
.marquee span { display: inline-block; padding-left: 100%; animation: scroll 22s linear -5s infinite; }
@keyframes scroll { to { transform: translateX(-100%); } }

.wordart {
  margin: 18px 0 4px; text-align: center;
  font: 400 clamp(2.8rem, 13vw, 6.4rem)/0.95 "Shrikhand", Impact, serif;
  background: linear-gradient(180deg, #fffbe0 0%, #ffe36e 40%, #f0a500 55%, #fff3a8 70%, #c77700 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #5a2a00;
  filter: drop-shadow(4px 5px 0 #8a1500) drop-shadow(0 0 18px rgba(255, 90, 0, 0.8));
}
.tagline { text-align: center; margin: 0 0 18px; font-style: italic; color: var(--cream); text-shadow: 0 0 8px #000, 0 0 2px #000; }

.panel {
  background: var(--panel); border: 3px ridge #b98b2d; padding: 14px 18px; margin: 16px 0;
  box-shadow: 0 0 0 1px #000;
}
.panel h2 { margin: 0 0 8px; font: bold 1.25rem/1.2 "Courier New", monospace; color: var(--butter); text-transform: uppercase; letter-spacing: 0.04em; }
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* TV with the butter loop */
.tv-wrap { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .tv-wrap { grid-template-columns: 1.1fr 1fr; align-items: center; } }
#tv {
  position: relative; aspect-ratio: 16 / 9; background: #111;
  border: 10px solid #3b3b3b; border-radius: 18px / 26px; box-shadow: inset 0 0 0 3px #000, 0 0 0 3px #222, 0 6px 0 #111;
  overflow: hidden;
}
#tv .tv-screen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#tv::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0 2px, transparent 2px 4px);
}
#tv .chan { position: absolute; z-index: 1; top: 6px; right: 10px; font: bold 18px "Courier New", monospace; color: #3f3; text-shadow: 0 0 4px #000; }

/* Buttons */
.btn, .nav a {
  display: inline-block; padding: 8px 14px; margin: 4px 4px 4px 0;
  background: #c0c0c0; color: #000 !important; text-decoration: none;
  font: bold 14px/1.2 Tahoma, Verdana, sans-serif;
  border: 3px outset #fff; cursor: pointer;
}
.btn:active, .nav a:active { border-style: inset; }
.btn:focus-visible, .nav a:focus-visible, .redact:focus-visible { outline: 3px dashed var(--butter); outline-offset: 2px; }
.nav { display: flex; flex-wrap: wrap; justify-content: center; margin: 8px 0; }

.counter { text-align: center; font: 14px Tahoma, sans-serif; }
#hits {
  display: inline-block; margin: 0 4px; padding: 2px 6px; background: #000; color: #f22;
  font: bold 22px/1 "Courier New", monospace; letter-spacing: 3px; border: 2px inset #555;
}

.construction {
  display: block; text-align: center; padding: 6px; margin: 16px 0; color: #000; font: bold 14px Tahoma, sans-serif;
  background: repeating-linear-gradient(45deg, #ffd000 0 18px, #000 18px 36px);
}
.construction b { background: #ffd000; padding: 2px 8px; }

.ring { text-align: center; }
.ring .btn { font-size: 13px; }
#ring-msg { min-height: 1.5em; margin: 6px 0 0; color: var(--butter); font-style: italic; }

footer.badges { text-align: center; font: 12px Tahoma, sans-serif; color: #ddd; text-shadow: 0 0 4px #000; }
footer.badges span { display: inline-block; margin: 4px; padding: 3px 8px; border: 1px solid #888; background: #000080; color: #fff; }

/* Inner pages */
.inner .entity { height: min(50vh, 90vw); opacity: 0.35; }
.inner h1 { font: 400 clamp(2rem, 9vw, 3.6rem)/1 "Shrikhand", Impact, serif; color: var(--butter); text-align: center; margin: 22px 0 6px; text-shadow: 3px 4px 0 #8a1500, 0 0 16px #ff5a00; }
.inner .panel { background: rgba(0, 0, 0, 0.84); }
dl { margin: 0; }
dt { font: bold 15px "Courier New", monospace; color: var(--butter); margin-top: 10px; }
dd { margin: 2px 0 0 0; }
hr.flame { border: 0; height: 6px; background: linear-gradient(90deg, #ff0, #f50, #f00, #f50, #ff0); margin: 22px 0; }

/* Dossier */
.dossier { background: #f3ecd2 !important; color: #1a1a1a; font-family: "Courier New", monospace; border: 1px solid #000 !important; }
.dossier h2, .dossier dt { color: #8a0000; }
.stamp { display: inline-block; transform: rotate(-6deg); border: 3px solid #b00; color: #b00; padding: 2px 10px; font-weight: bold; letter-spacing: 0.15em; margin: 0 0 10px; }
.redact { background: #000; color: transparent; cursor: pointer; padding: 0 2px; border-radius: 1px; transition: background 0.4s, color 0.4s; }
.redact.open { background: #ffe36e; color: #000; cursor: auto; }
.footage { width: 100%; display: block; border: 6px solid #222; background: #000; margin: 8px 0; }
.caption { font-size: 13px; color: #444; margin: 0; }

/* Guestbook */
.entry { border-bottom: 1px dashed #b98b2d; padding: 10px 0; }
.entry:last-child { border-bottom: 0; }
.entry .who { color: var(--butter); font-weight: bold; }
.entry .when { color: #aaa; font: 12px "Courier New", monospace; }
.entry p { margin: 4px 0 0; }
form.closed fieldset { border: 2px groove #888; opacity: 0.7; }
form.closed input, form.closed textarea { width: 100%; font: inherit; margin: 4px 0 10px; }

@media (prefers-reduced-motion: reduce) {
  .blink { animation: none; }
  .marquee span { animation: none; padding-left: 0; white-space: normal; }
  .redact { transition: none; }
}
