:root {
  --bg: #141414;
  --bg-elevated: #1f1f1f;
  --surface: #2a2a2a;
  --text: #e5e5e5;
  --text-muted: #a3a3a3;
  --accent: #e50914;
  --accent-hover: #b20710;
  --green: #46d369;
  --radius: 6px;
  --shadow: 0 8px 30px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem 2.5rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
  transition: background 0.3s;
}

.navbar.scrolled {
  background: rgba(20,20,20,0.95);
  backdrop-filter: blur(8px);
}

.nav-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: var(--accent);
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.nav-links a:hover,
.nav-links a.active { opacity: 1; }

/* Hero */
.hero {
  position: relative;
  height: 60vh;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  padding: 3rem 2.5rem;
  background:
    radial-gradient(circle at 70% 30%, rgba(229,9,20,0.25) 0%, transparent 55%),
    linear-gradient(to top, var(--bg) 0%, transparent 60%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%23141414" width="100" height="100"/><circle fill="%231f1f1f" cx="50" cy="50" r="40"/></svg>');
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  letter-spacing: 3px;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.btn-play {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s, transform 0.2s;
}

.btn-play:hover {
  background: var(--accent-hover);
  transform: scale(1.03);
}

/* Player */
.player-section {
  padding: 1.5rem 2.5rem 0.5rem;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16/9;
}

.video-container video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.channel-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.video-container:hover .channel-overlay { opacity: 1; }

.live-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  letter-spacing: 1px;
}

.channel-name-overlay {
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}

/* Channels */
.channels-row,
.epg-section {
  padding: 2rem 2.5rem;
}

.row-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.channel-card {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
  aspect-ratio: 16/10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  border: 1px solid transparent;
}

.channel-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  z-index: 1;
}

.channel-card:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow);
  border-color: rgba(255,255,255,0.08);
  z-index: 2;
}

.channel-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.channel-thumb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.35;
  z-index: 0;
}

.channel-info {
  position: relative;
  z-index: 2;
}

.channel-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.channel-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.channel-info .live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 0.35rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* EPG */
.epg-container {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 1rem;
  max-height: 520px;
  overflow-y: auto;
}

.epg-channel-block {
  margin-bottom: 1.25rem;
}

.epg-channel-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.epg-channel-header .live-dot { background: var(--green); }

.epg-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.epg-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
  font-size: 0.85rem;
  transition: background 0.2s;
}

.epg-item:hover { background: rgba(255,255,255,0.07); }

.epg-item.current {
  background: rgba(229,9,20,0.12);
  border-left: 3px solid var(--accent);
}

.epg-time {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 100px;
  font-size: 0.8rem;
}

.epg-title {
  flex: 1;
  font-weight: 500;
}

.epg-desc {
  color: var(--text-muted);
  font-size: 0.78rem;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epg-loading,
.epg-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-size: 0.9rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 2rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Responsive */
@media (max-width: 768px) {
  .navbar { padding: 0.6rem 1rem; gap: 1rem; }
  .hero { padding: 2rem 1rem; height: 45vh; }
  .hero h1 { font-size: 2.5rem; }
  .player-section,
  .channels-row,
  .epg-section { padding-left: 1rem; padding-right: 1rem; }
  .channels-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
