/* ── CSS VARIABLES ── */
:root {
  --red: #e50914;
  --red-dark: #b0060f;
  --bg: #0d0d0d;
  --bg2: #141414;
  --bg3: #1c1c1c;
  --card-bg: #1a1a1a;
  --text: #f0f0f0;
  --muted: #999;
  --border: #2a2a2a;
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── BASE ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  overflow-x: hidden;
}

/* ══════════════════════════════
   TOP BAR
══════════════════════════════ */
.topbar {
  background: #0a0a0a;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.topbar .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Bebas Neue', cursive;
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--text);
  text-decoration: none;
}

.topbar .logo .play-icon {
  width: 30px;
  height: 22px;
  background: var(--red);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar .logo .play-icon::after {
  content: '';
  border: 0;
  border-left: 9px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 2px;
}

.search-wrap {
  position: relative;
}

.search-wrap input {
  background: #1e1e1e;
  border: 1px solid #333;
  color: var(--text);
  border-radius: 4px 0 0 4px;
  padding: 7px 14px;
  font-size: 13px;
  width: 220px;
  outline: none;
}

.search-wrap input::placeholder {
  color: #666;
}

.search-wrap button {
  background: var(--red);
  border: none;
  color: #fff;
  padding: 7px 18px;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.search-wrap button:hover {
  background: var(--red-dark);
}

.social-icons a {
  color: var(--muted);
  font-size: 15px;
  margin-left: 12px;
  text-decoration: none;
  transition: color .2s;
}

.social-icons a:hover {
  color: var(--red);
}

/* ── Login button in navbar ── */
.nav-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--red);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 7px 18px;
  border-radius: 4px;
  margin: 6px 0 6px 12px;
  transition: background .2s, transform .15s;
}

.nav-login-btn:hover {
  background: var(--red-dark);
  color: #fff !important;
  transform: translateY(-1px);
}

.nav-login-btn.active {
  background: var(--red-dark);
  box-shadow: 0 0 0 2px rgba(229,9,20,.4);
}

/* ══════════════════════════════
   MAIN NAVBAR
══════════════════════════════ */
.main-nav {
  background: #111;
  border-bottom: 2px solid var(--border);
}

.main-nav .nav-link {
  color: var(--muted) !important;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 12px 16px !important;
  text-transform: uppercase;
  transition: color .2s;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  color: var(--red) !important;
}

.main-nav .nav-link.active {
  border-bottom: 2px solid var(--red);
}

.dropdown-menu {
  background: #161616;
  border: 1px solid var(--border);
  min-width: 160px;
}

.dropdown-item {
  color: #ccc;
  font-size: 13px;
  padding: 8px 16px;
}

.dropdown-item:hover {
  background: var(--red);
  color: #fff;
}

/* ══════════════════════════════
   HERO CAROUSEL
══════════════════════════════ */
.hero-carousel {
  position: relative;
  overflow: hidden;
}

.hero-slide {
  position: relative;
  height: 480px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 48px;
  background-size: cover;
  background-position: center;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
}

.hero-slide::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  padding: 0 40px;
}

.hero-title {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.stars {
  color: #f5c518;
  font-size: 13px;
}

.meta-text {
  color: #ccc;
  font-size: 13px;
}

.badge-genre {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 2px;
  letter-spacing: 1px;
}

.hero-desc {
  color: #bbb;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 14px;
  max-width: 380px;
}

.hero-details {
  margin-bottom: 20px;
  font-size: 13px;
}

.hero-details span {
  color: var(--red);
  font-weight: 700;
  margin-right: 4px;
}

.hero-details div {
  margin-bottom: 4px;
  color: #aaa;
}

.btn-trailer {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .2s, transform .15s;
}

.btn-trailer:hover {
  background: var(--red-dark);
  transform: scale(1.03);
}

/* Carousel controls */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 44px;
  height: 44px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.55);
  border: 1px solid #444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.hero-carousel .carousel-control-prev { left: 16px; }
.hero-carousel .carousel-control-next { right: 16px; }

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
  background: var(--red);
  border-color: var(--red);
}

.carousel-indicators button {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: #555;
  border: none;
  transition: background .2s;
}

.carousel-indicators .active {
  background: var(--red);
}

/* ══════════════════════════════
   SECTION HEADER
══════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Bebas Neue', cursive;
  font-size: 22px;
  letter-spacing: 2px;
}

.section-title .play-dot {
  width: 22px;
  height: 16px;
  background: var(--red);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-title .play-dot::after {
  content: '';
  border-left: 7px solid #fff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-left: 2px;
}

.section-title em {
  color: var(--text);
  font-style: normal;
}

.section-title strong {
  color: var(--red);
  font-style: normal;
}

.btn-view-all {
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 18px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: .5px;
  transition: background .2s;
}

.btn-view-all:hover {
  background: var(--red-dark);
  color: #fff;
}

/* ══════════════════════════════
   MOVIE CARDS
══════════════════════════════ */
.movies-section {
  background: var(--bg2);
  padding: 40px 0;
}

.movie-card {
  background: var(--card-bg);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  cursor: pointer;
  border: 1px solid var(--border);
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(229,9,20,.18);
}

.movie-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.movie-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.movie-card:hover .movie-card-thumb img {
  transform: scale(1.07);
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.38);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s;
}

.movie-card:hover .play-overlay {
  opacity: 1;
}

.play-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(229,9,20,.9);
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-circle::after {
  content: '';
  border-left: 14px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 3px;
}

.movie-card-body {
  padding: 14px;
}

.movie-card-title {
  color: var(--red);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card-desc {
  color: #aaa;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.movie-card-stars {
  color: #f5c518;
  font-size: 12px;
}

.movie-card-views {
  color: #666;
  font-size: 11px;
  margin-top: 4px;
}

/* ══════════════════════════════
   RATING FORM
══════════════════════════════ */
.rating-section {
  background: var(--bg3);
  padding: 50px 0;
  border-top: 1px solid var(--border);
}

.rating-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px 40px;
  max-width: 600px;
  margin: 0 auto;
}

.rating-box h3 {
  font-family: 'Bebas Neue', cursive;
  font-size: 26px;
  letter-spacing: 2px;
  margin-bottom: 6px;
  color: var(--text);
}

.rating-box p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.star-picker {
  display: flex;
  flex-direction: row-reverse;
  gap: 6px;
  margin-bottom: 20px;
}

.star-picker label {
  font-size: 28px;
  cursor: pointer;
  color: #444;
  transition: color .15s;
}

.star-picker input {
  display: none;
}

.star-picker input:checked ~ label,
.star-picker label:hover,
.star-picker label:hover ~ label {
  color: #f5c518;
}

.form-label-custom {
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.form-control-dark {
  background: #111;
  border: 1px solid #333;
  color: var(--text);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  width: 100%;
  outline: none;
  transition: border-color .2s;
  font-family: 'Barlow', sans-serif;
}

.form-control-dark:focus {
  border-color: var(--red);
}

.form-control-dark::placeholder {
  color: #555;
}

.btn-submit {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 11px 28px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
  letter-spacing: .5px;
  margin-top: 8px;
}

.btn-submit:hover {
  background: var(--red-dark);
  transform: scale(1.02);
}

.rating-success {
  display: none;
  text-align: center;
  padding: 16px;
  color: #4caf50;
  font-weight: 700;
  font-size: 16px;
}

/* ══════════════════════════════
   TRAILER MODAL
══════════════════════════════ */
.trailer-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.trailer-modal-backdrop.show {
  display: flex;
}

.trailer-modal-inner {
  position: relative;
  width: 90%;
  max-width: 860px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(229,9,20,.3);
  animation: popIn .25s ease;
}

@keyframes popIn {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

.trailer-modal-inner .modal-header-bar {
  background: #111;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.modal-title-bar {
  font-family: 'Bebas Neue', cursive;
  font-size: 20px;
  letter-spacing: 1px;
}

.modal-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: color .2s;
}

.modal-close:hover {
  color: var(--red);
}

.trailer-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.trailer-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.trailer-placeholder {
  position: absolute;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.trailer-placeholder .big-play {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 1.8s infinite;
}

.trailer-placeholder .big-play::after {
  content: '';
  border-left: 20px solid #fff;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 4px;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(229,9,20,.5); }
  50%       { box-shadow: 0 0 0 18px rgba(229,9,20,0); }
}

.trailer-placeholder p {
  color: #888;
  font-size: 13px;
}

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
footer {
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  color: #555;
  font-size: 12px;
}

footer a {
  color: var(--red);
  text-decoration: none;
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 767px) {
  .hero-slide       { height: 340px; }
  .hero-title       { font-size: 36px; }
  .hero-content     { padding: 0 20px; }
  .rating-box       { padding: 24px 20px; }
  .topbar .social-icons { display: none; }
}
