/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0a;
  color: #e5e5e5;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; }
ul { list-style: none; }
img { display: block; }
::-webkit-scrollbar { height: 0; width: 0; }

/* ===== LOGIN SCREEN ===== */
.login-screen {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
}
.login-screen.hidden { display: none; }
.login-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1e 30%, #0a0a1a 70%, #0a0a0a 100%);
}
.login-bg::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
}
.login-nav {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 20px 4%; z-index: 2;
}
.login-box {
  position: relative; z-index: 2;
  background: rgba(0,0,0,.75);
  padding: 48px 68px 40px;
  border-radius: 4px;
  width: 100%; max-width: 450px;
  backdrop-filter: blur(8px);
}
.login-box h1 { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 24px; }
.login-error {
  display: none; background: #e87c03; color: #fff;
  padding: 10px 16px; border-radius: 4px;
  font-size: .85rem; margin-bottom: 16px;
}
.login-error.show { display: block; }
.input-group { margin-bottom: 16px; }
.input-group input {
  width: 100%; padding: 16px 16px;
  background: #333; border: none; border-radius: 4px;
  color: #fff; font-size: 1rem;
  outline: none; border: 1px solid transparent;
  transition: border-color .2s;
}
.input-group input:focus { border-color: #7B2D8E; }
.input-group input::placeholder { color: #999; }
.btn-signin {
  width: 100%; padding: 14px;
  background: #7B2D8E; color: #fff;
  border: none; border-radius: 4px;
  font-size: 1rem; font-weight: 700;
  cursor: pointer; margin-top: 8px;
  transition: background .2s;
}
.btn-signin:hover { background: #9340a8; }
.btn-signin:disabled { opacity: .6; cursor: not-allowed; }
.login-help {
  display: flex; justify-content: space-between;
  margin-top: 14px; font-size: .85rem; color: #b3b3b3;
}
.login-help label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.login-help input[type="checkbox"] { accent-color: #7B2D8E; }
.login-footer-text { margin-top: 20px; color: #999; font-size: .85rem; }
.login-footer-text a { color: #D4AF37; }

/* ===== NAV ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4%;
  height: 68px;
  background: linear-gradient(180deg, rgba(0,0,0,.85) 0%, transparent 100%);
  transition: background .3s;
}
#navbar.scrolled { background: rgba(10,10,10,.97); }
.nav-left { display: flex; align-items: center; gap: 32px; }
.logo {
  font-size: 1.7rem; font-weight: 900; letter-spacing: -1px;
  color: #7B2D8E; text-transform: uppercase;
}
.logo span { color: #D4AF37; }
.nav-menu-btn {
  display: none; background: none; border: none; color: #fff; cursor: pointer;
  padding: 4px; line-height: 0;
}
.nav-links { display: flex; gap: 20px; }
.nav-links a {
  font-size: .875rem; font-weight: 500; color: #b3b3b3;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-right { display: flex; align-items: center; gap: 18px; }

/* Notifications */
.notif-wrapper { position: relative; }
.notification-btn { position: relative; }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: #e55; color: #fff; font-size: .6rem; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1;
}
.notif-dropdown {
  display: none; position: absolute; top: 100%; right: 0;
  width: 340px; max-height: 420px;
  background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 10px;
  margin-top: 8px; overflow: hidden; z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.notif-dropdown.show { display: block; }
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #222;
}
.notif-list { max-height: 350px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid #1e1e1e; cursor: pointer;
  transition: background .15s;
}
.notif-item:hover { background: rgba(255,255,255,.03); }
.notif-item.unread { background: rgba(123,45,142,.08); border-left: 3px solid #7B2D8E; }
.notif-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.notif-icon.deal { background: rgba(212,175,55,.15); color: #D4AF37; }
.notif-icon.release { background: rgba(123,45,142,.15); color: #a855f7; }
.notif-icon.billing { background: rgba(229,85,85,.15); color: #e55; }
.notif-icon.general { background: rgba(70,211,105,.15); color: #46d369; }

/* Search */
.search-box { position: relative; display: flex; align-items: center; }
.search-toggle { color: #fff; }
#searchInput {
  width: 0; padding: 0; border: none; outline: none;
  background: rgba(0,0,0,.75); color: #fff;
  font-size: .875rem; border: 1px solid transparent;
  transition: width .3s, padding .3s, border-color .3s;
}
.search-box.open #searchInput {
  width: 220px; padding: 6px 10px;
  border-color: #fff;
}
.notification-btn { color: #fff; position: relative; }

/* Avatar / Profile */
.avatar-wrapper { position: relative; cursor: pointer; }
.avatar {
  width: 32px; height: 32px; border-radius: 4px;
  background: linear-gradient(135deg, #7B2D8E, #5a1e6b);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: #fff;
}
.avatar.small { width: 28px; height: 28px; font-size: .75rem; }
.avatar.green { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.profile-dropdown {
  display: none; position: absolute; right: 0; top: 46px;
  background: rgba(20,20,20,.97); border: 1px solid #333;
  border-radius: 4px; min-width: 220px; padding: 10px 0;
  flex-direction: column;
}
.profile-dropdown.show { display: flex; }
.profile-info {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
}
.profile-dropdown hr { border: none; border-top: 1px solid #333; margin: 6px 0; }
.profile-dropdown a {
  padding: 8px 16px; font-size: .85rem; color: #b3b3b3;
  display: block; transition: color .15s;
}
.profile-dropdown a:hover { color: #fff; }
.profile-dropdown .signout { color: #e5e5e5; font-weight: 500; }

/* ===== HERO ===== */
/* ===== ZEUS-STYLE HERO BANNER ===== */
#hero {
  position: relative; width: 100%; height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-start;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center center;
  background-repeat: no-repeat;
  width: 100%; height: 100%;
  transition: opacity 1s;
}
.hero-bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}
.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10,10,10,.5) 0%,
    rgba(10,10,10,.1) 12%,
    transparent 30%,
    transparent 85%,
    rgba(10,10,10,.8) 95%,
    #0a0a0a 100%
  );
}
/* Purple/gold accent line at bottom of hero */
.hero-accent {
  position: absolute; bottom: 0; left: 0; right: 0; height: 4px; z-index: 3;
  background: linear-gradient(90deg, #7B2D8E, #D4AF37, #7B2D8E);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 110px 4% 0;
  max-width: 650px;
}
.hero-badge {
  display: inline-block; font-size: .75rem; font-weight: 800;
  letter-spacing: 3px; color: #000;
  background: #D4AF37; padding: 6px 16px; border-radius: 2px;
  margin-bottom: 14px; text-transform: uppercase;
}
.hero-title {
  display: none;
}
.hero-desc {
  display: none;
}
.hero-meta {
  display: none;
}
.hero-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: 4px;
  font-size: .95rem; font-weight: 600;
  transition: background .2s, opacity .2s;
}
.btn-play { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(4px); }
.btn-play:hover { background: rgba(255,255,255,.25); }
.btn-access { background: #D4AF37; color: #000; font-weight: 900; font-size: 1rem; letter-spacing: 1.5px; padding: 14px 36px; border-radius: 4px; }
.btn-access:hover { background: #c4a030; }
.btn-info { background: rgba(109,109,110,.7); color: #fff; }
.btn-info:hover { background: rgba(109,109,110,.5); }
.btn-circle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.btn-circle:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* ===== CONTENT BACKGROUND BANNER ===== */
.content-bg-banner {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 0;
  pointer-events: none;
}
.content-bg-banner-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
}
.content-bg-banner-fade {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10,10,10,.3) 0%,
    rgba(10,10,10,.6) 15%,
    rgba(10,10,10,.85) 35%,
    rgba(10,10,10,.95) 55%,
    #0a0a0a 75%
  );
}

/* ===== CONTENT ROWS ===== */
#main { position: relative; z-index: 3; padding-top: 60px; padding-bottom: 60px; }
.page-header {
  padding: 80px 4% 30px;
}
.page-header h1 {
  font-size: 2rem; font-weight: 900; color: #fff;
  letter-spacing: .5px;
}
.row { margin-bottom: 28px; padding: 0 4%; }
.row-title {
  font-size: 1.2rem; font-weight: 700; color: #fff;
  margin-bottom: 10px;
}
.row-slider {
  display: flex; gap: 8px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

/* Cards */
.card {
  flex: 0 0 auto; width: 230px;
  border-radius: 4px; overflow: hidden;
  cursor: pointer; position: relative;
  scroll-snap-align: start;
  transition: transform .25s, box-shadow .25s;
  background: #181818;
}
.card:hover { transform: scale(1.08); z-index: 5; box-shadow: 0 8px 30px rgba(0,0,0,.6); }
.card-img {
  width: 100%; aspect-ratio: 16/9;
  background-size: cover; background-position: center;
  background-color: #222;
  display: flex; align-items: center; justify-content: center;
}
.card-img svg { opacity: .3; }
.card-info { padding: 10px 12px; }
.card-title { font-size: .8rem; font-weight: 600; color: #fff; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-subtitle { font-size: .65rem; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.card-meta { font-size: .7rem; color: #999; display: flex; gap: 8px; align-items: center; }
.card-meta .match { color: #46d369; font-weight: 600; }
.card-actions {
  display: flex; gap: 6px; padding: 6px 12px 10px;
}
.card-actions .btn-circle { width: 30px; height: 30px; border-width: 1.5px; }
.card-actions .btn-circle svg { width: 14px; height: 14px; }

/* Top 10 badge */
.card .top10-badge {
  position: absolute; top: 6px; left: 6px;
  background: #7B2D8E; color: #fff;
  font-size: .65rem; font-weight: 800;
  padding: 2px 6px; border-radius: 2px;
}

/* Video file badge */
.card .file-badge {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,.7); color: #D4AF37;
  font-size: .6rem; font-weight: 700;
  padding: 2px 6px; border-radius: 2px;
  text-transform: uppercase;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.7);
  justify-content: center; align-items: flex-start;
  padding-top: 4vh; overflow-y: auto;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #181818; border-radius: 8px;
  width: 95%; max-width: 850px;
  margin-bottom: 4vh;
  position: relative;
  overflow: hidden;
  animation: modalIn .3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%;
  background: #181818; font-size: 1.4rem; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.modal-hero {
  width: 100%; aspect-ratio: 16/9;
  background-size: cover; background-position: center;
  background-color: #222; position: relative;
}
.modal-hero-gradient {
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(transparent, #181818);
}
.modal-hero-actions {
  position: absolute; bottom: 20px; left: 24px;
  display: flex; gap: 8px; align-items: center;
}
.modal-body {
  display: grid; grid-template-columns: 1fr 200px; gap: 24px;
  padding: 20px 24px 28px;
}
.modal-meta { font-size: .8rem; color: #999; margin-bottom: 12px; }
.modal-meta .match { color: #46d369; font-weight: 600; }
.modal-meta .maturity {
  border: 1px solid #999; padding: 1px 6px; border-radius: 2px;
  font-size: .7rem; margin: 0 6px;
}
.modal-desc { font-size: .9rem; line-height: 1.55; color: #ddd; }
.modal-sidebar p { font-size: .8rem; color: #999; margin-bottom: 10px; line-height: 1.5; }
.modal-sidebar span { color: #fff; }

/* ===== VIDEO PLAYER ===== */
.player-overlay {
  display: none; position: fixed; inset: 0; z-index: 900;
  background: #000;
  flex-direction: column;
}
/* z-index 900 sits above #seriesPage (850) and other detail panels so the player
   always renders on top when opened from inside a detail screen. The pre-roll ad
   overlay uses z-index 9998 and still covers everything. */
.player-overlay.show { display: flex; }
.video-element {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}
.player-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 24px;
  background: linear-gradient(180deg, rgba(0,0,0,.8) 0%, transparent 100%);
  opacity: 1; transition: opacity .3s;
}
.player-center {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  gap: 48px;
}
.player-big-btn { color: #fff; opacity: .8; transition: opacity .2s; }
.player-big-btn:hover { opacity: 1; }
.player-bottombar {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
  padding: 0 24px 20px;
  background: linear-gradient(0deg, rgba(0,0,0,.8) 0%, transparent 100%);
  opacity: 1; transition: opacity .3s;
}
.player-overlay.hide-controls .player-topbar,
.player-overlay.hide-controls .player-center { opacity: 0; cursor: none; }
/* Bottom bar (play/pause, rewind, forward, progress, time, volume, fullscreen)
   stays visible even when other chrome auto-hides — viewers always need a way to
   pause/seek without hunting for the cursor. */
.player-bottombar { opacity: 1 !important; }
.progress-bar {
  width: 100%; height: 4px; background: rgba(255,255,255,.2);
  border-radius: 2px; margin-bottom: 12px; cursor: pointer;
  position: relative;
}
.progress-bar:hover { height: 6px; }
.progress-buffered {
  position: absolute; top: 0; left: 0; height: 100%;
  background: rgba(255,255,255,.3); border-radius: 2px;
  width: 0%; pointer-events: none;
}
.progress-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: #7B2D8E; border-radius: 2px;
  width: 0%; pointer-events: none;
}
.progress-thumb {
  position: absolute; top: 50%; width: 14px; height: 14px;
  background: #7B2D8E; border-radius: 50%;
  transform: translate(-50%, -50%);
  left: 0%; display: none; pointer-events: none;
}
.progress-bar:hover .progress-thumb { display: block; }
/* Ad break markers — gold dots overlaid on the progress bar at each mid-roll position */
.progress-markers {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.progress-marker {
  position: absolute; top: -3px;
  width: 3px; height: calc(100% + 6px);
  background: #D4AF37; border-radius: 1px;
  box-shadow: 0 0 4px rgba(212,175,55,.7);
}
.progress-marker[data-slot="post"] { background: #00adef; box-shadow: 0 0 4px rgba(0,173,239,.7); }
.player-controls-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.player-bottom-playpause,
.player-bottom-seek {
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 28px;
  padding: 8px 14px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
  color: #fff;
}
.player-bottom-playpause:hover,
.player-bottom-seek:hover { background: rgba(212,175,55,.85); border-color: #D4AF37; color: #000; }
.player-bottom-playpause { margin: 0 4px; background: #D4AF37; border-color: #D4AF37; color: #000; }
.player-bottom-playpause:hover { background: #fff; border-color: #fff; color: #000; }
.player-btn-label { font-size: .78rem; font-weight: 700; letter-spacing: .3px; }
/* In Pause state, swap the label text the same way the icon swaps. */
.play-pause.playing .player-btn-label.pp-play { display: none; }
.play-pause.playing .player-btn-label.pp-pause { display: inline; }
.player-time { font-size: .8rem; color: #fff; flex: 1; }
.player-right-controls { display: flex; gap: 12px; align-items: center; }
.player-ctrl { color: #fff; opacity: .8; transition: opacity .2s; background: none; border: none; cursor: pointer; }
.player-ctrl:hover { opacity: 1; }

/* Volume slider */
.volume-slider {
  -webkit-appearance: none; appearance: none;
  width: 80px; height: 4px; background: rgba(255,255,255,.3);
  border-radius: 2px; outline: none; cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; cursor: pointer;
}

/* play/pause */
.play-pause .pp-pause { display: none; }
.play-pause.playing .pp-play { display: none; }
.play-pause.playing .pp-pause { display: block; }

/* ===== SUBSCRIPTION / PLANS SCREEN ===== */
.plans-screen {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: #0a0a0a;
  overflow-y: auto;
}
.plans-screen.show { display: block; }
.plans-header {
  padding: 20px 4%;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #1a1a1a;
}
.plans-header .logo { font-size: 1.5rem; }
.plans-logout { font-size: .85rem; color: #999; cursor: pointer; background: none; border: none; }
.plans-logout:hover { color: #fff; }
.plans-container {
  max-width: 900px; margin: 0 auto; padding: 60px 24px 80px;
  text-align: center;
}
.plans-title {
  font-size: 2.2rem; font-weight: 800; color: #fff; margin-bottom: 8px;
}
.plans-subtitle {
  font-size: 1rem; color: #999; margin-bottom: 40px;
}
.plans-grid {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 40px;
}
.plan-card {
  background: #141414; border: 2px solid #222; border-radius: 12px;
  padding: 32px 28px; width: 320px; text-align: center;
  transition: border-color .3s, transform .2s;
  position: relative;
}
.plan-card:hover { border-color: #7B2D8E; transform: translateY(-4px); }
.plan-card.popular { border-color: #D4AF37; }
.plan-card.popular::before {
  content: 'BEST VALUE'; position: absolute; top: -12px; left: 50%;
  transform: translateX(-50%);
  background: #D4AF37; color: #000; font-size: .7rem; font-weight: 800;
  padding: 3px 12px; border-radius: 20px; letter-spacing: 1px;
}
.plan-name { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.plan-price { font-size: 2.4rem; font-weight: 900; color: #D4AF37; margin-bottom: 4px; }
.plan-price small { font-size: .9rem; font-weight: 400; color: #999; }
.plan-billing { font-size: .85rem; color: #777; margin-bottom: 20px; }
.plan-save { color: #46d369; font-weight: 600; font-size: .85rem; }
.plan-features { list-style: none; padding: 0; margin: 20px 0; text-align: left; }
.plan-features li {
  font-size: .88rem; color: #ccc; padding: 8px 0;
  border-bottom: 1px solid #1a1a1a;
  display: flex; align-items: center; gap: 10px;
}
.plan-features li::before {
  content: ''; display: inline-block; width: 18px; height: 18px; flex-shrink: 0;
  background: #7B2D8E; border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}
.btn-subscribe {
  width: 100%; padding: 14px; margin-top: 8px;
  background: #7B2D8E; color: #fff;
  border: none; border-radius: 6px;
  font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background .2s;
}
.btn-subscribe:hover { background: #9340a8; }
.plan-card.popular .btn-subscribe { background: #D4AF37; color: #000; }
.plan-card.popular .btn-subscribe:hover { background: #e0c04a; }
.plans-footer-text {
  font-size: .8rem; color: #666; margin-top: 20px; line-height: 1.6;
}
.plans-footer-text a { color: #D4AF37; }

/* Selected plan highlight */
.plan-card.selected { border-color: #7B2D8E; background: rgba(123,45,142,.08); }
.plan-card.popular.selected { border-color: #D4AF37; background: rgba(212,175,55,.08); }

/* ===== SIGNUP FORM (Step 2) ===== */
.signup-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: #999; font-size: .85rem;
  cursor: pointer; margin-bottom: 16px; padding: 0;
  transition: color .2s;
}
.signup-back:hover { color: #fff; }
.signup-plan-summary {
  display: inline-block;
  background: rgba(123,45,142,.15); border: 1px solid #7B2D8E;
  border-radius: 8px; padding: 12px 20px; margin-bottom: 20px;
  font-size: .9rem; color: #ccc;
}
.signup-plan-summary strong { color: #D4AF37; }
.signup-form-wrapper {
  max-width: 520px; margin: 0 auto; text-align: left;
}
.signup-form-wrapper .input-group {
  margin-bottom: 16px; flex: 1;
}
.signup-form-wrapper label {
  display: block; font-size: .8rem; font-weight: 600;
  color: #999; margin-bottom: 6px; letter-spacing: .3px;
}
.signup-form-wrapper input[type="text"],
.signup-form-wrapper input[type="email"],
.signup-form-wrapper input[type="tel"],
.signup-form-wrapper input[type="password"] {
  width: 100%; padding: 14px 16px;
  background: #1a1a1a; border: 1px solid #333; border-radius: 6px;
  color: #fff; font-size: .95rem; outline: none;
  transition: border-color .2s;
}
.signup-form-wrapper input:focus { border-color: #7B2D8E; }
.signup-form-wrapper input::placeholder { color: #666; }
.input-hint { font-size: .72rem; color: #666; margin-top: 4px; display: block; }
.form-row { display: flex; gap: 14px; }
.signup-error {
  display: none; background: rgba(229,85,85,.15); border: 1px solid rgba(229,85,85,.3);
  color: #f88; padding: 12px 16px; border-radius: 6px;
  font-size: .85rem; margin-bottom: 16px;
}
.signup-error.show { display: block; }
.signup-agreements {
  margin: 18px 0;
}
.signup-agreements label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .82rem; color: #ccc; cursor: pointer; line-height: 1.4;
}
.signup-agreements input[type="checkbox"] { accent-color: #7B2D8E; margin-top: 2px; }
.signup-agreements a { color: #D4AF37; }
.btn-signup-submit {
  width: 100%; padding: 16px;
  background: #7B2D8E; color: #fff;
  border: none; border-radius: 6px;
  font-size: 1.05rem; font-weight: 700;
  cursor: pointer; transition: background .2s;
}
.btn-signup-submit:hover { background: #9340a8; }
.btn-signup-submit:disabled { opacity: .5; cursor: not-allowed; }
.signup-secure-note {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: #777; margin-top: 12px;
  justify-content: center;
}

@media (max-width: 520px) {
  .form-row { flex-direction: column; gap: 0; }
}

/* ===== MEMBERSHIP / ACCOUNT MODAL ===== */
.membership-modal { max-width: 680px; }
.membership-header {
  padding: 32px 32px 20px; border-bottom: 1px solid #2a2a2a;
}
.membership-header h2 { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.membership-email { font-size: .85rem; color: #999; }
.membership-body { padding: 8px 32px 32px; }
.membership-section {
  padding: 20px 0;
  border-bottom: 1px solid #1a1a1a;
}
.membership-section:last-child { border-bottom: none; }
.membership-section h3 {
  font-size: .9rem; font-weight: 700; color: #D4AF37;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 14px;
}
.membership-plan-card {
  background: #1a1a1a; border-radius: 8px; padding: 18px 20px;
  border: 1px solid #2a2a2a;
}
.membership-plan-status { margin-bottom: 8px; }
.plan-badge {
  display: inline-block; padding: 3px 12px; border-radius: 20px;
  font-size: .75rem; font-weight: 700; letter-spacing: .5px;
}
.plan-badge.active { background: #7B2D8E; color: #fff; }
.plan-badge.inactive { background: #333; color: #999; }
.membership-plan-details p { font-size: .88rem; color: #ccc; line-height: 1.5; }
.membership-plan-details .plan-expires { font-size: .8rem; color: #999; margin-top: 6px; }
.membership-plan-details .plan-price-display {
  font-size: 1.4rem; font-weight: 800; color: #D4AF37; margin: 6px 0;
}

/* Mini plan cards in membership */
.membership-plans-row {
  display: flex; gap: 14px; flex-wrap: wrap;
}
.mini-plan {
  flex: 1; min-width: 200px;
  background: #1a1a1a; border: 2px solid #2a2a2a; border-radius: 10px;
  padding: 20px; text-align: center;
  transition: border-color .2s, transform .2s;
  position: relative;
}
.mini-plan:hover { border-color: #7B2D8E; transform: translateY(-2px); }
.mini-plan.popular { border-color: #D4AF37; }
.mini-plan.current { border-color: #7B2D8E; background: rgba(123,45,142,.1); }
.mini-plan-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: #D4AF37; color: #000; font-size: .6rem; font-weight: 800;
  padding: 2px 10px; border-radius: 12px; letter-spacing: .5px;
}
.mini-plan-name { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.mini-plan-price { font-size: 1.6rem; font-weight: 900; color: #D4AF37; }
.mini-plan-price small { font-size: .8rem; color: #999; font-weight: 400; }
.mini-plan-desc { font-size: .75rem; color: #999; margin: 6px 0 14px; }
.btn-mini-subscribe {
  width: 100%; padding: 10px;
  background: #7B2D8E; color: #fff; border: none; border-radius: 6px;
  font-size: .85rem; font-weight: 700; cursor: pointer;
  transition: background .2s;
}
.btn-mini-subscribe:hover { background: #9340a8; }
.btn-mini-subscribe:disabled { opacity: .5; cursor: not-allowed; }
.mini-plan.popular .btn-mini-subscribe { background: #D4AF37; color: #000; }
.mini-plan.popular .btn-mini-subscribe:hover { background: #e0c04a; }

/* Payment / Stripe */
.payment-stripe-info {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.payment-stripe-info p { font-size: .85rem; color: #ccc; }
.payment-note { font-size: .75rem !important; color: #777 !important; }
.stripe-connect-box {
  background: #1a1a1a; border: 1px dashed #333; border-radius: 8px;
  padding: 20px; text-align: center;
}
.stripe-connect-box p { font-size: .85rem; color: #999; margin-bottom: 12px; }
.btn-stripe-connect {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: #635BFF; color: #fff; border: none; border-radius: 6px;
  font-size: .85rem; font-weight: 700; cursor: pointer;
  transition: background .2s;
}
.btn-stripe-connect:hover { background: #7A73FF; }
.stripe-card-active {
  background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 8px;
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.stripe-card-info { display: flex; align-items: center; gap: 12px; }
.stripe-card-icon {
  width: 40px; height: 26px; background: #2a2a2a; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; color: #fff;
}
.stripe-card-details p { font-size: .85rem; color: #ccc; }
.stripe-card-details .card-exp { font-size: .75rem; color: #777; }
.btn-change-card {
  padding: 6px 14px; background: #333; color: #fff; border: none;
  border-radius: 4px; font-size: .8rem; cursor: pointer;
}
.btn-change-card:hover { background: #444; }

/* Cancel */
.membership-cancel {
  background: #1a1010; border: 1px solid #3a1a1a; border-radius: 8px;
  padding: 18px 20px;
}
.membership-cancel p { font-size: .85rem; color: #ccc; line-height: 1.5; margin-bottom: 14px; }
.btn-cancel-sub {
  padding: 10px 20px;
  background: transparent; color: #e55; border: 1px solid #e55;
  border-radius: 6px; font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.btn-cancel-sub:hover { background: #e55; color: #fff; }

/* Policies */
.membership-policies {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px;
}
.membership-policies a {
  font-size: .85rem; color: #D4AF37; transition: color .2s;
}
.membership-policies a:hover { color: #e0c04a; }
.policy-contact { font-size: .8rem; color: #777; }
.policy-contact a { color: #D4AF37; }

/* Refund notice on plans */
.plans-refund-notice {
  background: rgba(229,85,85,.08); border: 1px solid rgba(229,85,85,.2);
  border-radius: 8px; padding: 14px 18px; margin-bottom: 20px;
  font-size: .8rem; color: #ccc; line-height: 1.5; text-align: left;
  max-width: 680px; margin-left: auto; margin-right: auto;
}
.plans-refund-notice strong { color: #e55; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #fff; color: #000;
  padding: 12px 24px; border-radius: 4px;
  font-size: .875rem; font-weight: 600;
  opacity: 0; transition: all .3s;
  z-index: 400;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== BOTTOM BANNER ===== */
.bottom-banner {
  position: relative; width: 100%; min-height: 250px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin: 40px 0 0;
}
.bottom-banner-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  background-color: #141414;
}
.bottom-banner-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, #0a0a0a 0%, rgba(10,10,10,.6) 30%, rgba(10,10,10,.4) 70%, #0a0a0a 100%);
}
.bottom-banner-content {
  position: relative; z-index: 2; text-align: center;
  padding: 40px 4%;
}
.bottom-banner-content h2 {
  font-size: 2rem; font-weight: 900; color: #fff;
  text-transform: uppercase; letter-spacing: -1px;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
  margin-bottom: 8px;
}
.bottom-banner-content p {
  font-size: 1rem; color: rgba(255,255,255,.7);
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

/* ===== DEVICES BANNER ===== */
.devices-banner {
  position: relative; width: 100%;
  padding: 60px 4% 60px;
  overflow: hidden;
}
.devices-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0f0a14 0%, #1a0e24 30%, #0d0a1a 70%, #0a0a0f 100%);
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
}
.devices-content {
  position: relative; z-index: 2;
  text-align: center; max-width: 900px; margin: 0 auto;
}
.devices-content h2 {
  font-size: 1.8rem; font-weight: 900; color: #fff;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px;
}
.devices-content > p {
  font-size: .9rem; color: rgba(255,255,255,.5);
  margin-bottom: 12px;
}
.devices-view-all {
  display: inline-block;
  color: #e50914; font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 32px; cursor: pointer;
  transition: color .2s;
}
.devices-view-all:hover { color: #ff2d2d; }
.devices-icons {
  display: flex; justify-content: center; gap: 32px;
  flex-wrap: wrap;
}
.device-item {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 90px; cursor: pointer;
}
.device-item svg {
  width: 48px; height: 48px;
  stroke: #D4AF37;
  filter: drop-shadow(0 0 10px rgba(212,175,55,.25));
  transition: transform .25s, filter .25s;
}
.device-item:hover svg {
  transform: scale(1.15) translateY(-4px);
  filter: drop-shadow(0 0 20px rgba(212,175,55,.5));
}
.device-item span {
  font-size: .68rem; font-weight: 700; color: #ccc;
  text-transform: uppercase; letter-spacing: .5px;
  text-align: center;
}
.device-badge {
  font-size: .55rem; font-weight: 700; color: #fff; background: #7B2D8E;
  padding: 2px 8px; border-radius: 3px; text-transform: uppercase; letter-spacing: .5px;
}
@media (max-width: 430px) {
  .devices-icons { gap: 20px; }
  .device-item { width: 70px; }
  .device-item svg { width: 36px; height: 36px; }
  .device-item span { font-size: .58rem; }
  .devices-content h2 { font-size: 1.3rem; }
}

/* ===== FOOTER ===== */
.footer {
  padding: 40px 4% 30px; color: #666; font-size: .75rem;
  max-width: 900px; margin: 0 auto; text-align: center;
}
.footer a { color: #999; transition: color .2s; }
.footer a:hover { color: #D4AF37; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; justify-content: center; }
.footer-social { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 20px 0 10px; flex-wrap: wrap; }
.social-icon { color: #999; transition: color .2s, transform .2s; display: inline-flex; }
.social-icon:hover { color: #D4AF37; transform: scale(1.15); }

/* ===== RESPONSIVE — iPhone / Tablet / Desktop / TV ===== */

/* iPhone SE, small phones (320-390px) */
@media (max-width: 430px) {
  #navbar { height: 54px; padding: 0 3%; }
  .nav-menu-btn { display: block; }
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 54px; left: 0; right: 0;
    background: rgba(10,10,10,.97); padding: 8px 0;
    border-bottom: 1px solid #222;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 20px; font-size: .95rem; }
  .nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,.05); }
  .nav-right { gap: 10px; }
  .logo { font-size: 1.3rem; }
  .notification-btn { display: none; }
  .avatar { width: 28px; height: 28px; font-size: .7rem; }

  #hero { height: 100vh; }
  .hero-content { max-width: 95%; padding: 70px 4% 0; }
  .hero-badge { font-size: .6rem; padding: 4px 10px; margin-bottom: 10px; }
  .hero-actions { gap: 8px; }
  .btn { padding: 8px 14px; font-size: .8rem; gap: 5px; }
  .btn svg { width: 16px; height: 16px; }

  .row { margin-bottom: 20px; padding: 0 3%; }
  .row-title { font-size: 1rem; }
  .card { width: 120px; }
  .card-info { padding: 6px 8px; }
  .card-title { font-size: .7rem; }
  .card-meta { font-size: .6rem; }
  .card-actions { padding: 4px 8px 8px; gap: 4px; }
  .card-actions .btn-circle { width: 24px; height: 24px; }
  .card-actions .btn-circle svg { width: 11px; height: 11px; }

  .modal { width: 98%; }
  .modal-body { grid-template-columns: 1fr; padding: 14px 16px 20px; }
  .modal-sidebar { order: -1; }

  .bottom-banner { min-height: 150px; }
  .bottom-banner-content h2 { font-size: 1.2rem; }
  .bottom-banner-content p { font-size: .8rem; }

  .login-box { padding: 28px 20px; }
  .login-box h1 { font-size: 1.5rem; }
  .plans-grid { flex-direction: column; align-items: center; }
  .plan-card { width: 100%; max-width: 340px; padding: 24px 20px; }
  .signup-form-wrapper { padding: 0; }
  .form-row { flex-direction: column; gap: 0; }

  .player-topbar { padding: 10px 12px; }
  .player-title { font-size: .85rem; }
  .player-center { gap: 24px; }
  .player-big-btn svg { width: 28px; height: 28px; }
  .play-pause svg { width: 42px !important; height: 42px !important; }

  .footer { padding: 24px 3% 20px; }
  .footer-links { gap: 10px; }

  .section-banner { height: 80px !important; }
  .section-banner div[style*="font-size:1.3rem"] { font-size: 1rem !important; }

  .membership-modal { width: 98%; }
  .membership-header { padding: 20px 16px 14px; }
  .membership-body { padding: 4px 16px 20px; }
  .membership-plans-row { flex-direction: column; }
  .mini-plan { min-width: 0; }
}

/* Larger phones / iPhone Pro Max (431-767px) */
@media (min-width: 431px) and (max-width: 767px) {
  .nav-menu-btn { display: block; }
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 60px; left: 0; right: 0;
    background: rgba(10,10,10,.97); padding: 8px 0;
    border-bottom: 1px solid #222;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 20px; font-size: .95rem; }
  .nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,.05); }
  .hero-content { max-width: 90%; padding: 80px 4% 0; }
  .hero-badge { font-size: .65rem; }
  .card { width: 140px; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-sidebar { order: -1; }
  .login-box { padding: 32px 28px; }
  .plans-grid { flex-direction: column; align-items: center; }
  .plan-card { width: 100%; max-width: 380px; }
  .form-row { flex-direction: column; gap: 0; }
  .membership-plans-row { flex-direction: column; }
  .bottom-banner { min-height: 180px; }
}

/* Tablet (768-1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-content { max-width: 70%; }
  .card { width: 180px; }
  .plans-grid { gap: 14px; }
}

/* Desktop (1025-1920px) — default styles apply */

/* Large Desktop / TV (1921px+) */
@media (min-width: 1921px) {
  body { font-size: 18px; }
  #navbar { height: 80px; padding: 0 6%; }
  .logo { font-size: 2.2rem; }
  .nav-links a { font-size: 1rem; }
  .nav-links { gap: 28px; }

  #hero { height: 100vh; }
  .hero-content { max-width: 800px; padding: 110px 6% 0; }
  .hero-badge { font-size: .85rem; padding: 6px 18px; }
  .btn { padding: 14px 32px; font-size: 1.1rem; }

  .row { padding: 0 6%; margin-bottom: 36px; }
  .row-title { font-size: 1.5rem; }
  .row-slider { gap: 12px; }
  .card { width: 300px; }
  .card-info { padding: 14px 16px; }
  .card-title { font-size: 1rem; }
  .card-meta { font-size: .85rem; }
  .card-actions { padding: 8px 16px 14px; }
  .card-actions .btn-circle { width: 38px; height: 38px; }

  .bottom-banner { min-height: 350px; }
  .bottom-banner-content h2 { font-size: 3rem; }
  .bottom-banner-content p { font-size: 1.3rem; }

  .footer { font-size: .9rem; padding: 50px 6% 40px; max-width: 1200px; }

  .modal { max-width: 1000px; }
  .section-banner { height: 180px !important; }
}

/* Ultra-wide TV (2560px+) */
@media (min-width: 2560px) {
  body { font-size: 22px; }
  .card { width: 380px; }
  .row-slider { gap: 16px; }
  .bottom-banner { min-height: 400px; }
  .bottom-banner-content h2 { font-size: 3.5rem; }
}

/* 4K TV (3840px+) */
@media (min-width: 3840px) {
  body { font-size: 28px; }
  #navbar { height: 100px; }
  .logo { font-size: 3rem; }
  .card { width: 480px; }
  .btn { padding: 18px 40px; font-size: 1.4rem; }
  .bottom-banner { min-height: 500px; }
  .bottom-banner-content h2 { font-size: 4.5rem; }
}

/* Landscape phone fix */
@media (max-height: 500px) and (orientation: landscape) {
  #hero { height: 100vh; }
  .hero-content { padding: 60px 4% 0; }
  .player-center { gap: 32px; }
}

/* ============================================================
   TV MODE — auto-applied when running on Fire TV / Apple TV /
   Samsung Tizen / LG webOS, or when ?tv=1 URL parameter is set.
   Activated by app.js setting `body.tv-mode`.
   ============================================================ */

body.tv-mode {
  /* Larger base font so text is readable from 10 feet away */
  font-size: 22px;
  /* TV-safe area: TVs cut off ~5% on edges */
  padding: 5vh 5vw;
  cursor: none; /* Hide cursor — TV uses remote */
}
body.tv-mode #navbar {
  padding: 24px 5vw;
}
body.tv-mode .nav-links a {
  font-size: 1.2rem;
  padding: 14px 22px;
}
body.tv-mode .hero-content h1 {
  font-size: 5rem;
  line-height: 1.05;
}
body.tv-mode .hero-content p {
  font-size: 1.5rem;
  max-width: 60vw;
}
body.tv-mode .hero-buttons .btn {
  font-size: 1.4rem;
  padding: 18px 40px;
}
body.tv-mode .row-title {
  font-size: 1.8rem;
  margin-bottom: 16px;
}
body.tv-mode .card {
  width: 320px;
  height: 180px;
}
body.tv-mode .row-cards {
  gap: 24px;
  padding-bottom: 12px;
}

/* Visible focus ring — gold border around whatever the remote selected.
   TV is a "lean back" experience, so the focus indicator MUST be obvious
   from across the room. */
body.tv-mode *:focus,
body.tv-mode *:focus-visible,
body.tv-mode .tv-focused {
  outline: 4px solid #D4AF37 !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.3),
              0 8px 32px rgba(0, 0, 0, 0.6) !important;
  transform: scale(1.06);
  transition: transform 0.15s, box-shadow 0.15s;
  z-index: 10;
  position: relative;
}
body.tv-mode .card:focus,
body.tv-mode .card.tv-focused {
  border-radius: 8px;
}

/* Hide elements that don't make sense on a TV */
body.tv-mode .search-toggle,    /* search uses a keyboard, painful on remote */
body.tv-mode #avatarWrapper,    /* account menu — handled by remote profile */
body.tv-mode #notifWrapper,     /* notifications — TV doesn't need them */
body.tv-mode .nav-menu-btn {    /* hamburger — TV nav is always visible */
  display: none !important;
}

/* The "Sign up at raatv.net" prompt + QR code on the plans screen.
   Replaces the in-app signup form because typing on a TV remote is awful. */
body.tv-mode #plansScreen .signup-form,
body.tv-mode #plansScreen #signupStep2 {
  display: none !important;
}
body.tv-mode .tv-qr-prompt {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 60px 5vw;
  text-align: center;
}
body.tv-mode .tv-qr-prompt h2 {
  font-size: 3.2rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
}
body.tv-mode .tv-qr-prompt p {
  font-size: 1.5rem;
  color: #ccc;
  max-width: 800px;
}
body.tv-mode .tv-qr-prompt .qr-box {
  background: #fff;
  padding: 32px;
  border-radius: 16px;
}
body.tv-mode .tv-qr-prompt .qr-url {
  font-size: 1.6rem;
  font-weight: 900;
  color: #D4AF37;
  letter-spacing: 2px;
}

/* Fire TV-specific overrides (most things shared across TV platforms,
   but Fire TV remote behaves slightly differently than Apple/Samsung) */
body.tv-mode.tv-firetv .card:focus img {
  filter: brightness(1.1);
}
