:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent-red: #dc2626;
  --accent-red-hover: #b91c1c;
  --accent-gold: #f59e0b;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s ease;
  --nav-height: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*:focus { outline: none; }
button:focus, a:focus, input:focus, iframe:focus { outline: none; box-shadow: none; }

html {
  scroll-behavior: smooth;
  background: #000;
  color: var(--text-primary);
}

body {
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background: #000;
}

#static-promo-banner {
  display: block;
  margin-top: var(--nav-height);
  background: linear-gradient(90deg, #991b1b, #dc2626, #b91c1c);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.5px;
}

#static-promo-banner strong {
  background: #fff;
  color: #991b1b;
  padding: 2px 6px;
  border-radius: 4px;
  margin: 0 4px;
}

#grimaldi-unified-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 20px;
  z-index: 100000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.menu-toggle-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  z-index: 10;
}

#grimaldi-nav-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#grimaldi-nav-logo img {
  height: 44px;
  width: auto;
  max-width: min(280px, 58vw);
  object-fit: contain;
  display: block;
}

#grimaldiMenuBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#grimaldiMenuBackdrop.open { opacity: 1; pointer-events: auto; }

#grimaldiMenuDrawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: #080808;
  border-right: 1px solid var(--border-subtle);
  z-index: 1200;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#grimaldiMenuDrawer.open { transform: translateX(0); }

.drawer-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title { font-weight: 900; letter-spacing: 1px; }
.drawer-close-btn { background: none; border: none; color: var(--text-secondary); font-size: 1.2rem; cursor: pointer; }
.drawer-section-title {
  padding: 12px 20px 6px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}

.grit-nav-link {
  padding: 10px 20px;
  color: #ffffff;
  text-decoration: none;
  font-family: "Oswald", "Anton", Impact, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  border-left: 3px solid transparent;
}

.grit-nav-link:hover { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.grit-nav-link.active-channel {
  color: #ffffff;
  border-left-color: #ffffff;
}

.main-stage-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.broadcast-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.live-indicator-cluster, .stream-controls-quick {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 50%;
  animation: live-pulse-anim 1.5s infinite;
}

@keyframes live-pulse-anim {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

.badge-stream-metric {
  background: #0d0d0d;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-pill {
  background: #0e0e0e;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
}

.btn-pill:hover { background: #1a1a1a; }

.broadcast-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.broadcast-grid.theater-mode { grid-template-columns: 1fr; }
.broadcast-grid.theater-mode .stream-chat-col { margin-top: 24px; }

.player-outer-wrapper {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.player-aspect-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.player-aspect-ratio iframe,
.standby-loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  box-shadow: none;
}

.standby-loop {
  object-fit: cover;
  background: #000;
  z-index: 1;
}

.player-aspect-ratio iframe { z-index: 2; }
.player-aspect-ratio iframe.hidden,
.standby-loop.hidden,
#liveStatusBadge.hidden { display: none; }

.standby-screen {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.35) 38%, rgba(0, 0, 0, 0.12) 100%);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 24px 20px 28px;
  z-index: 10;
  pointer-events: none;
}

.standby-screen.active { display: flex; }
.standby-screen .btn-pill { pointer-events: auto; }

.standby-copy { margin-bottom: 14px; }

.standby-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.standby-desc {
  color: #e4e4e7;
  font-size: 0.92rem;
  max-width: 560px;
  margin: 0 auto;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.countdown-timer-box { display: flex; gap: 12px; margin-bottom: 8px; }

.time-card {
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  min-width: 68px;
}

.time-val {
  font-size: 1.8rem;
  font-weight: 900;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--accent-gold);
  line-height: 1;
}

.time-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 4px;
}

.player-meta-bar {
  background: #0a0a0a;
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
}

.player-title-info h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.player-title-info p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.stream-chat-col {
  background: #0a0a0a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: 640px;
  overflow: hidden;
}

.chat-tabs-header {
  display: flex;
  background: #000;
  border-bottom: 1px solid var(--border-subtle);
}

.chat-tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 12px 6px;
  cursor: pointer;
}

.chat-tab-btn.active {
  color: #fff;
  border-bottom-color: #ffffff;
  background: transparent;
}

.chat-body-container { flex: 1; position: relative; overflow: hidden; }

.chat-tab-content {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
}

.chat-tab-content.active { display: flex; }

.chat-messages-scroll, .watch-also-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  background: #111;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.chat-msg.host-msg,
.chat-msg.user-msg { background: #111; }

.msg-header { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.msg-author { font-weight: 700; font-size: 0.8rem; }
.msg-time { font-size: 0.7rem; color: var(--text-muted); margin-left: auto; }
.msg-text { color: #e4e4e7; line-height: 1.35; word-break: break-word; }

.msg-badge {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--accent-red);
}

.chat-input-wrapper {
  padding: 12px;
  background: #000;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
}

.chat-input-field {
  flex: 1;
  background: #141414;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.chat-input-field:focus { border-color: rgba(255, 255, 255, 0.28); }

.btn-send-chat {
  background: var(--accent-red);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

.watch-also-desc { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 4px; }

.syndication-section, .vods-section {
  margin-top: 40px;
}

.syndication-section {
  background: #0a0a0a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-head-title { font-size: 1.25rem; font-weight: 900; }

.syndication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.platform-btn {
  background: #121212;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
}

.platform-btn:hover { background: #1c1c1c; }

.vods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.vod-card {
  background: #0a0a0a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vod-card:hover { border-color: rgba(255, 255, 255, 0.28); }

.vod-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  display: block;
}

.vod-thumb-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vod-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.vod-card:hover .vod-play-overlay { opacity: 1; }

.vod-play-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-red);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vod-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }

.vod-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.vod-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.vod-title a { color: inherit; text-decoration: none; }

.vod-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.ep-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ep-link-btn {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e4e4e7;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-main {
  background: #000;
  border-top: 1px solid var(--border-subtle);
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-inner { max-width: 1440px; margin: 0 auto; }
.footer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-brand-info { display: flex; align-items: center; gap: 14px; }
.footer-brand-info img { height: 44px; border-radius: 4px; }
.footer-brand-info h4 { font-size: 0.95rem; }
.footer-brand-info p { font-size: 0.8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: #fff; text-decoration: none; font-size: 0.85rem; font-weight: 600; }

.footer-bottom-copy {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .broadcast-grid { grid-template-columns: 1fr; }
  .stream-chat-col { height: 420px; }
}

@media (max-width: 640px) {
  #grimaldi-unified-nav { padding: 0 12px; }
  #grimaldi-nav-logo img { height: 40px; }
  .main-stage-container { padding: 14px 10px 40px; }
  .time-card { min-width: 54px; padding: 8px 10px; }
  .time-val { font-size: 1.4rem; }
  .standby-title { font-size: 1.05rem; }
}
