﻿/* NovaStream IPTV - Core Stylesheet */
:root {
  --bg-primary: #07080b;
  --bg-secondary: #10131c;
  --bg-card: #151924;
  --bg-card-hover: #1c2233;
  --bg-glass: rgba(16, 20, 30, 0.75);
  --bg-glass-heavy: rgba(10, 12, 18, 0.88);
  
  --accent: #e50914; /* Netflix Red */
  --accent-glow: rgba(229, 9, 20, 0.45);
  --accent-secondary: #00d2ff;
  
  --text-primary: #ffffff;
  --text-secondary: #a3a9b8;
  --text-muted: #6b7280;
  
  --focus-border: #ffffff;
  --focus-glow: 0 0 24px rgba(229, 9, 20, 0.7), 0 0 8px rgba(255, 255, 255, 0.9);
  
  --sidebar-width-collapsed: 90px;
  --sidebar-width-expanded: 260px;
  
  --font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --card-radius: 12px;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  cursor: none !important;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}

html, body {
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

/* App Wrapper */
#app-root {
  position: relative;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: radial-gradient(circle at 80% 20%, rgba(229, 9, 20, 0.08) 0%, transparent 60%),
              radial-gradient(circle at 10% 80%, rgba(0, 210, 255, 0.04) 0%, transparent 50%),
              var(--bg-primary);
}

/* SIDEBAR */
#sidebar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width-collapsed);
  background: linear-gradient(90deg, rgba(7, 8, 11, 0.98) 0%, rgba(7, 8, 11, 0.85) 80%, transparent 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 40px 0;
  transition: width var(--transition-smooth), background var(--transition-smooth);
  overflow: hidden;
}

#sidebar.expanded {
  width: var(--sidebar-width-expanded);
  background: rgba(7, 8, 11, 0.96);
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.8);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  margin-bottom: 48px;
  width: 100%;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e50914 0%, #b80610 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
  flex-shrink: 0;
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

#sidebar.expanded .logo-text {
  opacity: 1;
}

.logo-text span {
  color: var(--accent);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  flex: 1;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 26px;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-item-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.nav-item-label {
  opacity: 0;
  transition: opacity var(--transition-fast);
}

#sidebar.expanded .nav-item-label {
  opacity: 1;
}

.nav-item-btn.active {
  color: #ffffff;
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.18) 0%, transparent 100%);
}

.nav-item-btn.focused {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.nav-item-btn.focused svg {
  transform: scale(1.15);
  fill: var(--accent);
}

/* MAIN VIEWPORT */
#main-content {
  position: absolute;
  top: 0;
  left: var(--sidebar-width-collapsed);
  right: 0;
  bottom: 0;
  overflow-y: hidden;
  overflow-x: hidden;
  transition: filter var(--transition-smooth);
}

.view-section {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

.view-section.active {
  display: block;
}

/* Hide scrollbar for TV clean feel */
.view-section::-webkit-scrollbar,
.rail-items::-webkit-scrollbar {
  display: none;
}
.view-section, .rail-items {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* HERO SPOTLIGHT BANNER */
.hero-banner {
  position: relative;
  width: 100%;
  height: 580px;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transition: background-image 0.5s ease-in-out;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg-primary) 0%, rgba(7, 8, 11, 0.7) 45%, rgba(7, 8, 11, 0.2) 100%),
              linear-gradient(90deg, var(--bg-primary) 0%, rgba(7, 8, 11, 0.8) 35%, transparent 100%);
}

.hero-content {
  position: absolute;
  bottom: 40px;
  left: 60px;
  max-width: 820px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-4k {
  background: #ffffff;
  color: #000000;
}

.badge-rating {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.5);
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-category {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.hero-overview {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

.btn-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-hero svg {
  width: 24px;
  height: 24px;
}

.btn-hero.play {
  background: #ffffff;
  color: #000000;
}

.btn-hero.play svg {
  fill: #000000;
}

.btn-hero.details,
.btn-hero.fav {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.btn-hero.details svg,
.btn-hero.fav svg {
  fill: #ffffff;
}

.btn-hero.focused {
  border-color: var(--focus-border);
  box-shadow: var(--focus-glow);
  transform: scale(1.08);
}

/* CAROUSEL RAILS (SWIMLANES) */
.rails-container {
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding: 20px 0 80px 60px;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rail-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-right: 60px;
}

.rail-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.rail-count {
  font-size: 16px;
  color: var(--text-muted);
}

.rail-items {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px 0;
  scroll-behavior: smooth;
}

/* CARDS */
.card {
  position: relative;
  flex-shrink: 0;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  border: 2px solid transparent;
}

.card.focused {
  border-color: var(--focus-border);
  box-shadow: var(--focus-glow);
  transform: scale(1.08) translateY(-4px);
  z-index: 20;
}

/* Card VOD (Vertical 2:3) */
.card-vod {
  width: 210px;
  height: 315px;
}

.card-vod img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--bg-card);
}

.card-vod .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 8, 11, 0.95) 0%, rgba(7, 8, 11, 0.3) 50%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.card-vod.focused .card-overlay {
  opacity: 1;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Card Live Channel (16:9 widescreen) */
.card-channel {
  width: 280px;
  height: 158px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #181c28 0%, #12151f 100%);
  padding: 20px;
  text-align: center;
}

.channel-logo-wrap {
  width: 80px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.channel-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.channel-name {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-badge-live {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  background: rgba(229, 9, 20, 0.85);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.4; transform: scale(0.9); }
}

/* Progress bar for continue watching */
.card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
}

.card-progress-bar {
  height: 100%;
  background: var(--accent);
}

/* Rail Carousel Navigation Arrows for TV Pointer */
.rail-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
  line-height: 1;
}

.rail-nav-btn:hover, .rail-nav-btn.focused {
  background: var(--accent);
  border-color: #ffffff;
  box-shadow: var(--focus-glow);
  transform: scale(1.15);
}
