/* ============================================================
   90BBALL.COM — Retro CRT Broadcast Stylesheet
   ============================================================ */

/* --- Google Fonts already loaded in HTML --- */

:root {
  --orange:   #ff6b00;
  --cyan:     #00e5ff;
  --pink:     #ff0080;
  --green:    #00ff41;
  --purple:   #da70d6;
  --yellow:   #ffe600;
  --bg:       #080808;
  --bg2:      #111118;
  --bg3:      #1a1a2e;
  --border:   #333355;
  --text:     #e0e0e0;
  --dim:      #888899;
  --font-head: 'Press Start 2P', monospace;
  --font-stat: 'Orbitron', sans-serif;
  --font-body: 'VT323', monospace;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== CRT SCANLINES ===== */
.crt-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

/* ===== ANIMATIONS ===== */
@keyframes flicker {
  0%, 98%, 100% { opacity: 1; }
  99%            { opacity: 0.85; }
}
@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 6px currentColor, 0 0 20px currentColor; }
  50%       { text-shadow: 0 0 12px currentColor, 0 0 40px currentColor, 0 0 60px currentColor; }
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== UTILITY ===== */
.neon-orange { color: var(--orange); }
.neon-cyan   { color: var(--cyan); }
.neon-pink   { color: var(--pink); }
.neon-green  { color: var(--green); }
.hidden      { display: none !important; }

/* ===== HEADER ===== */
.site-header {
  background: var(--bg2);
  border-bottom: 2px solid var(--orange);
  box-shadow: 0 4px 30px rgba(255, 107, 0, 0.25);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-text {
  font-family: var(--font-head);
  font-size: clamp(22px, 5vw, 48px);
  color: var(--orange);
  text-shadow: 0 0 8px var(--orange), 0 0 24px var(--orange);
  letter-spacing: 2px;
  animation: flicker 8s infinite;
}
.logo-dot { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }

.logo-tagline {
  font-family: var(--font-stat);
  font-size: clamp(8px, 1.5vw, 13px);
  color: var(--cyan);
  letter-spacing: 3px;
  margin-top: 6px;
}

.header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-family: var(--font-stat);
  font-size: 12px;
}

.live-bug {
  color: #ff2222;
  font-weight: 700;
  letter-spacing: 2px;
  animation: blink 1.2s infinite;
}
.header-date { color: var(--dim); font-size: 11px; }

/* ===== TICKER ===== */
.ticker-wrap {
  background: var(--orange);
  overflow: hidden;
  white-space: nowrap;
  padding: 5px 0;
}
.ticker-track {
  display: inline-block;
  animation: ticker-scroll 45s linear infinite;
  font-family: var(--font-stat);
  font-size: 11px;
  font-weight: 700;
  color: #000;
  letter-spacing: 1px;
}
.ticker-track:hover { animation-play-state: paused; }

/* ===== MAIN LAYOUT ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== PANELS ===== */
.panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  position: relative;
}

.panel-label {
  font-family: var(--font-stat);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

/* ===== TOP ROW ===== */
.top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 720px) {
  .top-row { grid-template-columns: 1fr; }
}
.top-row-placeholder {
  min-height: 200px;
  border: 1px dashed rgba(255, 107, 0, 0.2);
  border-radius: 4px;
}

/* ===== TV FRAME ===== */
.highlight-panel { display: flex; flex-direction: column; }

.tv-frame {
  background: #1a1a1a;
  border: 6px solid #2a2a2a;
  border-radius: 18px 18px 8px 8px;
  box-shadow:
    inset 0 0 30px rgba(0,0,0,0.8),
    0 0 20px rgba(0, 229, 255, 0.15),
    0 8px 0 #111;
  overflow: hidden;
  flex: 1;
}

.tv-screen {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
  overflow: hidden;
}
.tv-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 1;
}
.tv-screen iframe { position: relative; z-index: 0; }

.tv-base {
  height: 12px;
  background: linear-gradient(#2a2a2a, #111);
}

.highlight-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.channel-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-channel {
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 1px;
  min-width: 52px;
}

.highlight-counter {
  font-family: var(--font-stat);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 2px;
  min-width: 42px;
  text-align: center;
}

.highlight-title {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--dim);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlight-limit-msg {
  font-family: var(--font-stat);
  font-size: 10px;
  color: var(--orange);
  letter-spacing: 1px;
  margin-top: 6px;
  padding: 6px 10px;
  border: 1px dashed var(--orange);
  border-radius: 3px;
}

.league-pass-cta {
  display: block;
  margin-top: 12px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: var(--font-stat);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}
.league-pass-cta:hover {
  background: var(--orange);
  color: #000;
}

/* ===== ON THIS DAY ===== */
.otd-panel { overflow: hidden; }

.otd-content { font-family: var(--font-body); font-size: 20px; }

.otd-game {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 14px;
  animation: slide-in 0.4s ease;
}

.otd-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.otd-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.otd-team-name {
  font-family: var(--font-stat);
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
  text-align: center;
}
.otd-score {
  font-family: var(--font-stat);
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 900;
  color: var(--orange);
  text-shadow: 0 0 10px var(--orange);
}
.otd-vs {
  font-family: var(--font-stat);
  font-size: 12px;
  color: var(--dim);
  padding: 0 8px;
}

.otd-performers {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.otd-performer-row {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  color: var(--text);
  padding: 2px 0;
}
.otd-performer-row span:last-child { color: var(--green); }

.otd-news {
  background: var(--bg3);
  border-left: 3px solid var(--pink);
  padding: 12px 14px;
  border-radius: 0 4px 4px 0;
  animation: slide-in 0.4s ease 0.1s both;
}
.otd-news-label {
  font-family: var(--font-stat);
  font-size: 10px;
  color: var(--pink);
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.otd-news-headline {
  font-size: 22px;
  color: var(--text);
  line-height: 1.4;
}
.otd-news-detail {
  font-size: 17px;
  color: var(--dim);
  margin-top: 4px;
}

.otd-no-game {
  color: var(--dim);
  font-size: 18px;
  font-style: italic;
  padding: 12px 0;
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
  font-family: var(--font-stat);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 3px;
  padding: 24px 0;
  text-align: center;
  animation: blink 1s infinite;
}

/* ===== AD ROW ===== */
.ad-row { text-align: center; }
.adsense-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(728px, 100%);
  height: 90px;
  border: 1px dashed var(--border);
  color: var(--dim);
  font-family: var(--font-stat);
  font-size: 10px;
  letter-spacing: 2px;
}

/* ===== CHAT PANEL ===== */
.chat-panel { position: relative; overflow: hidden; }

.question-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-stat);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--dim);
  margin-bottom: 20px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: fit-content;
}
.counter-value {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.counter-slash, .counter-total { color: var(--dim); font-size: 14px; }

/* ===== CHARACTER ROW ===== */
.character-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.character-card {
  flex: 1;
  min-width: 140px;
  max-width: 220px;
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 14px 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.character-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.character-card:hover { transform: translateY(-3px); }
.character-card.active {
  transform: translateY(-4px);
}

.char-portrait {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  display: block;
  margin: 0 auto 10px;
  background: var(--bg3);
}
.char-portrait-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin: 0 auto 10px;
  background: var(--bg3);
  border: 3px solid var(--border);
}

.char-name {
  font-family: var(--font-stat);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.char-catchphrase {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--dim);
  line-height: 1.3;
}

/* ===== CHAT INPUT ===== */
.chat-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.question-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 20px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.question-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}
.question-input::placeholder { color: var(--dim); }

/* ===== BUTTONS ===== */
.btn-retro {
  background: transparent;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: var(--font-stat);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  text-transform: uppercase;
  white-space: nowrap;
}
.btn-retro:hover {
  background: var(--orange);
  color: #000;
  box-shadow: 0 0 16px rgba(255, 107, 0, 0.5);
}
.btn-retro:disabled {
  border-color: var(--dim);
  color: var(--dim);
  cursor: not-allowed;
}
.btn-retro:disabled:hover { background: transparent; color: var(--dim); box-shadow: none; }

.btn-ask {
  font-size: 12px;
  padding: 10px 24px;
}

/* ===== RESPONSE AREA ===== */
.response-area { min-height: 60px; }

.speech-bubble {
  background: var(--bg3);
  border-radius: 6px;
  padding: 18px 20px;
  position: relative;
  animation: slide-in 0.35s ease;
  border-left: 4px solid var(--orange);
}
.speech-bubble::before {
  content: '';
  position: absolute;
  top: 20px;
  left: -12px;
  border: 6px solid transparent;
  border-right-color: var(--orange);
}

.bubble-header {
  font-family: var(--font-stat);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.bubble-text {
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.5;
  color: var(--text);
}
.bubble-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.btn-play {
  border-color: var(--cyan);
  color: var(--cyan);
  font-size: 10px;
  padding: 6px 14px;
}
.btn-play:hover {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

/* ===== LIMIT OVERLAY ===== */
.limit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(4px);
}
.limit-message { text-align: center; padding: 24px; }
.limit-headline {
  font-family: var(--font-head);
  font-size: clamp(14px, 3vw, 24px);
  color: var(--orange);
  text-shadow: 0 0 12px var(--orange);
  margin-bottom: 16px;
  animation: glow-pulse 2s infinite;
}
.limit-sub {
  font-family: var(--font-body);
  font-size: 24px;
  color: var(--text);
  margin-bottom: 12px;
}
.limit-countdown { font-family: var(--font-stat); font-size: 14px; color: var(--dim); }

/* ===== AWARDS PANEL ===== */
.awards-panel { }

.award-day-header {
  font-family: var(--font-stat);
  font-size: clamp(10px, 2vw, 14px);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--orange);
  text-shadow: 0 0 8px var(--orange);
  margin-bottom: 20px;
  animation: glow-pulse 3s infinite;
}

/* Today's award card */
.award-revealed {
  margin-bottom: 24px;
}
.award-card-today {
  background: linear-gradient(135deg, var(--bg3), var(--bg));
  border: 2px solid var(--yellow);
  border-radius: 6px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  animation: slide-in 0.4s ease;
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.1);
}
.award-trophy {
  font-size: 52px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(255, 230, 0, 0.5));
}
.award-info { flex: 1; min-width: 0; }
.award-category {
  font-family: var(--font-stat);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--yellow);
  margin-bottom: 4px;
}
.award-winner-name {
  font-family: var(--font-stat);
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 4px;
}
.award-team {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--dim);
  margin-bottom: 4px;
}
.award-stat {
  font-family: var(--font-stat);
  font-size: 13px;
  color: var(--green);
  font-weight: 700;
}
.award-season {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--dim);
}

/* Locked grid */
.award-grid-label {
  font-family: var(--font-stat);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--dim);
  margin-bottom: 12px;
}
.award-locked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.award-locked-card {
  border: 1px dashed var(--border);
  border-radius: 4px;
  padding: 14px 12px;
  text-align: center;
  background: var(--bg);
  filter: brightness(0.6);
}
.award-locked-day {
  font-family: var(--font-stat);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--dim);
  margin-bottom: 6px;
}
.award-locked-category {
  font-family: var(--font-stat);
  font-size: 10px;
  color: var(--cyan);
  font-weight: 700;
  margin-bottom: 8px;
}
.award-locked-name {
  font-family: var(--font-body);
  font-size: 18px;
  color: transparent;
  background: var(--dim);
  border-radius: 3px;
  user-select: none;
  display: inline-block;
  padding: 0 4px;
  filter: blur(5px);
  margin-bottom: 4px;
}
.award-locked-cta {
  font-family: var(--font-stat);
  font-size: 8px;
  color: var(--dim);
  letter-spacing: 1px;
  display: block;
}

.streak-counter {
  font-family: var(--font-stat);
  font-size: 11px;
  color: var(--orange);
  letter-spacing: 1px;
  min-height: 20px;
}

/* ===== SATURDAY REST DAY ===== */
.award-rest-day {
  text-align: center;
  padding: 40px 20px;
  font-family: var(--font-body);
  font-size: 24px;
  color: var(--dim);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  margin-top: 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-brand {
  font-family: var(--font-stat);
  font-size: 12px;
  color: var(--orange);
  letter-spacing: 2px;
}
.footer-links {
  font-family: var(--font-body);
  font-size: 18px;
}
.footer-links a {
  color: var(--cyan);
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }
.footer-legal {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--dim);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.4;
}

/* ===== KO-FI FLOAT ===== */
.kofi-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: var(--bg2);
  border: 1px solid var(--orange);
  color: var(--orange);
  font-size: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(255, 107, 0, 0.3);
  transition: box-shadow 0.2s, transform 0.2s;
}
.kofi-float:hover {
  box-shadow: 0 0 28px rgba(255, 107, 0, 0.6);
  transform: scale(1.08);
}

/* ===== CHARACTER PORTRAIT FOCAL POINTS ===== */
img.char-portrait[src*="marvelous-marv"]  { object-position: 50% 25%; }
img.char-portrait[src*="whiteboard-mike"] { object-position: 38% 25%; }
img.char-portrait[src*="sideline-storm"]  { object-position: 14% 28%; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .character-card { min-width: 110px; }
  .award-locked-grid { grid-template-columns: repeat(2, 1fr); }
  .chat-input-row { flex-direction: column; }
  .btn-ask { width: 100%; }
  .header-meta { display: none; }
}
