: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;
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body { 
  background-color: var(--bg-core); 
  color: var(--text-primary); 
  font-family: var(--font-body); 
  overflow: hidden; 
  height: 100vh; 
  -webkit-font-smoothing: antialiased;
}

/* --- TV-MA Interstitial Warning (Adult Swim Style Bump) --- */
#warning-screen {
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh;
  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: 20px; 
  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);
}

.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; }
}

/* --- Top-Right Navigation Area --- */
.top-nav {
  position: absolute; 
  top: 20px; 
  right: 24px; 
  z-index: 600;
  display: flex; 
  gap: 12px; 
  align-items: center;
}

.btn-header {
  border: 1px solid var(--bg-card-border);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.btn-header:hover { 
  transform: translateY(-2px); 
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-auth-action { 
  background: var(--accent-red); 
  border-color: transparent;
  box-shadow: 0 4px 20px var(--accent-red-glow);
}
.btn-auth-action:hover { 
  background: var(--accent-red-hover); 
  box-shadow: 0 6px 24px rgba(255, 0, 51, 0.5);
}

.btn-settings { 
  background: rgba(14, 14, 18, 0.75); 
}
.btn-settings:hover { 
  background: rgba(25, 25, 32, 0.9); 
}

/* --- Video Player Shell --- */
.player-container { 
  position: relative; 
  width: 100vw; 
  height: 100vh; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  background: #000;
}

video { 
  width: 100%; 
  height: 100%; 
  object-fit: contain; 
  pointer-events: none; 
}

/* --- Custom UI Controls Overlay --- */
.ui-overlay { 
  position: absolute; 
  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);
}

.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; 
}

.show-info { 
  margin-left: 12px; 
  font-size: 0.9rem; 
  font-weight: 600; 
  color: #f0f0f5; 
}

/* --- Timed Trivia Slide-In Drawer --- */
#trivia-drawer {
  position: absolute; 
  top: 30px; 
  right: -380px; 
  width: 340px;
  background: rgba(14, 14, 18, 0.9); 
  backdrop-filter: blur(16px);
  border-left: 3px solid var(--accent-red);
  border-top: 1px solid var(--bg-card-border);
  border-bottom: 1px solid var(--bg-card-border);
  padding: 1.2rem; 
  border-radius: 12px 0 0 12px; 
  box-shadow: -10px 10px 40px rgba(0, 0, 0, 0.8);
  transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1); 
  z-index: 200;
}

#trivia-drawer.active { right: 0; }

.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 Button & Modal --- */
.btn-rate { 
  background: rgba(255, 0, 51, 0.15); 
  color: var(--accent-red); 
  border: 1px solid rgba(255, 0, 51, 0.3); 
  padding: 10px 20px; 
  border-radius: 8px; 
  font-size: 0.85rem;
  font-weight: 700; 
  cursor: pointer; 
  opacity: 0.4; 
  pointer-events: none; 
  transition: all 0.2s ease;
}

.btn-rate.unlocked { 
  opacity: 1; 
  pointer-events: auto; 
  background: var(--accent-red);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px var(--accent-red-glow);
}

#rating-modal {
  display: none; 
  position: fixed; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%);
  background: var(--bg-card); 
  border: 1px solid var(--bg-card-border); 
  border-radius: 16px; 
  padding: 2.2rem; 
  width: 90%; 
  max-width: 440px; 
  z-index: 10001;
  box-shadow: 0 30px 80px rgba(0,0,0,0.9);
}

#rating-modal.open { display: block; }

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
}

.modal-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.star-rating { 
  display: flex; 
  justify-content: center;
  gap: 12px; 
  margin: 1.5rem 0; 
  font-size: 2rem; 
  cursor: pointer; 
  color: #2a2a35; 
  transition: color 0.2s ease;
}

.star-rating .star {
  transition: transform 0.15 ease, color 0.15s ease;
}
.star-rating .star:hover {
  transform: scale(1.15);
}
.star-rating .star.active { 
  color: #ffca28; 
  text-shadow: 0 0 12px rgba(255, 202, 40, 0.4);
}

.categories-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 8px; 
  margin-bottom: 1.8rem; 
}

.category-toggle { 
  background: rgba(255, 255, 255, 0.03); 
  padding: 10px; 
  border-radius: 8px; 
  text-align: center; 
  font-size: 0.8rem; 
  font-weight: 500;
  cursor: pointer; 
  border: 1px solid var(--bg-card-border); 
  color: #aaa;
  transition: all 0.2s ease;
}

.category-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.category-toggle.selected { 
  border-color: var(--accent-red); 
  background: rgba(255, 0, 51, 0.12); 
  color: #fff; 
  font-weight: 600;
}

/* --- Generic Action Buttons --- */
.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 {
  background: var(--accent-red-hover);
  transform: translateY(-1px);
}

/* --- Modal Overlays & Glass Cards --- */
.modal-overlay {
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh;
  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: 90vh;
  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; }

.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; 
}