/* ===========================
   NAVRAS — Movie Detail CSS
   Clean, IMDb-inspired
   =========================== */

/* Loading state */
.movie-loading {
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
}

.movie-loading-inner { text-align: center; }

.movie-loading-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--ink3);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.movie-loading-text { font-size: 14px; color: var(--text-muted); }

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 32px; font-size: 12px;
  color: var(--text-muted);
  border-bottom: 0.5px solid var(--ink3);
  background: var(--ink2);
}

.breadcrumb a { color: var(--text-muted); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--text-dim); }

/* HERO */
.movie-hero {
  position: relative; overflow: hidden;
  min-height: 420px;
  display: flex; align-items: flex-end;
}

.movie-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  transition: opacity 0.5s;
}

.movie-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(12,10,8,0.97) 0%,
    rgba(12,10,8,0.85) 40%,
    rgba(12,10,8,0.4) 70%,
    rgba(12,10,8,0.1) 100%
  );
}

.movie-hero-content {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 200px 1fr;
  gap: 32px; padding: 32px;
  align-items: end; width: 100%;
  max-width: 1200px; margin: 0 auto;
}

/* Poster */
.movie-poster-wrap { position: relative; }

.movie-poster-img {
  width: 200px; height: 286px;
  border-radius: 12px; overflow: hidden;
  background: var(--ink3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  position: relative;
}

.movie-poster-img img {
  width: 100%; height: 100%; object-fit: cover;
}

.poster-shimmer {
  width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--ink3) 25%, var(--ink2) 50%, var(--ink3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.poster-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(201,168,76,0.9);
  border: none; cursor: pointer;
  font-size: 18px; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, background 0.15s;
  z-index: 2;
}

.poster-play:hover { transform: translate(-50%,-50%) scale(1.1); }

.poster-actions {
  display: flex; gap: 8px; margin-top: 10px;
}

.poster-action-btn {
  flex: 1; padding: 8px 0; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: opacity 0.15s;
}

.poster-action-btn.gold {
  background: var(--gold); color: var(--ink2); border: none;
}

.poster-action-btn.secondary {
  background: transparent; color: var(--text-muted);
  border: 0.5px solid var(--ink3);
}

.poster-action-btn:hover { opacity: 0.8; }

/* Film info */
.movie-info { padding-bottom: 4px; }

.movie-industry-row {
  display: flex; gap: 8px; margin-bottom: 12px;
}

.movie-lang-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 4px;
  background: var(--gold); color: var(--ink2);
  text-transform: uppercase; letter-spacing: 0.06em;
}

.movie-industry-badge {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 4px;
  background: transparent; color: var(--gold);
  border: 0.5px solid var(--gold);
  text-transform: uppercase; letter-spacing: 0.06em;
}

.movie-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 600; color: #fff;
  line-height: 1.1; margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.movie-tagline {
  font-size: 14px; color: rgba(255,255,255,0.6);
  font-style: italic; margin-bottom: 6px;
}

.movie-meta-line {
  font-size: 13px; color: rgba(255,255,255,0.65);
  margin-bottom: 4px;
}

.movie-director {
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}

/* Score block */
.score-block {
  display: flex; gap: 20px; align-items: center;
  margin-bottom: 14px; flex-wrap: wrap;
}

.audience-score-big {
  width: 80px; height: 80px; border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.audience-score-big.green { background: #1A7A3C; }
.audience-score-big.amber { background: #C47A00; }
.audience-score-big.red { background: #C0392B; }

.nsb-num { font-size: 32px; font-weight: 700; line-height: 1; }
.nsb-label { font-size: 8px; font-weight: 700; opacity: 0.85; margin-top: 3px; letter-spacing: 0.06em; }

.score-bars { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 180px; }

.score-bar-row { display: flex; align-items: center; gap: 10px; }

.score-bar-label { font-size: 11px; color: rgba(255,255,255,0.6); min-width: 64px; flex-shrink: 0; }

.score-bar-track {
  flex: 1; height: 6px; background: rgba(255,255,255,0.15);
  border-radius: 3px; overflow: hidden;
}

.score-bar-fill {
  height: 100%; border-radius: 3px;
  transition: width 1s ease;
}

.score-bar-fill.green { background: #2ECC71; }
.score-bar-fill.gold { background: var(--gold); }

.score-bar-num { font-size: 11px; color: rgba(255,255,255,0.7); min-width: 28px; text-align: right; }

/* External scores */
.external-scores-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}

.certified-hit {
  font-size: 11px; font-weight: 700;
  background: var(--gold); color: var(--ink2);
  padding: 4px 12px; border-radius: 6px;
}

.ext-score-badge {
  font-size: 12px; color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.1);
  padding: 4px 12px; border-radius: 6px;
  border: 0.5px solid rgba(255,255,255,0.2);
  text-decoration: none; transition: background 0.15s;
}

.ext-score-badge:hover { background: rgba(255,255,255,0.15); }
.ext-score-badge strong { color: #fff; font-weight: 700; }

/* Rasa tags in hero */
.movie-rasas-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}

.movie-rasa-tag {
  font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 20px;
  border: 0.5px solid rgba(201,168,76,0.4);
  color: var(--gold); background: rgba(201,168,76,0.1);
  text-decoration: none; transition: background 0.15s;
  display: flex; align-items: center; gap: 5px;
}

.movie-rasa-tag:hover { background: rgba(201,168,76,0.2); }

/* BODY LAYOUT */
.movie-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 48px;
}

/* Sections */
.movie-section {
  padding: 24px 0;
  border-bottom: 0.5px solid var(--ink3);
}

.movie-section:last-child { border-bottom: none; }

.movie-section-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}

.movie-section-title::before {
  content: ''; width: 3px; height: 14px;
  background: var(--gold); border-radius: 2px;
}

.desi-score-sub {
  font-size: 10px; color: var(--text-dim);
  font-weight: 400; text-transform: none; letter-spacing: 0;
}

/* Cast grid */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
}

.cast-card { text-align: center; }

.cast-photo {
  width: 72px; height: 72px; border-radius: 50%;
  overflow: hidden; margin: 0 auto 6px;
  background: var(--ink3);
  display: flex; align-items: center; justify-content: center;
}

.cast-photo img { width: 100%; height: 100%; object-fit: cover; }

.cast-initial {
  font-size: 24px; font-weight: 700;
  color: var(--text-muted);
}

.cast-name { font-size: 11px; font-weight: 500; color: var(--text); line-height: 1.3; }
.cast-char { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* Desi bars */
.desi-bars { display: flex; flex-direction: column; gap: 12px; }

.desi-bar-row { display: flex; align-items: center; gap: 12px; }

.desi-bar-label {
  font-size: 12px; color: var(--text-muted);
  min-width: 140px; flex-shrink: 0;
}

.desi-bar-track {
  flex: 1; height: 7px; background: var(--ink3);
  border-radius: 4px; overflow: hidden;
}

.desi-bar-fill {
  height: 100%; border-radius: 4px;
  background: #2ECC71;
  transition: width 1s ease;
}

.desi-bar-fill.gold { background: var(--gold); }

.desi-bar-val {
  font-size: 13px; font-weight: 600; color: var(--text);
  min-width: 28px; text-align: right;
}

/* Rating section */
.rate-section {}
.rate-label { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }

.rate-rasa-grid {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}

.rate-rasa-btn {
  padding: 6px 14px; border-radius: 20px; font-size: 12px;
  font-weight: 500; border: 0.5px solid var(--ink3);
  color: var(--text-muted); background: var(--ink2);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}

.rate-rasa-btn:hover { border-color: var(--gold-dim); color: var(--gold); }
.rate-rasa-btn.selected { border-color: var(--gold); color: var(--gold); background: var(--gold-bg); }

.star-rating-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }

.star-row { display: flex; gap: 6px; margin-bottom: 12px; }

.star-btn {
  font-size: 28px; color: var(--ink3);
  background: none; border: none; cursor: pointer;
  transition: color 0.15s; line-height: 1;
}

.star-btn.lit { color: var(--gold); }

.submit-rating-btn {
  padding: 8px 24px; border-radius: 8px;
  background: var(--gold); color: var(--ink2);
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer; font-family: inherit;
}

.rating-success {
  padding: 12px 16px; border-radius: 8px;
  background: rgba(26,122,60,0.1);
  border: 0.5px solid rgba(26,122,60,0.3);
  color: #2ECC71; font-size: 13px;
}

/* Similar films */
.similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.similar-card { text-decoration: none; display: block; }

.similar-poster {
  width: 100%; aspect-ratio: 2/3;
  border-radius: 8px; overflow: hidden;
  background: var(--ink3); position: relative;
  margin-bottom: 6px; transition: transform 0.2s;
}

.similar-card:hover .similar-poster { transform: scale(1.03); }
.similar-poster img { width: 100%; height: 100%; object-fit: cover; }

.similar-score {
  position: absolute; bottom: 6px; right: 6px;
  font-size: 12px; font-weight: 700; color: #fff;
  padding: 2px 6px; border-radius: 4px;
}

.similar-score.green { background: #1A7A3C; }
.similar-score.amber { background: #C47A00; }
.similar-score.red { background: #C0392B; }

.similar-title {
  font-size: 11px; font-weight: 500; color: var(--text);
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.similar-year { font-size: 10px; color: var(--text-muted); }

/* RIGHT SIDEBAR */
.movie-right {
  padding: 24px 0 24px 28px;
  border-left: 0.5px solid var(--ink3);
  display: flex; flex-direction: column; gap: 16px;
}

.detail-card {
  background: var(--ink2); border: 0.5px solid var(--ink3);
  border-radius: 10px; padding: 16px;
}

.detail-card-title {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.07em; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}

.detail-card-title::before {
  content: ''; width: 3px; height: 12px;
  background: var(--gold); border-radius: 2px;
}

.detail-rows { display: flex; flex-direction: column; gap: 8px; }

.detail-row {
  display: flex; justify-content: space-between;
  align-items: baseline; gap: 8px;
  padding-bottom: 8px; border-bottom: 0.5px solid var(--ink3);
  font-size: 12px;
}

.detail-row:last-child { border-bottom: none; padding-bottom: 0; }

.detail-key { color: var(--text-muted); flex-shrink: 0; }
.detail-val { color: var(--text); font-weight: 500; text-align: right; }

/* Mood CTA card */
.mood-cta-card {}
.mood-cta-rasas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.mood-cta-btn {
  display: block; width: 100%; padding: 9px;
  background: var(--gold); color: var(--ink2);
  border-radius: 8px; text-align: center;
  font-size: 13px; font-weight: 600;
  text-decoration: none; transition: opacity 0.15s;
}
.mood-cta-btn:hover { opacity: 0.85; }

/* TRAILER MODAL */
.trailer-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}

.trailer-modal-inner {
  width: min(90vw, 900px);
  aspect-ratio: 16/9;
  position: relative;
  border-radius: 12px; overflow: hidden;
}

.trailer-close {
  position: absolute; top: -40px; right: 0;
  background: none; border: none;
  color: #fff; font-size: 24px; cursor: pointer;
  padding: 4px 8px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .movie-hero-content { grid-template-columns: 160px 1fr; gap: 20px; padding: 20px; }
  .movie-poster-img { width: 160px; height: 228px; }
  .movie-title { font-size: 26px; }
  .movie-body { grid-template-columns: 1fr; padding: 0 20px 32px; }
  .movie-right { border-left: none; border-top: 0.5px solid var(--ink3); padding-left: 0; }
}

@media (max-width: 600px) {
  .movie-hero-content { grid-template-columns: 1fr; }
  .movie-poster-wrap { display: none; }
  .score-block { flex-direction: column; align-items: flex-start; }
  .score-bars { width: 100%; }
  .breadcrumb { padding: 10px 16px; }
}
