/* ============================================================
   RETRO.CSS — best viewed in Netscape Navigator 3.0 at 800x600
   A 1996 skin on a 2026 app. Mobile usability always wins.
   ============================================================ */

:root {
  --blue: #0000ee;
  --visited: #551a8b;
  --yellow: #ffff00;
  --silver: #c0c0c0;
  --deep: #000066;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 17px;
  color: #000;
  background-color: var(--deep);
  /* tiled yellow stars on deep blue */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Ctext x='8' y='24' font-size='16' fill='%23ffdd00'%3E%E2%9C%A6%3C/text%3E%3Ctext x='55' y='66' font-size='10' fill='%2399aaff'%3E%E2%9C%A6%3C/text%3E%3Ctext x='30' y='82' font-size='7' fill='%23ffffff'%3E%E2%9C%A6%3C/text%3E%3C/svg%3E");
  min-height: 100dvh;
  overscroll-behavior-y: contain;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 10px 90px;
}

/* ---------- panels ---------- */

.panel {
  background: #fffff0;
  border: 3px solid #000;
  box-shadow: 6px 6px 0 #000;
  padding: 14px;
  margin: 14px 0;
}

.panel.yellow-on-blue {
  background: var(--deep);
  color: var(--yellow);
  border-color: var(--yellow);
}

/* ---------- 3D system buttons ---------- */

.btn96 {
  font-family: Verdana, Geneva, sans-serif;
  font-weight: bold;
  font-size: 18px;
  color: #000;
  background: var(--silver);
  border: 4px outset #fff;
  border-right-color: #555;
  border-bottom-color: #555;
  padding: 10px 16px;
  min-height: 48px;
  min-width: 48px;
  cursor: pointer;
  touch-action: manipulation;
}
.btn96:active { border-style: inset; transform: translateY(1px); }
.btn96:disabled { color: #777; }
.btn96.big { width: 100%; font-size: 22px; min-height: 60px; margin: 8px 0; }
.btn96.danger { background: #e06666; }
.btn96.go { background: #66cc66; }
.btn96.small { font-size: 14px; min-height: 44px; padding: 6px 10px; }

/* ---------- inputs ---------- */

input[type="text"], input[type="number"], select {
  font-family: "Courier New", monospace;
  font-size: 22px;
  padding: 10px;
  min-height: 52px;
  border: 3px inset #888;
  background: #fff;
  width: 100%;
}
select { font-size: 16px; width: auto; min-height: 44px; }

/* ---------- typographic crimes ---------- */

.rainbow {
  background: linear-gradient(90deg, #f00, #ff8800, #ddcc00, #0a0, #00f, #80f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: bold;
}

.wordart {
  font-family: Impact, "Arial Black", sans-serif;
  font-style: italic;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ff0 10%, #f80 35%, #f0f 70%, #00e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(2px 2px 0 #000) drop-shadow(4px 4px 0 rgba(255,255,255,.5));
}

h1, h2 { font-family: "Times New Roman", serif; margin: 8px 0; }

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

.marquee {
  overflow: hidden;
  white-space: nowrap;
  background: #000;
  color: #0f0;
  font-family: "Courier New", monospace;
  font-weight: bold;
  padding: 6px 0;
  border-top: 2px solid #0f0;
  border-bottom: 2px solid #0f0;
}
.marquee > span {
  display: inline-block;
  padding-left: 100%;
  animation: marq 14s linear infinite;
}
@keyframes marq { to { transform: translateX(-100%); } }

.badge-new {
  display: inline-block;
  background: #f00;
  color: var(--yellow);
  font-family: Verdana, sans-serif;
  font-weight: bold;
  font-size: 13px;
  padding: 2px 7px;
  transform: rotate(-8deg);
  animation: blink96 0.8s steps(2, start) infinite;
}

/* construction-stripe divider */
.construction {
  height: 16px;
  margin: 12px 0;
  background: repeating-linear-gradient(45deg, #000 0 14px, #fc0 14px 28px);
  border: 2px solid #000;
}

.divider-star {
  text-align: center;
  font-size: 26px;
  color: var(--yellow);
  margin: 8px 0;
}
.divider-star span { display: inline-block; animation: spin96 3s linear infinite; }
@keyframes spin96 { to { transform: rotate(360deg); } }

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

footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #000;
  color: #888;
  font-family: Verdana, sans-serif;
  font-size: 11px;
  text-align: center;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--silver);
  z-index: 5;
}
.hitcounter {
  font-family: "Courier New", monospace;
  background: #001100;
  color: #0f0;
  border: 1px solid #0f0;
  padding: 1px 6px;
  letter-spacing: 2px;
}

/* ---------- splash ---------- */

#splash {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 50;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.splash-zoom {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.splash-zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* face sits between center and top: zoom anchors at 50% / 28% */
  object-position: 50% 28%;
  transform-origin: 50% 28%;
  animation: kenburns 6.5s ease-in-out forwards;
}
@keyframes kenburns {
  from { transform: scale(1.0); }
  to   { transform: scale(2.1); }
}
.est1996 {
  position: absolute;
  top: 12%;
  width: 100%;
  text-align: center;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 13vw;
  color: #f00;
  -webkit-text-stroke: 2px #ff0;
  text-shadow: 4px 4px 0 #000;
  opacity: 0;
  animation: stampin 0.4s ease-out 2s forwards;
}
@keyframes stampin {
  from { opacity: 0; transform: scale(4) rotate(-20deg); }
  to   { opacity: 1; transform: scale(1) rotate(-6deg); }
}
.dialup {
  position: relative;
  z-index: 2;
  width: 90%;
  margin-bottom: 24px;
  background: var(--silver);
  border: 3px outset #fff;
  padding: 8px;
  font-family: Verdana, sans-serif;
  font-size: 12px;
}
.dialup-bar {
  height: 18px;
  border: 2px inset #888;
  background: repeating-linear-gradient(90deg, #008 0 12px, transparent 12px 16px);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  background-color: #fff;
  animation: dialup 6.5s steps(13) forwards;
  margin-bottom: 6px;
}
@keyframes dialup { to { background-size: 104% 100%; } }
#splashBtn {
  position: relative;
  z-index: 2;
  width: 92%;
  margin-bottom: max(28px, env(safe-area-inset-bottom));
  font-size: 24px;
  min-height: 72px;
  animation: pulse96 0.9s ease-in-out infinite alternate;
  background: linear-gradient(90deg, #f99, #ff9, #9f9, #99f, #f9f);
}
@keyframes pulse96 { from { transform: scale(1); } to { transform: scale(1.06); } }

/* ---------- AOL reconnect overlay ---------- */

#aol {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 60, 0.92);
  color: var(--yellow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: Verdana, sans-serif;
  padding: 24px;
}
#aol .dialup { width: 100%; max-width: 420px; color: #000; }
#aol .dialup-bar { animation: dialup 4s steps(13) infinite; }

/* ---------- team badge ---------- */

.badge-screen {
  min-height: 70dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 6px ridge var(--yellow);
  box-shadow: 6px 6px 0 #000;
  margin: 12px 0;
  padding: 24px 12px;
  color: #fff;
}
.badge-screen .emoji { font-size: 84px; line-height: 1.1; }
.badge-screen .teamname { font-size: 11vw; margin: 4px 0; }
.badge-screen .myname {
  font-family: Verdana, sans-serif;
  font-size: 24px;
  font-weight: bold;
  background: #fff;
  color: #000;
  border: 3px solid #000;
  padding: 6px 18px;
  margin-top: 14px;
  transform: rotate(-2deg);
}
.roster {
  font-family: Verdana, sans-serif;
  font-size: 16px;
  margin-top: 16px;
  background: rgba(0,0,0,.35);
  padding: 8px 14px;
}

/* ---------- question ---------- */

.qtext { font-size: 24px; font-weight: bold; line-height: 1.25; }
.qimg { width: 100%; border: 3px solid #000; margin: 10px 0; }
.scrollhint {
  text-align: center;
  font-family: Verdana, sans-serif;
  font-weight: bold;
  font-size: 14px;
  background: var(--yellow);
  border: 3px solid #000;
  padding: 6px;
  margin: 8px 0;
}
/* compact variant for JUDGING: captions must fit on screen without scrolling */
.qimg.small {
  width: auto;
  max-width: 100%;
  max-height: 26vh;
  display: block;
  margin: 10px auto;
}
.unit-hint { font-family: Verdana, sans-serif; font-size: 14px; color: #333; }

.timerbar {
  height: 16px;
  border: 2px inset #888;
  background: #fff;
  margin: 8px 0;
  overflow: hidden;
}
.timerbar > div {
  height: 100%;
  background: repeating-linear-gradient(90deg, #d00 0 10px, #ff0 10px 20px);
}

.locked-answer {
  font-size: 40px;
  font-weight: bold;
  text-align: center;
  font-family: "Courier New", monospace;
}

/* ---------- reveal ---------- */

.starburst-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  overflow: hidden;
}
.starburst {
  position: absolute;
  width: 420px;
  height: 420px;
  background: repeating-conic-gradient(#ffdd00 0deg 12deg, #ff8800 12deg 24deg);
  border-radius: 50%;
  animation: spin96 14s linear infinite;
}
.bignum {
  position: relative;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 64px;
  background: #fff;
  border: 4px solid #000;
  padding: 4px 22px;
  transform: rotate(-3deg);
}
.winnerbanner {
  text-align: center;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 26px;
  color: #fff;
  background: #d00;
  border: 4px ridge var(--yellow);
  padding: 10px;
  margin: 10px 0;
  animation: flashbg 0.6s steps(2, start) infinite;
}
@keyframes flashbg {
  0% { background: #d00; color: #ff0; }
  50% { background: #00d; color: #fff; }
}
.okan-vs {
  background: #000;
  color: #0f0;
  font-family: "Courier New", monospace;
  font-size: 18px;
  padding: 10px;
  border: 3px double #0f0;
  margin: 10px 0;
  text-align: center;
}

/* ---------- leaderboard ---------- */

.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 3px solid #000;
  margin: 8px 0;
  padding: 10px;
  background: #fff;
  font-family: Verdana, sans-serif;
}
.lb-row.me { outline: 4px dashed #f0f; outline-offset: 2px; }
.lb-row .rank { font-size: 26px; font-weight: bold; width: 38px; }
.lb-row .tname { flex: 1; font-weight: bold; }
.lb-row .score {
  font-family: "Courier New", monospace;
  font-size: 28px;
  font-weight: bold;
}
.face-wallpaper {
  background-image: url("/static/img/hero.jpg");
  background-size: 72px 72px;
}
.face-wallpaper::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 60, 0.82);
  pointer-events: none;
  z-index: -1;
}

/* ---------- host panel ---------- */

.host-section {
  background: #fffff0;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  margin: 12px 0;
  padding: 10px;
  font-family: Verdana, sans-serif;
  font-size: 14px;
}
.host-section h2 {
  font-family: Verdana, sans-serif;
  font-size: 15px;
  background: var(--deep);
  color: var(--yellow);
  margin: -10px -10px 10px;
  padding: 7px 10px;
}
.host-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 0;
  border-bottom: 1px dotted #999;
}
.host-row:last-child { border-bottom: none; }
.team-dot {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid #000;
}
.phasechip {
  display: inline-block;
  font-weight: bold;
  background: var(--yellow);
  border: 2px solid #000;
  padding: 3px 8px;
}
.stopwatch-display {
  font-family: "Courier New", monospace;
  font-size: 54px;
  font-weight: bold;
  text-align: center;
  background: #000;
  color: #0f0;
  border: 4px inset #888;
  padding: 6px;
  margin: 8px 0;
}

.msg-error {
  background: #fdd;
  border: 3px solid #d00;
  color: #900;
  font-family: Verdana, sans-serif;
  font-weight: bold;
  padding: 10px;
  margin: 8px 0;
}
.msg-ok {
  background: #dfd;
  border: 3px solid #080;
  color: #050;
  font-family: Verdana, sans-serif;
  font-weight: bold;
  padding: 10px;
  margin: 8px 0;
}

/* ---------- debug mode ---------- */

.debug-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #000;
  border-bottom: 3px solid #f0f;
  padding: 6px 8px;
  font-family: Verdana, sans-serif;
  font-size: 12px;
  color: #f0f;
}
.debug-bar .lbl { flex: 1; text-align: center; }
body.debug .page { padding-top: 72px; }

.hidden { display: none !important; }
.center { text-align: center; }
.small-print { font-size: 12px; font-family: Verdana, sans-serif; color: #444; }
a { color: var(--blue); }
a:visited { color: var(--visited); }
