/* styles.css */
:root {
  --bg: #07080d;
  --bg-elev: #10121a;
  --bg-card: #151824;
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #e50914;
  --primary-hover: #f6121d;
  --gold: #f5c518;
  --border: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Header */
.cine-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 8, 13, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.cine-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cine-brand-group {
  display: flex;
  align-items: center;
  gap: 32px;
}
.cine-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
}
.cine-logo strong { color: var(--primary); }
.cine-logo-icon {
  background: var(--primary);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.cine-pro-tag {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(245, 197, 24, 0.16);
  color: var(--gold);
  border: 1px solid rgba(245, 197, 24, 0.35);
  font-weight: 700;
}
.cine-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.cine-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cine-nav a:hover, .cine-nav a.active {
  color: #fff;
}
.nav-pill {
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: 999px;
}
.cine-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.quick-search-box {
  position: relative;
  width: 290px;
}
.quick-search-input {
  width: 100%;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.88rem;
}
.quick-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #141722;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.7);
  overflow: hidden;
  z-index: 120;
}
.qs-head {
  padding: 8px 14px;
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
}
.qs-item {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.qs-item:hover { background: rgba(229, 9, 20, 0.15); }
.qs-title { font-size: 0.9rem;
  font-weight: 600; }
.qs-meta { font-size: 0.76rem; color: var(--muted); }
.qs-imdb { color: var(--gold); font-weight: 700; font-size: 0.84rem; }
.cine-random-btn {
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
}
.cine-random-btn:hover { background: rgba(255,255,255,0.14); }

/* Hero */
.hero-showcase {
  position: relative;
  min-height: 540px;
  display: flex;
  align-items: flex-end;
  padding: 56px 28px 42px;
  overflow: hidden;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transition: background-image 0.5s ease;
}
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7,8,13,0.96) 0%, rgba(7,8,13,0.78) 52%, rgba(7,8,13,0.3) 100%),
              linear-gradient(180deg, rgba(7,8,13,0.2) 0%, rgba(7,8,13,1) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}
.hero-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hero-featured-pill {
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.6px;
}
.hero-imdb {
  background: rgba(245, 197, 24, 0.16);
  color: var(--gold);
  border: 1px solid rgba(245, 197, 24, 0.4);
  font-weight: 700;
  font-size: 0.84rem;
  padding: 3px 10px;
  border-radius: 6px;
}
.hero-tag {
  background: rgba(255,255,255,0.1);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
}
.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 900;
  margin: 0 0 12px;
  line-height: 1.08;
}
.hero-desc {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 1.04rem;
  margin: 0 0 16px;
}
.hero-credits {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.btn-play-lg {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}
.btn-play-lg:hover { background: var(--primary-hover); }
.btn-glass-lg {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn-glass-lg:hover { background: rgba(255,255,255,0.18); }
.hero-switcher {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.hero-thumb-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #cbd5e1;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  white-space: nowrap;
}
.hero-thumb-btn.active {
  background: rgba(229, 9, 20, 0.22);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}
.ht-meta { color: var(--gold); }

/* Discovery Bar */
.discovery-bar-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 28px 8px;
}
.discovery-bar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.disc-search { flex: 1 1 280px; }
.disc-search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 0.92rem;
}
.disc-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.disc-filters select {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #171a26;
  color: #fff;
  font-size: 0.86rem;
}
.disc-reset-btn {
  padding: 10px 14px;
  border-radius: 9px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0 4px;
}
.cat-pill {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.cat-pill.active, .cat-pill:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Main Sections & Cards */
.cine-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 28px 64px;
}
.cine-section { margin-top: 36px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}
.section-sub { color: var(--muted); font-size: 0.86rem; }
.movie-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 18px;
}
.movie-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.movie-card {
  cursor: pointer;
  transition: transform 0.25s ease;
}
.movie-card:hover { transform: translateY(-6px); }
.movie-poster-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.movie-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.movie-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.badge-imdb {
  background: rgba(0,0,0,0.75);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 6px;
}
.badge-new {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 3px 7px;
  border-radius: 5px;
}
.movie-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(255,255,255,0.2);
}
.movie-progress-fill {
  height: 100%;
  background: var(--primary);
}
.movie-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 8, 13, 0.94);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.movie-poster-wrap:hover .movie-hover-overlay { opacity: 1; }
.hover-top-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--gold);
  margin-bottom: 6px;
}
.hover-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
}
.hover-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin: 0 0 8px;
  line-height: 1.4;
}
.hover-cast {
  font-size: 0.73rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.hover-actions {
  display: flex;
  gap: 6px;
}
.h-btn {
  border: none;
  border-radius: 7px;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}
.h-btn.play {
  flex: 1;
  background: var(--primary);
  color: #fff;
}
.h-btn.list, .h-btn.info {
  background: rgba(255,255,255,0.14);
  color: #fff;
  width: 34px;
}
.h-btn.list.added {
  background: #16a34a;
}
.movie-card-info { padding: 10px 4px 0; }
.movie-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.movie-card-sub {
  display: flex;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Inline Detail */
.inline-detail-banner {
  position: relative;
  padding: 36px 28px;
  border-bottom: 1px solid var(--border);
}
.inline-detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  opacity: 0.25;
}
.inline-detail-content {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
}
.back-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 20px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
.detail-poster {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
}
.detail-orig { color: var(--muted); margin-top: -6px; }
.detail-desc { font-size: 1.05rem; max-width: 760px; color: #e2e8f0; }
.detail-credits {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 18px 0 24px;
  color: #cbd5e1;
  font-size: 0.92rem;
}
.similar-block { margin-top: 40px; }

/* Video Player Modal */
.player-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.player-modal {
  width: 100%;
  max-width: 1120px;
  background: #0d0f17;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(0,0,0,0.85);
}
.player-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #121521;
  border-bottom: 1px solid var(--border);
}
.player-sample-badge {
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 2px;
}
.player-sample-badge span {
  background: rgba(245, 197, 24, 0.18);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 800;
}
.player-title { margin: 0; font-size: 1.1rem; }
.player-sub { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.player-close-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}
.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
}
.player-iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.player-controls-bar {
  padding: 14px 20px 18px;
  background: #121521;
  border-top: 1px solid var(--border);
}
.player-timeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.player-time {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: #cbd5e1;
  min-width: 44px;
}
.player-slider {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
}
.player-buttons-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.player-left-btns, .player-right-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}
.p-ctrl-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.p-ctrl-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
}
.player-vol-slider {
  width: 100px;
  accent-color: var(--primary);
}
.player-vol-label {
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 36px;
}

/* Footer */
.cine-footer {
  background: #05060a;
  border-top: 1px solid var(--border);
  padding: 48px 28px 28px;
}
.cine-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cine-footer-desc {
  max-width: 420px;
  color: var(--muted);
  font-size: 0.9rem;
}
.cine-footer-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.cine-footer-cols h4 { margin: 0 0 12px; font-size: 0.95rem; }
.cine-footer-cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cine-footer-bottom {
  max-width: 1440px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-poster { max-width: 220px; }
  .quick-search-box { width: 100%; }
}
