/* =============================================
   Diego's Theater — style.css
   ============================================= */

/* --- CSS Variables (reusable colors) --- */
:root {
  --dark:   #14151F;
  --mid:    #474D6B;
  --accent: #C91D53;
  --gold:   #F5C518;
  --white:  #F0EDE8;
  --font:   'Kiwi Maru', serif;
}

/* --- Basic Reset --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background-color: var(--dark);
  color: var(--white);
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }


/* =============================================
   LOADING SCREEN
   Uses: @keyframes (spin + pulse)
   ============================================= */
#loader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease;
}

#loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.film-reel {
  width: 80px;
  height: 80px;
  animation: spin 1.2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.loader-text {
  font-size: 1rem;
  letter-spacing: 0.1em;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}


/* =============================================
   HEADER
   Uses: transition (shrinks on scroll via JS)
   ============================================= */
.site-header {
  background-color: var(--accent);
  text-align: center;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: padding 0.3s ease;
}

.site-header.scrolled { padding: 0.5rem 1rem; }

.site-title {
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  transition: font-size 0.3s ease;
}

.site-header.scrolled .site-title { font-size: 1.1rem; }


/* =============================================
   PROMO BANNER
   Uses: @keyframes (shimmer, bounce, floatUp)
   ============================================= */
.promo-banner {
  background: linear-gradient(135deg, #e6b800, #f5c518, #e6b800);
  background-size: 200% 200%;
  padding: 2rem 1rem;
  text-align: center;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.promo-stars {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 1rem;
  color: #a07800;
}

.promo-stars span:nth-child(1) { animation: floatUp 2s ease-in-out infinite 0.0s; }
.promo-stars span:nth-child(2) { animation: floatUp 2s ease-in-out infinite 0.2s; }
.promo-stars span:nth-child(3) { animation: floatUp 2s ease-in-out infinite 0.4s; }
.promo-stars span:nth-child(4) { animation: floatUp 2s ease-in-out infinite 0.6s; }
.promo-stars span:nth-child(5) { animation: floatUp 2s ease-in-out infinite 0.8s; }

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.promo-badge {
  background: white;
  border-radius: 50%;
  width: 110px;
  height: 110px;
  margin: 0 auto 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

.save-label  { font-size: 0.75rem; color: #333; letter-spacing: 0.1em; }
.save-amount { font-size: 2rem; color: var(--accent); line-height: 1; }
.promo-subtitle { font-size: 0.8rem; color: #6b4e00; }


/* =============================================
   NOW SHOWING — CAROUSEL
   Uses: 2D transform (scale on hover, translateX to slide)
         transition (smooth movement)
   ============================================= */
.movies-section { padding: 1.5rem 1rem; }

.section-title {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.carousel-wrapper {
  position: relative;
}

.carousel {
  display: flex;
  gap: 0.8rem;
  overflow-x: scroll;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.carousel::-webkit-scrollbar { display: none; }

.movie-card {
  flex: 0 0 200px;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: var(--mid);
  transition: transform 0.3s ease;
}

.movie-card:hover {
  transform: scale(1.06) translateY(-5px);
}

.card-poster { width: 100%; height: 100%; object-fit: cover; }

.card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(201,29,83,0.9), transparent);
  padding: 0.6rem;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover .card-overlay { opacity: 1; }


/* =============================================
   MOVIE DETAIL CARD
   Uses: 3D transform (poster tilts on hover)
         transition (fades when JS updates it)
   ============================================= */
.detail-section {
  padding: 1rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.detail-card {
  background: var(--mid);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
}

.detail-poster {
  width: 130px;
  height: 190px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.detail-poster:hover {
  transform: perspective(400px) rotateY(-12deg);
}

.detail-info { display: flex; flex-direction: column; gap: 0.5rem; }

.detail-meta { display: flex; gap: 1rem; font-size: 0.9rem; color: #aab0cc; }

.detail-title    { font-size: 1.4rem; }

.detail-synopsis { font-size: 1rem; color: #c0c5dd; line-height: 1.7; }

.star-rating { display: flex; gap: 4px; font-size: 1.5rem; }
.star        { color: #4a4f70; }
.star.active { color: var(--gold); }


/* =============================================
   FOOTER — BACK TO TOP
   Uses: transition (hover effect)
   ============================================= */
.site-footer {
  background: var(--accent);
  padding: 1rem;
  text-align: center;
  margin-top: 2rem;
}

.back-to-top {
  background: none;
  border: 2px solid var(--white);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.back-to-top:hover {
  background: var(--white);
  color: var(--accent);
}


/* =============================================
   RESPONSIVE — mobile first
   ============================================= */
@media (min-width: 600px) {
  .movie-card    { flex: 0 0 260px; height: 380px; }
  .detail-poster { width: 160px; height: 230px; }
  .site-title    { font-size: 1.7rem; }
}

@media (min-width: 900px) {
  .movies-section,
  .detail-section { padding: 2rem 3rem; }
  .movie-card     { flex: 0 0 320px; height: 460px; }
  .detail-poster  { width: 200px; height: 280px; }
  .detail-title   { font-size: 1.8rem; }
}

/* Carousel arrow buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: #a01440;
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 4px; }
.carousel-btn.next { right: 4px; }