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

:root {
  --bg:            #080002;
  --curtain-dark:  #200000;
  --curtain-mid:   #5c0808;
  --curtain-light: #8b1212;
  --gold:          #c9a84c;
  --gold-light:    #e8d080;
  --gold-dim:      #7a6030;
  --cream:         #f0ddb8;
  --cream-dim:     #b8a07a;
  --card-bg:       #110305;
  --card-border:   #3a1a08;
  --text-dim:      #7a6858;
  --red-accent:    #8b0000;
}

body {
  font-family: 'Raleway', sans-serif;
  background: var(--bg);
  color: var(--cream);
  min-height: 100vh;
}

/* =============================================
   LANDING PAGE
   ============================================= */
body.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Valance — top decorative bar */
.valance {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: repeating-linear-gradient(
    to right,
    var(--curtain-dark) 0px,
    var(--curtain-mid)  20px,
    var(--curtain-light) 40px,
    var(--curtain-mid)  60px,
    var(--curtain-dark) 80px
  );
  border-bottom: 3px solid var(--gold);
  z-index: 20;
}

/* Theater curtains */
.curtain {
  position: fixed;
  top: 36px;
  bottom: 0;
  width: 23%;
  z-index: 10;
  pointer-events: none;
}

.curtain.left {
  left: 0;
  background: repeating-linear-gradient(
    to right,
    #100000 0px,
    #3a0404 12px,
    #6b0a0a 26px,
    #8b1414 36px,
    #7a0e0e 46px,
    #520808 58px,
    #2e0202 70px,
    #100000 82px
  );
  clip-path: polygon(0 0, 100% 0, 72% 100%, 0 100%);
  box-shadow: 8px 0 30px rgba(0,0,0,0.8);
}

.curtain.right {
  right: 0;
  background: repeating-linear-gradient(
    to left,
    #100000 0px,
    #3a0404 12px,
    #6b0a0a 26px,
    #8b1414 36px,
    #7a0e0e 46px,
    #520808 58px,
    #2e0202 70px,
    #100000 82px
  );
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: -8px 0 30px rgba(0,0,0,0.8);
}

/* Stage center */
.stage {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top: 36px;
}

/* Film strip */
.film-strip {
  display: flex;
  gap: 3px;
  width: 100%;
  max-width: 640px;
}

.film-strip span {
  flex: 1;
  height: 18px;
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
}

/* Marquee box */
.marquee-box {
  position: relative;
  width: min(640px, 56vw);
  background: linear-gradient(160deg, #0e0206 0%, #08010a 100%);
  border: 2.5px solid var(--gold);
  padding: 52px 64px 48px;
  text-align: center;
  box-shadow:
    0 0 60px rgba(201, 168, 76, 0.12),
    0 0 120px rgba(139, 0, 0, 0.15),
    inset 0 0 80px rgba(0,0,0,0.6);
}

/* Bulbs */
.bulb-row {
  position: absolute;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
}
.bulb-row.top    { top: -7px; }
.bulb-row.bottom { bottom: -7px; }

.bulb-col {
  position: absolute;
  top: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.bulb-col.left  { left: -7px; }
.bulb-col.right { right: -7px; }

.bulb-row i,
.bulb-col i {
  display: block;
  width: 11px;
  height: 11px;
  background: radial-gradient(circle at 40% 35%, #fff5c0, var(--gold-light) 50%, var(--gold) 100%);
  border-radius: 50%;
  box-shadow: 0 0 5px 2px rgba(232, 208, 128, 0.55);
  animation: flicker 4s infinite;
}
.bulb-row i:nth-child(2n)   { animation-delay: 0.7s; }
.bulb-row i:nth-child(3n)   { animation-delay: 1.4s; }
.bulb-col i:nth-child(2n)   { animation-delay: 0.4s; }
.bulb-col i:nth-child(3n)   { animation-delay: 1.1s; }

@keyframes flicker {
  0%, 90%, 100% { opacity: 1; }
  92%            { opacity: 0.6; }
  94%            { opacity: 1; }
  96%            { opacity: 0.4; }
  98%            { opacity: 1; }
}

/* Marquee text */
.marquee-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.presenting {
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gold-dim);
  font-weight: 400;
}

.main-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4.5vw, 52px);
  color: var(--cream);
  font-weight: 700;
  line-height: 1.1;
  font-style: normal;
}

.main-title em {
  color: var(--gold);
  font-style: italic;
}

.cinema-word {
  font-family: 'Playfair Display', serif;
  font-size: clamp(42px, 7vw, 82px);
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 10px;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 0 30px rgba(201, 168, 76, 0.35);
}

.ornament {
  color: var(--gold-dim);
  font-size: 16px;
  letter-spacing: 4px;
  margin: 4px 0;
}

.tagline {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-style: italic;
  color: var(--cream-dim);
  letter-spacing: 1px;
}

.enter-btn {
  margin-top: 22px;
  display: inline-block;
  padding: 13px 42px;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  letter-spacing: 5px;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 0.3s ease;
}

.enter-btn:hover {
  background: var(--gold);
  color: #0a0103;
  box-shadow: 0 0 25px rgba(201, 168, 76, 0.35);
}

/* Floor glow */
.floor-glow {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(100, 20, 0, 0.25), transparent);
  z-index: 1;
  pointer-events: none;
}

/* =============================================
   MOVIES PAGE
   ============================================= */
body.movies-page {
  background:
    radial-gradient(ellipse at top, #2e1a22 0%, #1f1217 60%, #1a0e13 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.movies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: linear-gradient(to bottom, #2a1620, #1f1217);
  border-bottom: 1px solid #4a2a30;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 20px;
}

.back-link {
  color: var(--gold-dim);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
  min-width: 130px;
}
.back-link:hover { color: var(--gold); }

.header-title {
  text-align: center;
  flex: 1;
}

.header-title h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(18px, 2.5vw, 26px);
  color: var(--cream);
  font-weight: 700;
}

.header-title h1 em {
  color: var(--gold);
  font-style: italic;
}

.header-title p {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 3px;
}

.header-btns {
  display: flex;
  gap: 8px;
  min-width: 130px;
  justify-content: flex-end;
}

.add-movie-btn {
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 8px 18px;
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.add-movie-btn:hover {
  background: var(--gold);
  color: #0a0103;
}

.clear-scores-btn {
  background: transparent;
  border: 1px solid #5a2a2a;
  color: #a06060;
  padding: 8px 18px;
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.clear-scores-btn:hover {
  background: #6a1a1a;
  border-color: #a06060;
  color: #f0a0a0;
}

/* Main */
.movies-main {
  flex: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 50px 30px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* Section */
.section-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.section-title-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dim));
}
.section-header .section-title-line:last-child {
  background: linear-gradient(to left, transparent, var(--gold-dim));
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--gold);
  white-space: nowrap;
  letter-spacing: 2px;
}

/* Movies grid */
.movies-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Movie card — warm silver/parchment */
.movie-card {
  background: linear-gradient(180deg, #d4ccbe 0%, #c4bcae 100%);
  border: 1px solid #8a7d6a;
  border-radius: 3px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: #1a0e0a;
}

.movie-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
}

.movie-card.watched {
  border-left: 4px solid var(--gold);
}

.movie-card.unwatched {
  border-left: 4px solid #8a7d6a;
  opacity: 0.95;
}

/* Rank badge */
.rank {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #3a2028, #2a1620);
  border: 1.5px solid var(--gold);
  color: var(--gold-light);
  letter-spacing: 0;
}

.rank.unranked {
  border-color: #8a7d6a;
  color: #6a5e4a;
  background: transparent;
  font-size: 22px;
  font-weight: 400;
}

.rank.top1 {
  background: linear-gradient(135deg, var(--gold), #a8862e);
  color: #1a0a05;
  border-color: var(--gold-light);
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.5);
}

.rank.top2 {
  background: linear-gradient(135deg, #b8b8c0, #8a8a92);
  color: #1a0a05;
  border-color: #d8d8e0;
}

.rank.top3 {
  background: linear-gradient(135deg, #cd7f32, #8a4f1a);
  color: #1a0a05;
  border-color: #e8a060;
}

/* Header score badge */
.header-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: #5a4010;
  white-space: nowrap;
  font-style: italic;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.header-score.empty {
  color: #6a5e4a;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 400;
}

/* Card header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  gap: 18px;
  cursor: default;
}

/* Poster */
.poster {
  width: 56px;
  height: 84px;
  flex-shrink: 0;
  background: #1a0e10;
  border: 1px solid #6a5e4a;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poster:hover {
  border-color: #2a1620;
  transform: scale(1.04);
}

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

.poster.empty {
  background: linear-gradient(135deg, #2a1820, #1a0e10);
}

.poster-placeholder {
  font-size: 9px;
  letter-spacing: 1px;
  text-align: center;
  color: #b8a890;
  line-height: 1.5;
}

.poster-placeholder::first-line {
  font-size: 18px;
}

.card-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.watched-badge {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6a4f12;
  border: 1px solid #8a6c1c;
  background: rgba(201, 168, 76, 0.18);
  padding: 2px 8px;
  white-space: nowrap;
}

.upcoming-badge {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #5a4a3a;
  border: 1px solid #8a7d6a;
  padding: 2px 8px;
  white-space: nowrap;
}

.movie-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: #1a0e0a;
}

/* Card buttons */
.toggle-btn {
  background: transparent;
  border: 1px solid #6a5e4a;
  color: #3a2818;
  padding: 6px 14px;
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-weight: 600;
}
.toggle-btn:hover {
  border-color: #1a0e0a;
  color: #1a0e0a;
  background: rgba(0,0,0,0.08);
}

.watch-btn {
  background: rgba(201, 168, 76, 0.18);
  border: 1px solid #8a6c1c;
  color: #4a3a10;
  padding: 7px 16px;
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-weight: 600;
}
.watch-btn:hover {
  border-color: #5a4010;
  color: #2a1a05;
  background: rgba(201, 168, 76, 0.35);
}

/* Card details (expanded) */
.card-details {
  padding: 0 22px 24px;
  border-top: 1px solid #8a7d6a;
  display: none;
  background: linear-gradient(180deg, #c4bcae 0%, #b8b0a2 100%);
}

.card-details.open {
  display: block;
}

/* Ratings */
.ratings {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 20px;
}

.rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rating-row label {
  font-size: 13px;
  color: #2a1810;
  letter-spacing: 1px;
  min-width: 160px;
  font-weight: 600;
}

/* Stars */
.stars-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stars {
  display: flex;
  gap: 4px;
}

.clear-rating {
  background: transparent;
  border: 1px solid #6a5e4a;
  color: #5a4a3a;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: all 0.15s;
}

.clear-rating:hover {
  border-color: #a82020;
  color: #a82020;
  background: rgba(200, 60, 60, 0.15);
}

.star {
  font-size: 22px;
  cursor: pointer;
  color: #8a8278;
  transition: color 0.15s, transform 0.1s;
  user-select: none;
  line-height: 1;
}

.star.filled {
  color: #b8901c;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.star:hover {
  transform: scale(1.15);
}

/* Avg score */
.avg-score {
  margin-top: 16px;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: #5a4010;
  letter-spacing: 1px;
  text-align: right;
  font-style: italic;
  font-weight: 600;
}

/* Comment area */
.comment-area {
  margin-top: 18px;
}

.comment-area label {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #4a3a2a;
  margin-bottom: 8px;
  font-weight: 600;
}

.comment-area textarea {
  width: 100%;
  background: #f0eadc;
  border: 1px solid #8a7d6a;
  color: #1a0e0a;
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color 0.2s;
  border-radius: 1px;
}

.comment-area textarea:focus {
  border-color: #2a1810;
}

.comment-area textarea::placeholder {
  color: #8a7d6a;
}

/* Footer */
.movies-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--card-border);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: #120208;
  border: 1px solid var(--gold-dim);
  padding: 36px 40px;
  min-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--gold);
  font-weight: 400;
  letter-spacing: 2px;
}

.modal input {
  background: #0a0103;
  border: 1px solid #2a1a1a;
  color: var(--cream);
  padding: 12px 14px;
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.modal input:focus { border-color: var(--gold-dim); }
.modal input::placeholder { color: #3a2a2a; }

.modal-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-cancel {
  background: transparent;
  border: 1px solid #2a1a1a;
  color: var(--text-dim);
  padding: 9px 20px;
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cancel:hover { border-color: var(--text-dim); color: var(--cream-dim); }

.btn-confirm {
  background: var(--gold);
  border: none;
  color: #0a0103;
  padding: 9px 20px;
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-confirm:hover { background: var(--gold-light); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox img {
  max-width: 60vw;
  max-height: 80vh;
  object-fit: contain;
  border: 2px solid var(--gold-dim);
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
  border-radius: 2px;
}

.lightbox p {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--cream);
  letter-spacing: 2px;
  font-style: italic;
}

/* Responsive */
@media (max-width: 700px) {
  .curtain { width: 18%; }
  .marquee-box { width: 62vw; padding: 38px 32px 34px; }
  .cinema-word { letter-spacing: 5px; }
  .movies-header { padding: 14px 18px; flex-wrap: wrap; }
  .header-title h1 { font-size: 16px; }
  .rating-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .card-header { flex-wrap: wrap; }
}
