:root {
  --bg-color: #080911;
  --card-bg: #121526;
  --accent-color: #00d2ff;
  --accent-glow: rgba(0, 210, 255, 0.5);
  --text-main: #ffffff;
  --text-secondary: #a0a5c0;
  --glass: rgba(10, 12, 20, 0.85);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #1e243d; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.brand { font-size: 1.8rem; font-weight: 900; letter-spacing: 1px; }
.logo-text { color: #fff; }
.logo-plus { color: var(--accent-color); text-shadow: 0 0 15px var(--accent-glow); }

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 15px;
  font-size: 0.95rem;
  transition: 0.3s;
}
.nav-links a.active, .nav-links a:hover { color: var(--accent-color); }

.right-nav { display: flex; align-items: center; gap: 15px; }
.search-box input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  color: #fff;
  outline: none;
  transition: 0.3s;
}
.search-box input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-glow);
}

.btn-settings {
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.3s;
}
.btn-settings:hover { background: var(--accent-color); transform: rotate(90deg); }

/* PANEL AJUSTES */
.settings-panel {
  position: fixed;
  top: 0; right: -400px;
  width: 380px;
  height: 100vh;
  background: linear-gradient(135deg, #0f1220, #050710);
  z-index: 200;
  border-left: 1px solid rgba(0, 210, 255, 0.2);
  transition: right 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
.settings-panel.open { right: 0; }
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.settings-header h3 { color: var(--accent-color); }
.btn-close-settings {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  transition: 0.3s;
}
.btn-close-settings:hover { color: var(--accent-color); transform: scale(1.2); }

.settings-body { padding: 20px 25px; }
.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 15px;
}
.setting-item h4 { font-size: 0.95rem; margin-bottom: 3px; }
.setting-item p { font-size: 0.75rem; color: var(--text-secondary); }
.setting-item select {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

/* SWITCH TOGGLE */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #333;
  transition: 0.4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px; width: 20px;
  left: 3px; bottom: 3px;
  background: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider { background: var(--accent-color); box-shadow: 0 0 10px var(--accent-glow); }
input:checked + .slider:before { transform: translateX(24px); }

/* HERO BANNER */
.hero-banner {
  height: 85vh;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 60px 40px;
  transition: background 0.7s ease-in-out;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-color) 5%, rgba(8,9,17,0.6) 50%, transparent 100%),
              linear-gradient(to right, rgba(8,9,17,0.8), transparent 60%);
}
.hero-content { position: relative; z-index: 2; max-width: 650px; }
.badge {
  background: var(--accent-color);
  color: #000;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 1px;
}
.hero-content h1 { font-size: 3.5rem; margin: 15px 0; line-height: 1.1; font-weight: 900; }
.hero-content p { color: var(--text-secondary); font-size: 1rem; margin-bottom: 25px; line-height: 1.5; }
.hero-buttons { display: flex; gap: 15px; }

.btn {
  padding: 13px 32px;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary { background: var(--accent-color); color: #000; }
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 0 20px var(--accent-glow); }
.btn-secondary { background: rgba(255,255,255,0.15); color: #fff; backdrop-filter: blur(10px); }
.btn-secondary:hover { background: rgba(255,255,255,0.25); }

/* CARRUSELES */
.content-section { padding: 30px 40px; }
.content-section h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  font-weight: 600;
}
.carousel {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 15px 0;
  scroll-behavior: smooth;
}
.card {
  min-width: 200px;
  height: 300px;
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.3s;
}
.card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 15px 30px rgba(0,0,0,0.7), 0 0 20px var(--accent-glow);
  z-index: 10;
}
.card img { width: 100%; height: 100%; object-fit: cover; }
.card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 15px;
  background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
}
.card-info h4 { font-size: 0.9rem; }

/* REPRODUCTOR CINEMÁTICO */
.player-modal {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.player-modal.active { display: block; opacity: 1; }

#videoPlayer {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}

.player-top, .player-bottom, .center-controls {
  position: absolute;
  z-index: 10;
  transition: opacity 0.4s;
  pointer-events: none;
}
.player-modal.hide-controls .player-top,
.player-modal.hide-controls .player-bottom,
.player-modal.hide-controls .center-controls {
  opacity: 0;
}
.player-modal:not(.hide-controls) .player-top,
.player-modal:not(.hide-controls) .player-bottom,
.player-modal:not(.hide-controls) .center-controls {
  opacity: 1;
  pointer-events: auto;
}

.player-top {
  top: 0; left: 0; right: 0;
  padding: 20px 30px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn-back {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}
.btn-back:hover { color: var(--accent-color); transform: translateX(-5px); }
.player-title-container h3 { font-size: 1.1rem; font-weight: 500; }

.center-controls {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 40px;
  align-items: center;
}
.control-btn-large {
  background: rgba(0,0,0,0.5);
  border: 2px solid rgba(255,255,255,0.3);
  color: #fff;
  width: 60px; height: 60px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  transition: 0.3s;
  backdrop-filter: blur(10px);
}
.control-btn-large:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: scale(1.1);
}
.control-btn-huge {
  background: var(--accent-color);
  border: none;
  color: #000;
  width: 90px; height: 90px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 2rem;
  transition: 0.3s;
  box-shadow: 0 0 30px var(--accent-glow);
}
.control-btn-huge:hover { transform: scale(1.15); }

.player-bottom {
  bottom: 0; left: 0; right: 0;
  padding: 15px 30px 25px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}
.progress-container {
  width: 100%;
  padding: 8px 0;
  cursor: pointer;
}
.progress-bar {
  position: relative;
  height: 5px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  transition: 0.2s;
}
.progress-container:hover .progress-bar { height: 8px; }
.progress-buffered {
  position: absolute;
  height: 100%;
  background: rgba(255,255,255,0.4);
  border-radius: 3px;
}
.progress-filled {
  position: absolute;
  height: 100%;
  background: var(--accent-color);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--accent-glow);
}
.progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 15px;
  height: 15px;
  background: var(--accent-color);
  border-radius: 50%;
  transition: transform 0.2s;
}
.progress-container:hover .progress-thumb { transform: translate(-50%, -50%) scale(1); }

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
.controls-left, .controls-right { display: flex; align-items: center; gap: 15px; }
.control-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  transition: 0.3s;
  padding: 5px;
}
.control-btn:hover { color: var(--accent-color); transform: scale(1.2); }

.volume-container { display: flex; align-items: center; gap: 8px; }
#volumeSlider {
  width: 0;
  overflow: hidden;
  transition: width 0.3s;
  accent-color: var(--accent-color);
}
.volume-container:hover #volumeSlider { width: 80px; }

.time-display { font-size: 0.9rem; color: var(--text-secondary); }

/* SPINNER LOADING */
.loading-spinner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: none;
}
.loading-spinner.active { display: block; }
.spinner {
  width: 60px; height: 60px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* NEXT UP CARD */
.next-up-card {
  position: absolute;
  bottom: 100px;
  right: 30px;
  width: 400px;
  background: rgba(15, 18, 32, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: 12px;
  padding: 15px;
  display: none;
  gap: 15px;
  z-index: 15;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px var(--accent-glow);
  animation: slideIn 0.5s ease-out;
}
.next-up-card.active { display: flex; }

@keyframes slideIn {
  from { transform: translateX(500px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.next-up-poster {
  width: 120px;
  height: 170px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}
.next-up-poster img { width: 100%; height: 100%; object-fit: cover; }

.next-up-info { flex: 1; display: flex; flex-direction: column; }
.next-up-label {
  color: var(--accent-color);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
}
.next-up-info h4 { font-size: 1.1rem; margin: 5px 0; }
.next-up-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.countdown-bar {
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}
.countdown-fill {
  height: 100%;
  background: var(--accent-color);
  width: 100%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--accent-glow);
}

.next-up-buttons { display: flex; gap: 8px; margin-top: auto; }
.next-up-buttons .btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  flex: 1;
}
.btn-x {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: 0.3s;
}
.btn-x:hover { background: rgba(255,50,50,0.7); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .navbar { padding: 10px 20px; }
  .nav-links { display: none; }
  .hero-banner { padding: 40px 20px; height: 70vh; }
  .hero-content h1 { font-size: 2rem; }
  .content-section { padding: 20px; }
  .card { min-width: 140px; height: 210px; }
  .next-up-card { width: calc(100% - 40px); right: 20px; left: 20px; }
  .settings-panel { width: 100%; right: -100%; }
  .center-controls { gap: 15px; }
  .control-btn-huge { width: 70px; height: 70px; }
  .control-btn-large { width: 50px; height: 50px; }
}
