:root {
  --bg-core: #050507;
  --bg-card: #0e0e12;
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --accent-red: #ff0033;
  --accent-red-hover: #e6002e;
  --accent-red-glow: rgba(255, 0, 51, 0.35);
  --text-primary: #ffffff;
  --text-muted: #8e8e99;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *:before, *:after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html, body { 
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-core); 
  color: var(--text-primary); 
  font-family: var(--font-body); 
  height: 100vh;
  height: 100dvh; /* Dynamic Mobile Viewport Height */
  -webkit-font-smoothing: antialiased;
}

body {
  overflow: hidden;
  position: fixed; /* Hard lock to prevent elastic mobile browser bounce */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* --- Global Form & Submission Page Overflow Containment --- */
.submit-page-wrapper,
.submission-container,
.artist-submit-card,
.form-card {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

input[type="text"],
input[type="number"],
input[type="url"],
textarea,
select,
.input-group,
.form-row {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* --- TV-MA Interstitial Warning (Adult Swim Style Bump) --- */
#warning-screen {
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh;
  height: 100dvh;
  background-color: #000; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  z-index: 9999;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1); 
  cursor: pointer; 
  padding: 2rem;
}

.bump-card {
  text-align: center;
  max-width: 520px;
}

.rating-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  border: 3px solid #fff;
  padding: 4px 16px;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.bump-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #ccc;
  font-weight: 400;
  margin-bottom: 2.5rem;
}

.bump-cta {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  animation: pulseOpacity 2s infinite ease-in-out;
}

@keyframes pulseOpacity {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* --- Free Preview Banner --- */
#preview-banner {
  position: absolute; 
  top: max(16px, env(safe-area-inset-top, 16px)); 
  left: 50%; 
  transform: translateX(-50%);
  background: rgba(14, 14, 18, 0.85);
  border: 1px solid rgba(255, 0, 51, 0.4);
  backdrop-filter: blur(12px);
  color: #fff; 
  font-size: 0.75rem; 
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 8px 20px; 
  border-radius: 30px; 
  z-index: 500; 
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.preview-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-red);
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

/* --- Video Player Shell --- */
.player-container { 
  position: relative; 
  width: 100vw; 
  height: 100vh; 
  height: 100dvh;
  display: flex; 
  justify-content: center; 
  align-items: center; 
  background: #000;
  overflow: hidden;
}

video { 
  width: 100%; 
  height: 100%; 
  object-fit: contain; 
  pointer-events: none; 
}

/* --- Custom UI Controls Overlay --- */
.ui-overlay { 
  position: absolute; 
  bottom: max(24px, env(safe-area-inset-bottom, 24px)); 
  left: 24px; 
  right: 24px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  z-index: 100; 
  pointer-events: auto;
}

.stream-metadata {
  display: flex;
  align-items: center;
  background: rgba(10, 10, 14, 0.65);
  backdrop-filter: blur(16px);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--bg-card-border);
  max-width: 100%;
}

.badge-live { 
  background-color: var(--accent-red); 
  color: #fff; 
  font-family: var(--font-display);
  font-size: 0.7rem; 
  font-weight: 800; 
  padding: 3px 8px; 
  border-radius: 4px; 
  letter-spacing: 0.15em; 
  flex-shrink: 0;
}

.show-info { 
  margin-left: 12px; 
  font-size: 0.9rem; 
  font-weight: 600; 
  color: #f0f0f5; 
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Timed Trivia Slide-In Drawer (Positioned Past Left HUD Icons) --- */
#trivia-drawer {
  position: absolute; 
  bottom: 80px; 
  left: 78px; /* Offsets past left sidebar buttons (24px + 42px + 12px gap) */
  width: 320px;
  max-width: calc(100vw - 96px);
  height: auto; 
  background: rgba(14, 14, 18, 0.92); 
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 3px solid var(--accent-red);
  border-top: 1px solid var(--bg-card-border);
  border-right: 1px solid var(--bg-card-border);
  border-bottom: 1px solid var(--bg-card-border);
  padding: 1.2rem; 
  border-radius: 12px; 
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  transform: translateX(calc(-100% - 100px)); /* Off-screen hidden state */
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease, bottom 0.35s ease; 
  opacity: 0;
  z-index: 200;
  pointer-events: none;
}

#trivia-drawer.active { 
  transform: translateX(0); /* Slides cleanly out past the toggle icons */
  opacity: 1;
  pointer-events: auto;
}

#trivia-drawer.disabled {
  display: none !important;
}

.trivia-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.75rem; 
  font-weight: 800;
  color: var(--accent-red); 
  letter-spacing: 0.15em;
  margin-bottom: 0.6rem; 
}

#trivia-drawer p { 
  font-size: 0.85rem; 
  line-height: 1.5; 
  color: #ddd; 
}

/* --- Rating Modal Granular Layout --- */
.rating-card {
  max-width: 480px;
  width: 100%;
}

.rating-categories-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 1.5rem 0;
}

.rating-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--bg-card-border);
}

.rating-row-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ddd;
}

.req-asterisk {
  color: var(--accent-red);
  margin-left: 2px;
}

.star-rating { 
  display: flex; 
  gap: 6px; 
  font-size: 1.25rem; 
  cursor: pointer; 
  color: #2a2a35; 
}

.star-rating .star {
  transition: transform 0.15s ease, color 0.15s ease;
}

.star-rating .star:hover {
  transform: scale(1.2);
}

.star-rating .star.active { 
  color: #ffca28; 
  text-shadow: 0 0 10px rgba(255, 202, 40, 0.4);
}

/* --- Generic Action Buttons & Grayscale Disabled State --- */
.btn-action-primary {
  width: 100%;
  background: var(--accent-red);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px var(--accent-red-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-action-primary:hover:not(:disabled) {
  background: var(--accent-red-hover);
  transform: translateY(-1px);
}

.btn-action-primary:disabled,
.btn-action-primary.btn-disabled {
  background: #2a2a35 !important;
  color: #666 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  filter: grayscale(1) !important;
  opacity: 0.4 !important;
}

/* --- Modal Overlays & Glass Cards --- */
.modal-overlay {
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh;
  height: 100dvh;
  background: rgba(3, 3, 5, 0.85); 
  backdrop-filter: blur(20px); 
  z-index: 10000;
  justify-content: center; 
  align-items: center; 
  padding: 1rem;
}

.modal-overlay.active { display: flex; }

.paywall-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 2.2rem;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  scrollbar-width: none;
  text-align: center;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
}

.paywall-card::-webkit-scrollbar { display: none; }

.modal-close {
  position: absolute; 
  top: 18px; 
  right: 20px;
  background: rgba(255, 255, 255, 0.05); 
  border: 1px solid var(--bg-card-border); 
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: #888;
  font-size: 0.9rem; 
  cursor: pointer; 
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover { 
  background: rgba(255, 255, 255, 0.15);
  color: #fff; 
}

.paywall-card h2 { 
  font-family: var(--font-display);
  font-size: 1.7rem; 
  font-weight: 800;
  margin-bottom: 0.4rem; 
}

.paywall-card .sub-text { 
  font-size: 0.85rem; 
  color: var(--text-muted); 
  margin-bottom: 1.8rem; 
  line-height: 1.5; 
}

.impact-box {
  display: flex; 
  justify-content: space-around; 
  background: rgba(255, 255, 255, 0.02); 
  border: 1px solid var(--bg-card-border);
  border-radius: 12px; 
  padding: 1rem; 
  margin-bottom: 1.5rem;
}

.impact-stat .value { 
  font-family: var(--font-display);
  font-size: 1.3rem; 
  font-weight: 800; 
  color: var(--accent-red); 
}

.impact-stat .label { 
  font-size: 0.65rem; 
  color: var(--text-muted); 
  text-transform: uppercase; 
  letter-spacing: 0.08em;
  margin-top: 4px; 
}

.auth-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 1.5rem 0;
}

.btn-auth {
  width: 100%; 
  padding: 12px 18px; 
  border-radius: 10px; 
  border: 1px solid var(--bg-card-border); 
  font-weight: 600;
  font-size: 0.9rem; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 12px;
  transition: all 0.2s ease;
}

.btn-google { 
  background: #ffffff; 
  color: #000000; 
}
.btn-google:hover {
  background: #f0f0f5;
  transform: translateY(-1px);
}

.btn-magic { 
  background: rgba(255, 255, 255, 0.05); 
  color: #fff; 
}
.btn-magic:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.settings-detail { 
  text-align: left; 
  margin: 1.5rem 0; 
  background: rgba(255, 255, 255, 0.02); 
  padding: 1.2rem; 
  border-radius: 12px; 
  border: 1px solid var(--bg-card-border); 
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.setting-label { color: var(--text-muted); }
.setting-value { font-weight: 600; color: #fff; }

.alias-row {
  align-items: center;
}

.alias-input-wrap {
  display: flex;
  gap: 8px;
}

.alias-input-wrap input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  border-radius: 6px;
  padding: 4px 10px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  width: 140px;
}

.alias-input-wrap input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-sm-save {
  background: var(--accent-red);
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-sm-save:hover {
  background: var(--accent-red-hover);
}

.artist-card {
  text-align: left; 
  background: rgba(99, 91, 255, 0.05); 
  padding: 1.2rem; 
  border-radius: 12px; 
  border: 1px solid rgba(99, 91, 255, 0.2); 
  margin-bottom: 1.5rem;
}

.artist-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #635bff;
  margin-bottom: 0.4rem;
}

.artist-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.4;
}

.btn-stripe-connect {
  width: 100%;
  background: #635bff;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.btn-stripe-connect:hover {
  background: #544dc9;
}

.status-subtext {
  font-size: 0.75rem; 
  color: var(--text-muted); 
  margin-top: 8px; 
  text-align: center;
}

.payment-icons { 
  display: flex; 
  justify-content: center; 
  gap: 12px; 
  margin: 1.2rem 0 0.4rem 0; 
  font-size: 0.75rem; 
  color: var(--text-muted); 
}

.trust-badge { 
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem; 
  color: var(--text-muted); 
  margin-top: 0.8rem; 
}

/* --- HUD Sidebars (Left & Right) --- */
.hud-sidebar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 500;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.hud-sidebar.left { left: 24px; }
.hud-sidebar.right { right: 24px; align-items: flex-end; }

/* Stylized Red HUD Auth Button */
.hud-btn-red {
  background: var(--accent-red);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px var(--accent-red-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.hud-btn-red:hover {
  background: var(--accent-red-hover);
  transform: scale(1.03);
  box-shadow: 0 6px 24px rgba(255, 0, 51, 0.5);
}

.hud-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(14, 14, 18, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-icon-btn:hover {
  background: rgba(25, 25, 32, 0.9);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.hud-icon-btn.active,
.hud-icon-btn.unlocked {
  color: var(--accent-red);
  border-color: rgba(255, 0, 51, 0.4);
  box-shadow: 0 0 12px rgba(255, 0, 51, 0.25);
}

/* --- Message Terminal Box (Positioned Right Side) --- */
.terminal-overlay,
#message-terminal {
  position: fixed;
  right: 80px;
  left: auto !important;
  bottom: 84px;
  width: 340px;
  max-width: calc(100vw - 100px);
  background: rgba(10, 10, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 10px 14px;
  z-index: 9980;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transform-origin: bottom right;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, max-height 0.35s ease;
  opacity: 0;
  transform: scale(0.8) translate(30px, 20px);
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

#message-terminal.active {
  opacity: 1;
  transform: scale(1) translate(0, 0);
  pointer-events: auto;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pulse {
  width: 6px;
  height: 6px;
  background: #00f2fe;
  border-radius: 50%;
  box-shadow: 0 0 8px #00f2fe;
}

.terminal-actions { 
  display: flex; 
  gap: 6px; 
}

.btn-terminal-ctrl {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: #a0a0b0;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-terminal-ctrl:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-terminal-ctrl .chevron-icon {
  transition: transform 0.3s ease;
}

#message-terminal.expanded .btn-terminal-ctrl .chevron-icon {
  transform: rotate(180deg);
}

.terminal-cta-bar {
  background: rgba(255, 0, 51, 0.15);
  border: 1px solid rgba(255, 0, 51, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.terminal-cta-bar:hover {
  background: var(--accent-red);
  box-shadow: 0 2px 12px var(--accent-red-glow);
}

#terminal-cta-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.terminal-history-list {
  max-height: 64px; 
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  line-height: 1.35;
  scrollbar-width: none;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.terminal-history-list::-webkit-scrollbar { display: none; }

#message-terminal.expanded .terminal-history-list {
  max-height: 240px; 
}

/* Chat Warning Box Styling */
.terminal-warning-box {
  background: rgba(255, 0, 51, 0.12);
  border: 1px solid rgba(255, 0, 51, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin: 6px 0;
  text-align: center;
}

.terminal-warning-box .warning-icon {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

#terminal-warning-text {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #f0f0f5;
  font-weight: 500;
}

.chat-msg-row {
  word-break: break-word;
}

.chat-user {
  font-weight: 700;
  color: #00f2fe;
  margin-right: 6px;
}

.chat-text {
  color: #e0e0e0;
}

.terminal-input-wrap {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.terminal-input-wrap input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  border-radius: 6px;
  padding: 6px 10px;
  color: #fff;
  font-size: 0.8rem;
  outline: none;
}

.terminal-input-wrap input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-chat-send {
  background: var(--accent-red);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-chat-send:hover {
  background: var(--accent-red-hover);
}

/* Floating Hover Trigger (Bottom-Right) */
#chat-hover-trigger {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: auto !important;
  z-index: 9970;
  padding: 10px;
  display: none;
}

body.mode-full-window #chat-hover-trigger,
body.mode-full-screen #chat-hover-trigger {
  display: block;
}

#floating-chat-btn {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#chat-hover-trigger:hover #floating-chat-btn {
  opacity: 1;
  transform: translateY(0);
}

/* --- Top-Right 3-Way View Switch --- */
#bottom-hover-trigger {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 16px));
  right: max(16px, env(safe-area-inset-right, 16px));
  left: auto;
  bottom: auto;
  transform: none;
  height: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 9990;
  pointer-events: auto;
  width: auto;
  max-width: 95vw;
}

.view-toggle-pill {
  display: flex;
  gap: 4px;
  background: rgba(14, 14, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: 30px;
  padding: 4px 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.view-opt-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.view-opt-btn.active {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-red-glow);
}

/* --- View Mode Hiding & Slide-Up Rules for Top-Right Placement --- */
body.mode-full-window .view-toggle-pill,
body.mode-full-screen .view-toggle-pill {
  transform: translateY(-20px);
  opacity: 0;
}

body.mode-full-window #bottom-hover-trigger:hover .view-toggle-pill,
body.mode-full-screen #bottom-hover-trigger:hover .view-toggle-pill {
  transform: translateY(0);
  opacity: 1;
}

/* --- Responsive Layout Rules (Pixel 9 Pro & Mobile Screens) --- */
@media (max-width: 768px) {
  #bottom-hover-trigger {
    top: max(12px, env(safe-area-inset-top, 12px));
    right: max(12px, env(safe-area-inset-right, 12px));
  }

  .hud-sidebar.left { 
    left: max(12px, env(safe-area-inset-left, 12px)); 
  }
  .hud-sidebar.right { 
    right: max(12px, env(safe-area-inset-right, 12px)); 
  }

  .hud-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }

  .ui-overlay {
    bottom: max(12px, env(safe-area-inset-bottom, 12px));
    left: 12px;
    right: 12px;
  }

  #trivia-drawer {
    left: 58px; /* Offset past left mobile HUD icons */
    width: calc(100vw - 72px);
    max-width: 300px;
    padding: 1rem;
  }

  .view-toggle-pill {
    padding: 3px 4px;
    gap: 2px;
  }

  .view-opt-btn {
    font-size: 0.7rem;
    padding: 6px 10px;
  }

  .terminal-overlay,
  #message-terminal {
    right: 12px;
    bottom: 65px;
    width: calc(100vw - 72px);
    max-width: 310px;
  }

  .paywall-card {
    padding: 1.5rem 1.2rem;
    border-radius: 16px;
  }

  .guide-drawer-header {
    padding: 16px 20px;
  }

  .guide-drawer-body {
    padding: 20px 16px;
  }

  .showcase-card {
    min-width: 220px;
    max-width: 220px;
    padding: 12px;
  }

  .schedule-item {
    padding: 10px 14px;
  }
}

/* --- View Mode Hiding Rules --- */
body.mode-full-window .hud-sidebar.left,
body.mode-full-screen .hud-sidebar.left {
  transform: translate(-80px, -50%);
  opacity: 0;
  pointer-events: none;
}

body.mode-full-window .hud-sidebar.right,
body.mode-full-screen .hud-sidebar.right {
  transform: translate(80px, -50%);
  opacity: 0;
  pointer-events: none;
}

body.mode-full-window .ui-overlay,
body.mode-full-screen .ui-overlay {
  opacity: 0;
  pointer-events: none;
}

/* --- HUD Sidebar Toggle Button --- */
.hud-sidebar-btn {
  background: rgba(20, 20, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.hud-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* --- Full-Window Channel Guide Overlay --- */
.guide-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(10, 10, 16, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: none;
  box-shadow: none;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-drawer-closed {
  transform: translateX(-100%);
  pointer-events: none;
}

.guide-drawer-open {
  transform: translateX(0);
  pointer-events: auto;
}

/* Full-Width Header Bar */
.guide-drawer-header {
  padding: 20px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 18, 26, 0.85);
}

.header-title-group h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
}

.live-dot-badge {
  font-size: 0.8rem;
  color: #a0a0b0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.live-dot-badge .dot {
  width: 7px;
  height: 7px;
  background: #00e676;
  border-radius: 50%;
  box-shadow: 0 0 8px #00e676;
}

.btn-close-drawer {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #aaa;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-close-drawer:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Centered Body Layout for Ultra-Wide / Desktop Display */
.guide-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.section-subtext {
  font-size: 0.85rem;
  color: #888899;
  margin: 4px 0 14px 0;
}

.guide-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
}

/* Horizontal Prime Time Showcase */
.prime-showcase-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.showcase-card {
  min-width: 260px;
  max-width: 260px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.showcase-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.showcase-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 171, 0, 0.2);
  color: #ffab00;
  border: 1px solid rgba(255, 171, 0, 0.3);
}

.showcase-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.showcase-time {
  font-size: 0.8rem;
  color: #00e676;
  font-weight: 600;
}

.showcase-desc {
  font-size: 0.78rem;
  color: #aaaabb;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Today's Rotation Timeline List */
.today-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-time {
  font-size: 0.8rem;
  font-weight: 700;
  color: #a0a0b0;
}

.item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.item-artist {
  font-size: 0.8rem;
  color: #666677;
}

.slot-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #cccccc;
}

.slot-tag-prime {
  background: rgba(255, 171, 0, 0.15);
  color: #ffab00;
}

.guide-skeleton-card {
  font-size: 0.85rem;
  color: #666677;
  padding: 12px;
}