/* ===== 90'S SKUFFET STYLE ===== */

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

body {
  background-color: #000020;
  background-image:
    radial-gradient(3px 3px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 200px 80px, #eee, transparent),
    radial-gradient(3px 3px at 350px 150px, #fff, transparent),
    radial-gradient(2px 2px at 500px 50px, #ddd, transparent),
    radial-gradient(3px 3px at 150px 200px, #fff, transparent),
    radial-gradient(2px 2px at 450px 180px, #eee, transparent);
  background-size: 650px 250px;
  background-attachment: fixed;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  color: #00ff00;
  cursor: crosshair;
}

.wrapper {
  max-width: 960px;
  margin: 20px auto;
  padding: 10px;
}

/* ===== MAIN LAYOUT TABLE ===== */
.layout-main {
  width: 100%;
  table-layout: fixed;
  background: #000040;
  border: 4px outset #4444ff;
  border-collapse: separate;
}

.layout-main td {
  border: 2px inset #6666cc;
  background: #000030;
  padding: 10px 8px;
  vertical-align: top;
}

/* ===== HERO ===== */
.hero-cell {
  text-align: center;
  background: linear-gradient(180deg, #000060 0%, #000040 100%) !important;
}

.neon-text {
  font-family: "Times New Roman", Times, serif;
  font-size: 42px;
  color: #ff00ff;
  text-shadow:
    0 0 7px #ff00ff,
    0 0 10px #ff00ff,
    0 0 21px #ff00ff,
    0 0 42px #ff00ff,
    2px 2px 2px #000;
  margin-bottom: 4px;
  letter-spacing: 4px;
}

.subtitle {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 14px;
  color: #ffff00;
  text-shadow: 1px 1px 2px #000;
  margin-bottom: 8px;
}

marquee {
  color: #00ffff;
  font-size: 13px;
  font-weight: bold;
  text-shadow: 1px 1px 0 #000;
  background: #000020;
  padding: 4px 0;
  border: 1px inset #4444aa;
}

/* ===== BEER-O-METER ===== */
.beer-cell {
  text-align: center;
  background: linear-gradient(180deg, #200000 0%, #300000 100%) !important;
  border: 3px ridge #ff4444 !important;
}

.section-title {
  color: #ffaa00;
  font-size: 22px;
  text-shadow: 1px 1px 3px #000;
  margin-bottom: 4px;
}

.question {
  color: #ffcc00;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
  margin-bottom: 8px;
}

.beer-answer {
  font-family: "Times New Roman", Times, serif;
  font-size: 72px;
  font-weight: bold;
  text-shadow: 3px 3px 0 #000;
  margin: 8px 0;
  line-height: 1;
  animation: pulse 1s ease-in-out infinite;
}

.beer-answer.yes {
  color: #00ff00;
  text-shadow:
    0 0 10px #00ff00,
    0 0 20px #00ff00,
    3px 3px 0 #003300;
}

.beer-answer.no {
  color: #ff0000;
  text-shadow:
    0 0 10px #ff0000,
    0 0 20px #ff0000,
    3px 3px 0 #330000;
}

.beer-countdown {
  color: #ffaa00;
  font-size: 16px;
  margin-bottom: 6px;
}

.beer-rules {
  color: #888888;
  font-size: 10px;
  font-style: italic;
}

/* ===== THERMOMETERS ===== */
.therm-row td {
  width: 33.33%;
}

.therm-cell {
  text-align: center;
  vertical-align: top;
  max-width: 33.33%;
  overflow: hidden;
}

.therm-title {
  color: #ffaa00;
  font-size: 14px;
  text-shadow: 1px 1px 2px #000;
  margin-bottom: 4px;
}

.therm-display {
  font-family: "Courier New", Courier, monospace;
  font-size: 32px;
  font-weight: bold;
  color: #00ffff;
  text-shadow:
    0 0 5px #00ffff,
    2px 2px 0 #000;
  margin: 4px 0;
}

.therm-humidity {
  font-size: 11px;
  color: #88ccff;
  margin-bottom: 4px;
}

.therm-bar-bg {
  width: 100%;
  height: 18px;
  background: #111;
  border: 2px inset #555;
  margin: 6px auto;
  position: relative;
}

.therm-bar-fill {
  height: 100%;
  transition: width 0.5s ease;
  background: linear-gradient(180deg, #ff0000 0%, #ff6600 30%, #ffff00 60%, #00ff00 100%);
}

.therm-bar-fill.fridge {
  background: linear-gradient(180deg, #0044ff 0%, #0088ff 40%, #00ccff 70%, #ffffff 100%);
  box-shadow: 0 0 8px #0088ff;
}

.therm-bar-fill.tent {
  box-shadow: 0 0 8px #ff6600;
}

.therm-bar-fill.common {
  background: linear-gradient(180deg, #ff0000 0%, #ff6600 40%, #ffff00 70%, #00ff00 100%);
  box-shadow: 0 0 8px #00ff44;
}

/* ===== CHART ===== */
.chart-container {
  margin-top: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  height: 60px;
  width: 100%;
  overflow: hidden;
  padding: 3px;
  background: #000010;
  border: 1px inset #333;
}

.chart-bar {
  flex: 1;
  max-width: 12px;
  min-width: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.chart-bar.fridge {
  background: linear-gradient(0deg, #0044ff 0%, #00aaff 50%, #ffffff 100%);
}

.chart-bar.tent {
  background: linear-gradient(0deg, #ff4400 0%, #ff8800 50%, #ffcc00 100%);
}

.chart-bar.common {
  background: linear-gradient(0deg, #006600 0%, #00cc00 50%, #ffff00 100%);
}

.chart-bar:hover {
  opacity: 0.8;
  border: 1px solid #fff;
  cursor: help;
}

/* ===== INFO ===== */
.info-cell {
  font-size: 11px;
}

.info-cell td {
  text-align: center;
  background: #000020 !important;
}

.status-ok {
  color: #00ff00;
  animation: pulse 2s ease-in-out infinite;
}

#last-update {
  color: #ffaa00;
}

/* ===== FOOTER ===== */
.footer-cell {
  text-align: center;
  font-size: 11px;
  background: #000020 !important;
  border: 2px ridge #4444aa !important;
}

.footer-cell p {
  margin: 4px 0;
}

.footer-cell a {
  color: #ffff00;
  text-decoration: underline;
}

.footer-cell a:hover {
  color: #ffffff;
  background: #ff00ff;
}

.counter {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #aaaaaa;
}

#visitor-count {
  color: #00ff00;
  font-weight: bold;
  font-size: 14px;
  background: #001100;
  padding: 2px 6px;
  border: 1px inset #555;
}

/* ===== ANIMATIONS ===== */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes blinkSlow {
  0%, 69% { opacity: 1; }
  70%, 100% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.blink-slow {
  animation: blinkSlow 3s step-end infinite;
}

.blink-fast {
  animation: blink 1s step-end infinite;
}

/* ===== HR ===== */
hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff00ff, #00ffff, #ff00ff, transparent);
  margin: 8px 0;
}

/* ===== RESPONSIVE-ish ===== */
@media (max-width: 700px) {
  .neon-text {
    font-size: 22px;
  }
  .beer-answer {
    font-size: 48px;
  }
  .therm-display {
    font-size: 24px;
  }
  .chart-container {
    height: 45px;
  }
  .therm-row td {
    display: block;
    width: 100% !important;
  }
}

/* ===== SPINNING WIZARDS ===== */
.wizard-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  contain: layout style paint;
}

.wizard {
  width: 64px;
  height: 64px;
  opacity: 0.35;
  pointer-events: none;
  image-rendering: pixelated;
  animation: wizardSpin 8s linear infinite, wizardPulse 3s ease-in-out infinite;
}

@keyframes wizardSpin {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1); }
}

@keyframes wizardPulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.45; }
}

/* ===== SPARKLE CURSOR ===== */
.sparkle {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  font-size: 14px;
  line-height: 1;
  animation: sparkleFade 600ms ease-out forwards;
}

@keyframes sparkleFade {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.3);
  }
}
