/* NodeCast Red Edition v2 - structural Netflix-inspired layout layer */
:root {
  --red-edition: #e50914;
  --red-edition-hover: #f6121d;
  --color-accent: #e50914;
  --color-accent-hover: #ff2631;
  --color-accent-dim: rgba(229, 9, 20, .18);
  --color-bg-primary: #080808;
  --color-bg-secondary: #111111;
  --color-bg-tertiary: #1a1a1a;
  --color-bg-hover: #252525;
  --glass-bg: rgba(10, 10, 10, .88);
  --glass-border: rgba(255, 255, 255, .08);
  --shadow-glow: 0 0 26px rgba(229, 9, 20, .24);
}

html, body, #app { background: #080808; }
.navbar {
  background: linear-gradient(180deg, rgba(0,0,0,.98), rgba(10,10,10,.86));
  border-bottom: 1px solid rgba(255,255,255,.055);
  backdrop-filter: blur(16px);
}
.navbar-brand .logo svg { fill: var(--red-edition) !important; }
.brand-accent, .nav-link.active { color: #fff !important; }
.nav-link.active { background: rgba(229,9,20,.2) !important; box-shadow: inset 0 -2px 0 var(--red-edition); }
.nav-link:hover { background: rgba(255,255,255,.075); }
.btn-primary, .btn-primary:focus { background: var(--red-edition) !important; border-color: var(--red-edition) !important; }
.btn-primary:hover { background: var(--red-edition-hover) !important; box-shadow: 0 8px 24px rgba(229,9,20,.24); }
.scroll-arrow:hover { border-color: var(--red-edition) !important; }

/* Home: full-width cinematic canvas */
#page-home { overflow-y: auto !important; overflow-x: hidden; background: #0b0b0f; }
#page-home .dashboard-content {
  width: 100%; max-width: 1720px; margin: 0 auto;
  padding: 0 0 64px; overflow: visible;
}
#page-home .dashboard-section { margin: 0 0 30px; padding: 0 clamp(20px, 5vw, 76px); }
#page-home .section-header { margin: 0 0 13px; padding: 0; border: 0; display: flex; justify-content: space-between; align-items: center; }
#page-home .section-header h2 {
  color: #f5f5f5; font-family: 'Inter', sans-serif; font-size: clamp(1.05rem, 1.45vw, 1.38rem);
  font-weight: 750; letter-spacing: -.035em;
}
#page-home .horizontal-scroll { gap: 12px; padding: 4px 3px 16px; overflow-y: visible; }
#page-home .dashboard-card {
  flex: 0 0 clamp(170px, 19vw, 250px); max-width: 250px; background: #17171d; border: 1px solid rgba(255,255,255,.07);
  border-radius: 7px; box-shadow: 0 7px 22px rgba(0,0,0,.28); transform-origin: center center;
}
#page-home .dashboard-card:hover {
  transform: scale(1.045); z-index: 5;
  border-color: rgba(229,9,20,.55); box-shadow: 0 14px 34px rgba(0,0,0,.56), 0 0 0 1px rgba(229,9,20,.12);
}
#page-home .card-image { aspect-ratio: 16 / 10; background: #222; }
#page-home .card-image img { transition: transform .45s ease; }
#page-home .card-info { padding: 10px 10px 12px; }
#page-home .card-title { color: #f4f4f4; font-size: .9rem; }
#page-home .card-subtitle { color: #aaa; font-size: .75rem; }
#page-home .home-section-link { border: 0; padding: 5px 0 5px 12px; background: none; color: #aaa; cursor: pointer; font-size: .8rem; }
#page-home .home-section-link:hover { color: #fff; }
#page-home .home-section-link span { color: var(--red-edition); font-size: 1.2rem; vertical-align: -1px; }
#page-home .progress-bar { background: var(--red-edition); box-shadow: 0 0 10px rgba(229,9,20,.5); }
#page-home .scroll-arrow { width: 38px; height: 38px; background: rgba(20,20,20,.9); border-color: rgba(255,255,255,.16); }
#page-home .dashboard-section .empty-state { min-height: 90px; height: auto; background: rgba(255,255,255,.025); }
#favorite-channels-section .channel-tiles { display: flex; align-items: flex-start; }
#favorite-channels-section .channel-tile { flex: 0 0 clamp(108px, 12vw, 145px); max-width: clamp(108px, 12vw, 145px); cursor: pointer; }
#favorite-channels-section .tile-logo { width: 100%; height: clamp(70px, 8vw, 96px); border-radius: 6px; background: #17171d; }
#favorite-channels-section .tile-logo img { max-width: 82%; max-height: 76%; object-fit: contain; }
#favorite-channels-section .tile-name { margin-top: 7px; color: #e6e6e6; font-size: .78rem; }
#favorite-channels-section .channel-tile:hover .tile-logo { border-color: var(--red-edition); box-shadow: 0 0 18px rgba(229,9,20,.22); transform: scale(1.04); }

/* Cinematic featured title */
.red-edition-hero {
  position: relative; isolation: isolate; display: flex; align-items: flex-end;
  min-height: clamp(390px, 49vw, 590px); margin: 0 0 28px; padding: 54px clamp(20px, 5vw, 76px) 58px;
  overflow: hidden; background: radial-gradient(ellipse at 72% 44%, rgba(105,15,22,.55), transparent 48%),
    linear-gradient(110deg, #171010 0%, #100b0c 52%, #080808 100%);
}
.red-edition-hero::before {
  content: ''; position: absolute; z-index: -2; inset: 0;
  background: linear-gradient(90deg, rgba(8,8,8,.98) 0%, rgba(8,8,8,.83) 35%, rgba(8,8,8,.18) 76%, rgba(8,8,8,.55) 100%),
    linear-gradient(0deg, #080808 0%, transparent 36%);
}
.red-edition-hero-backdrop { position: absolute; z-index: -3; inset: -24px; opacity: .48; filter: blur(15px) saturate(.82); }
.red-edition-hero-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.red-edition-hero-inner { width: min(690px, 64%); position: relative; z-index: 2; }
.red-edition-eyebrow { display: flex; align-items: center; gap: 9px; color: #eee; font-size: .72rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 14px; }
.red-edition-eyebrow::before { content: ''; width: 4px; height: 18px; background: var(--red-edition); border-radius: 4px; }
.red-edition-hero h1 { color: #fff; font-size: clamp(2.25rem, 5.3vw, 5rem); line-height: .98; letter-spacing: -.055em; font-weight: 900; text-shadow: 0 4px 25px rgba(0,0,0,.35); margin: 0 0 17px; max-width: 760px; }
.red-edition-hero-copy { color: rgba(255,255,255,.82); font-size: clamp(.9rem, 1.15vw, 1.05rem); line-height: 1.6; max-width: 570px; margin-bottom: 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.red-edition-hero-meta { display: flex; align-items: center; gap: 11px; color: rgba(255,255,255,.73); font-size: .82rem; margin-bottom: 22px; }
.red-edition-hero-meta .red-edition-dot { width: 4px; height: 4px; background: var(--red-edition); border-radius: 50%; }
.red-edition-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.red-edition-hero-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 21px; border: 0; border-radius: 5px; cursor: pointer; font-weight: 800; font-size: .92rem; transition: transform .18s, background .18s; }
.red-edition-hero-actions button:hover { transform: translateY(-2px); }
.red-edition-play { background: #fff; color: #111; }
.red-edition-play:hover { background: #e8e8e8; }
.red-edition-more { background: rgba(109,109,110,.72); color: #fff; backdrop-filter: blur(8px); }
.red-edition-more:hover { background: rgba(109,109,110,.92); }
.red-edition-hero-art { position: absolute; right: clamp(30px, 9vw, 150px); top: 50%; transform: translateY(-50%) rotate(2deg); height: min(72%, 390px); width: auto; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; box-shadow: 0 22px 65px rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.16); z-index: 1; }
.red-edition-hero-art img { width: 100%; height: 100%; object-fit: cover; }
.red-edition-hero-empty { display: flex; align-items: center; min-height: 320px; }
.red-edition-hero-empty .red-edition-hero-inner { width: min(760px, 90%); }
.red-edition-hero-empty h1 { font-size: clamp(2.3rem, 5vw, 4.3rem); }
.red-edition-hero-empty .red-edition-hero-copy { max-width: 610px; }

/* Other pages: consistent dark cinematic shell without touching their logic */
#page-live, #page-guide, #page-movies, #page-series, #page-settings, #page-watch { background: #090909; }
#page-movies .movies-header, #page-series .series-header, #page-settings .settings-header,
#page-guide .guide-header { background: rgba(15,15,15,.96); border-color: rgba(255,255,255,.07); }
#page-live .channel-sidebar { background: #111; border-color: rgba(255,255,255,.07); }
#page-live .channel-item.active, #page-live .channel-item.selected { border-left-color: var(--red-edition); }
#page-live .channel-item:hover { background: rgba(229,9,20,.09); }
#page-settings .settings-tabs .active, #page-settings .tab-btn.active { color: #fff; border-color: var(--red-edition); }
#page-settings input:focus, #page-settings select:focus, #page-settings textarea:focus,
#page-live input:focus, #page-movies input:focus, #page-series input:focus { border-color: var(--red-edition); box-shadow: 0 0 0 3px rgba(229,9,20,.14); }

/* EPG: concise now/next cards above the 24-hour grid. */
#page-guide { overflow-y: auto !important; overflow-x: hidden; background: #0b0b0f; }
#page-guide .guide-header { padding: 18px clamp(18px, 4vw, 48px); }
#page-guide .guide-header h2 { font-weight: 800; }
#epg-grid { padding: 0 clamp(12px, 3vw, 36px) 36px; }
.epg-now-next { margin: 14px 0 24px; }
.epg-now-next-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.epg-now-next-heading h2 { margin: 0; color: #f5f5f5; font-size: 1.1rem; font-weight: 800; }
.epg-live-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #e50914; box-shadow: 0 0 12px #e5091480; }
.epg-now-next-count { margin-left: auto; color: #999; font-size: .78rem; }
.epg-now-next-row { display: grid; grid-auto-columns: minmax(220px, 280px); grid-auto-flow: column; gap: 12px; overflow-x: auto; padding: 3px 3px 12px; scrollbar-width: thin; }
.epg-now-next-card { min-height: 145px; padding: 14px; overflow: hidden; border: 1px solid #ffffff12; border-radius: 8px; background: linear-gradient(145deg,#1b1b22,#111116); }
.epg-now-next-channel { margin-bottom: 12px; overflow: hidden; color: #ddd; font-size: .78rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.epg-program-label { color: #e95a61; font-size: .64rem; font-weight: 850; letter-spacing: .1em; }
.epg-now-next-title { margin-top: 4px; overflow: hidden; color: #fff; font-size: .95rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.epg-now-next-progress { height: 3px; margin-top: 9px; overflow: hidden; border-radius: 4px; background: #ffffff20; }
.epg-now-next-progress span { display: block; height: 100%; background: #e50914; }
.epg-next-label { margin-top: 12px; color: #999; }
.epg-next-title { margin-top: 3px; overflow: hidden; color: #c9c9cf; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.epg-status-notice { margin: 10px 0; padding: 10px 14px; border-left: 3px solid #e50914; border-radius: 4px; background: #ffffff08; color: #ccc; }

@media (min-width: 1500px) { #page-home .dashboard-card { flex-basis: 195px; max-width: 195px; } }
@media (max-width: 900px) {
  .red-edition-hero { min-height: 390px; padding-bottom: 42px; }
  .red-edition-hero-art { right: 5%; height: 58%; opacity: .55; }
  .red-edition-hero-inner { width: min(620px, 78%); }
  .red-edition-hero::before { background: linear-gradient(90deg, rgba(8,8,8,.98), rgba(8,8,8,.76) 58%, rgba(8,8,8,.45)), linear-gradient(0deg,#080808 0%,transparent 45%); }
}
@media (max-width: 600px) {
  #page-home .dashboard-content { padding-bottom: 34px; }
  .red-edition-hero { min-height: 430px; padding: 30px 20px 38px; align-items: flex-end; }
  .red-edition-hero-art { right: -8px; top: 20px; transform: none; height: 205px; opacity: .32; }
  .red-edition-hero-inner { width: 100%; }
  .red-edition-hero h1 { font-size: 2.45rem; max-width: 95%; }
  .red-edition-hero-copy { max-width: 100%; -webkit-line-clamp: 3; }
  #page-home .dashboard-section { padding-left: 20px; padding-right: 20px; margin-bottom: 25px; }
  #page-home .dashboard-card { flex-basis: 68vw; max-width: 270px; }
  #page-home .horizontal-scroll { gap: 11px; }
  #favorite-channels-section .channel-tile { flex-basis: 105px; max-width: 105px; }
  #favorite-channels-section .tile-logo { height: 66px; }
}
@media (prefers-reduced-motion: reduce) {
  .red-edition-hero-actions button, #page-home .dashboard-card, #page-home .card-image img { transition: none !important; }
}
