/* ==========================================================================
   Root Theme & Variables
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Audiowide&family=Inter:wght@300;400;600&family=JetBrains+Mono:wght@400;700&display=swap");

:root {
  --primary-color: #00d4ff;
  --primary-glow: rgba(0, 212, 255, 0.5);
  --white: #ffffff;
  --bg-dark: #02050a;

  --font-main: "Audiowide", cursive, sans-serif;
  --font-sec: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

body,
html {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-dark);
}

.film-archive-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* ==========================================================================
   Background & HUD
   ========================================================================== */
.archive-bg-container {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  z-index: 1;
}
.archive-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.3) contrast(1.1);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.archive-bg.active {
  opacity: 1;
}

.cinematic-wash {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(0, 30, 60, 0.4),
    rgba(2, 5, 10, 0.95)
  );
  z-index: 2;
  pointer-events: none;
}

.hud-frame {
  position: absolute;
  inset: 40px;
  z-index: 2;
  pointer-events: none;
}
.corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 212, 255, 0.3);
}
.t-l {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}
.t-r {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}
.b-l {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}
.b-r {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}
.crosshair-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
}
.crosshair-center::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(0, 212, 255, 0.2);
}
.crosshair-center::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  width: 1px;
  background: rgba(0, 212, 255, 0.2);
}

/* ==========================================================================
   Header & Tabs Layout
   ========================================================================== */
.archive-header-wrapper {
  position: absolute;
  top: 90px;
  left: 4rem;
  right: 4rem;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.scene-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--primary-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.scene-label .line {
  width: 30px;
  height: 2px;
  background: var(--primary-color);
  box-shadow: 0 0 5px var(--primary-color);
}
.scene-label .highlight {
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
}
.master-title {
  font-family: var(--font-main);
  font-size: clamp(24px, 3vw, 42px);
  letter-spacing: 3px;
  color: var(--white);
  margin: 0;
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
}
.master-title span {
  color: var(--primary-color);
}

.category-tabs {
  display: flex;
  gap: 10px;
  background: rgba(0, 15, 30, 0.4);
  padding: 6px;
  border-radius: 30px;
  border: 1px solid rgba(0, 212, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.tab-btn {
  background: transparent;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}
.tab-btn:hover {
  color: var(--white);
}
.tab-btn.active {
  background: var(--primary-color);
  color: var(--bg-dark);
  box-shadow: 0 0 15px var(--primary-glow);
}

/* ==========================================================================
   Horizontal Landscape Slider (Focus-Pull Effect)
   ========================================================================== */
.slider-wrapper {
  position: relative;
  width: 100vw;
  margin-top: 60px;
  z-index: 5;
}
.slider-vignette {
  position: absolute;
  top: 0;
  width: 15vw;
  height: 100%;
  z-index: 6;
  pointer-events: none;
}
.slider-vignette.left {
  left: 0;
  background: linear-gradient(to right, rgba(2, 5, 10, 1) 0%, transparent 100%);
}
.slider-vignette.right {
  right: 0;
  background: linear-gradient(to left, rgba(2, 5, 10, 1) 0%, transparent 100%);
}

/* ==========================================================================
   Update: Horizontal Cinematic Slider
   ========================================================================== */
.gallery-slider {
  display: flex; gap: 40px; 
  
  /* FIXED: Increased bottom padding to 100px so the hover shadow doesn't get clipped */
  padding: 40px 15vw 100px 15vw; 
  
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; cursor: grab;
  align-items: center;
}
.gallery-slider::-webkit-scrollbar {
  display: none;
}
.gallery-slider:active {
  cursor: grabbing;
}

/* Focus-Pull Magic: Dim non-hovered cards */
.gallery-slider:hover .landscape-card:not(:hover) {
  opacity: 0.3;
  transform: scale(0.95);
}

/* 16:9 Landscape Card */
.landscape-card {
  flex: 0 0 560px;
  height: 315px; /* 16:9 Ratio */
  scroll-snap-align: center;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.4s ease,
    border 0.4s ease,
    box-shadow 0.4s ease;
  user-select: none;
  cursor: pointer;
}
.landscape-card.hidden {
  display: none;
}

.card-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(2, 5, 10, 0.6) 0%,
    transparent 40%,
    transparent 60%,
    rgba(2, 5, 10, 0.9) 100%
  );
  transition: background 0.4s ease;
}

.landscape-card:hover {
  transform: scale(1.05);
  border: 1px solid rgba(0, 212, 255, 0.5);
  box-shadow: 0 30px 60px rgba(0, 212, 255, 0.2);
  z-index: 2;
}
.landscape-card:hover .card-image {
  transform: scale(1.1);
}
.landscape-card:hover .card-overlay {
  background: rgba(0, 15, 30, 0.4);
} /* Darken image to pop the play button */

/* Card Content (Top, Center, Bottom) */
.card-top {
  position: absolute;
  top: 20px;
  left: 25px;
  right: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.badge {
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid var(--primary-color);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 2px;
  backdrop-filter: blur(4px);
}
.year {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
  opacity: 0.8;
  letter-spacing: 2px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.card-center {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.play-ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}
.play-ring svg {
  width: 24px;
  height: 24px;
  fill: var(--white);
  margin-left: 4px;
}
.landscape-card:hover .card-center {
  opacity: 1;
  transform: scale(1);
}
.landscape-card:hover .play-ring {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 25px var(--primary-glow);
}
.landscape-card:hover .play-ring svg {
  fill: var(--bg-dark);
}

.card-bottom {
  position: absolute;
  bottom: 20px;
  left: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease;
}
.card-title {
  font-family: var(--font-main);
  font-size: 22px;
  color: var(--white);
  letter-spacing: 2px;
  margin: 0 0 5px 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.card-duration {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 2px;
}
.landscape-card:hover .card-bottom {
  transform: translateY(5px);
  opacity: 0.5;
}

/* Interactive Hint */
.interaction-hint {
  position: absolute;
  bottom: 30px;
  z-index: 10;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.7;
}
.pulse-ring {
  width: 6px;
  height: 6px;
  background: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7);
  animation: cx-pulse 1.5s infinite;
}

/* ==========================================================================
   Video Player Modal (Glassmorphic)
   ========================================================================== */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}
.video-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 10, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  z-index: 2;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.video-modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: -50px;
  right: 0;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color 0.3s ease;
}
.modal-close-btn svg {
  width: 18px;
  height: 18px;
  fill: var(--white);
  transition: fill 0.3s ease;
}
.modal-close-btn:hover {
  color: var(--primary-color);
}
.modal-close-btn:hover svg {
  fill: var(--primary-color);
}

.video-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(0, 212, 255, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.2);
}
.video-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .archive-header-wrapper {
    top: 80px;
    left: 2rem;
    right: 2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .slider-wrapper {
    margin-top: 140px;
  }
  .landscape-card {
    flex: 0 0 450px;
    height: 253px;
  }
}

@media (max-width: 768px) {
  .hud-frame {
    display: none;
  }
  .archive-header-wrapper {
    top: 90px;
    left: 1rem;
    right: 1rem;
    align-items: center;
    text-align: center;
  }
  .scene-label {
    justify-content: center;
  }
  .category-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }
  .tab-btn {
    padding: 8px 15px;
    font-size: 9px;
  }

  .slider-wrapper {
    margin-top: 180px;
  }
.gallery-slider { 
    /* FIXED: Increased bottom padding for mobile shadow clearance */
    padding: 20px 5vw 80px 5vw; 
    gap: 20px; 
  }
  .landscape-card {
    flex: 0 0 320px;
    height: 180px;
  }
  .card-title {
    font-size: 16px;
  }
  .play-ring {
    width: 50px;
    height: 50px;
  }

  .modal-close-btn {
    top: -40px;
    font-size: 10px;
  }
}

/* ==========================================================================
   Responsive & Mobile Optimization (Larger Cards)
   ========================================================================== */

/* Laptops & Small Desktops */
@media (max-width: 1024px) {
  .archive-header-wrapper { top: 80px; left: 2rem; right: 2rem; flex-direction: column; align-items: flex-start; gap: 15px; }
  .slider-wrapper { margin-top: 100px; }
  
  /* Scaled up for Laptops */
  .landscape-card { flex: 0 0 640px; height: 360px; }
  .card-title { font-size: 26px; }
  .play-ring { width: 70px; height: 70px; }
  .play-ring svg { width: 24px; height: 24px; }
  
  .gallery-slider { padding: 40px 10vw 80px 10vw; } 
}

/* Tablets & Large Phones (Portrait) */
@media (max-width: 768px) {
  .hud-frame { display: none; }
  .archive-header-wrapper { top: 80px; left: 1rem; right: 1rem; align-items: center; text-align: center; }
  .scene-label { justify-content: center; }
  .master-title { font-size: clamp(22px, 5vw, 32px); margin-bottom: 5px; }
  .category-tabs { flex-wrap: wrap; justify-content: center; padding: 6px; border-radius: 20px; gap: 5px; }
  .tab-btn { padding: 8px 14px; font-size: 8px; letter-spacing: 1px; }
  
  .slider-wrapper { margin-top: 150px; }
  .slider-vignette { width: 5vw; }
  .gallery-slider { padding: 20px 5vw 80px 5vw; gap: 20px; }
  
  /* Scaled up for Tablets */
  .landscape-card { flex: 0 0 400px; height: 225px; border-radius: 8px; }
  
  .card-top { top: 15px; left: 15px; right: 15px; }
  .badge { font-size: 8px; padding: 4px 8px; }
  .year { font-size: 10px; }
  
  .card-bottom { bottom: 15px; left: 15px; right: 15px; }
  .card-title { font-size: 20px; margin: 0 0 5px 0; }
  .card-duration { font-size: 9px; }
  
  .play-ring { width: 55px; height: 55px; }
  .play-ring svg { width: 18px; height: 18px; margin-left: 2px; }
  
  .modal-close-btn { top: -40px; right: 10px; font-size: 10px; }
  .video-wrapper { border-radius: 8px; }
}

/* Standard Mobile & Small Phones */
@media (max-width: 480px) {
  .archive-header-wrapper { top: 100px; }
  .master-title { font-size: 24px; }
  .category-tabs { padding: 4px; gap: 4px; }
  .tab-btn { padding: 6px 12px; font-size: 7px; }
  
  .slider-wrapper { margin-top: 130px; }
  
  /* Scaled up for Mobile (Fits perfectly on standard phone widths) */
  .landscape-card { flex: 0 0 320px; height: 180px; }
  .gallery-slider { gap: 15px; }
  
  .card-title { font-size: 16px; }
  .card-duration { font-size: 8px; }
  .badge { font-size: 7px; padding: 2px 5px; }
  
  .play-ring { width: 45px; height: 45px; border-width: 1px; }
  .play-ring svg { width: 14px; height: 14px; }
  
  .interaction-hint { bottom: 20px; font-size: 8px; letter-spacing: 2px; }
}

/* Horizontal Phone Protection (Landscape Mode on Mobile) */
@media (max-height: 500px) and (orientation: landscape) {
  .archive-header-wrapper { top: 15px; flex-direction: row; align-items: center; justify-content: space-between; }
  .slider-wrapper { margin-top: 70px; }
  .gallery-slider { padding: 10px 5vw 40px 5vw; }
  
  /* Protected height for horizontal phones */
  .landscape-card { flex: 0 0 280px; height: 157px; }
  
  .interaction-hint, .hud-frame { display: none; }
}