/* --- MASTER THEME VARIABLES --- */
:root {
  --bg-main: #0F131A; 
  --bg-gradient: radial-gradient(circle at 50% -20%, #1c2333, var(--bg-main));
  --surface: #151921;
  --surface-bright: #1E232E; 
  --border: rgba(255, 255, 255, 0.08);
  --accent: #E50914; 
  --gold: #FFD700;
  --text: #FFFFFF;
  --text-muted: #A0A6B2;
  --hero-h: clamp(380px, 60vh, 650px);
  --nav-height: 80px;
  --radius: 12px;
  --shadow-card: 0 15px 30px -10px rgba(0,0,0,0.7); 
}

/* --- RESET & APP FEEL ENGINE (CRITICAL) --- */
*, *::before, *::after { 
  box-sizing: border-box; 
  outline: none; 
  margin: 0; 
  padding: 0; 
  /* Removes Blue Tap Highlight on Mobile */
  -webkit-tap-highlight-color: transparent; 
  /* Disables Long Press Context Menu */
  -webkit-touch-callout: none;
}

* { 
  -ms-overflow-style: none !important; 
  scrollbar-width: none !important; 
}

*::-webkit-scrollbar { display: none !important; }

html, body {
  width: 100%; 
  overflow-x: hidden; 
  background: var(--bg-main); 
  background-image: var(--bg-gradient); 
  background-attachment: fixed; 
  color: var(--text);
  font-family: 'Inter', sans-serif; 
  min-height: 100vh;
  /* PREVENTS TEXT SELECTION (App Like Feel) */
  user-select: none;
  -webkit-user-select: none;
}

/* Base Styles (No Hover Transitions Here for Mobile Safety) */
a, button { 
  text-decoration: none; 
  color: inherit; 
  cursor: pointer; 
  border: none; 
  background: none; 
  /* Only transition opacity/color by default */
  transition: opacity 0.3s ease, color 0.3s ease;
}

img { 
  display: block; 
  max-width: 100%; 
  height: auto; 
  /* Prevents Image Dragging */
  -webkit-user-drag: none; 
  user-drag: none;
  pointer-events: none; 
}

/* --- LOADER --- */
#siteLoader { 
  position: fixed; inset: 0; z-index: 9999; 
  background: var(--bg-main); 
  display: flex; flex-direction: column; align-items: center; justify-content: center; 
  transition: opacity 0.4s ease, visibility 0.4s; 
}
.loader-logo { width: 50px; margin-bottom: 20px; animation: pulse 2s infinite; }
.spinner { 
  width: 35px; height: 35px; 
  border: 3px solid rgba(255,255,255,0.1); 
  border-top-color: var(--accent); 
  border-radius: 50%; 
  animation: spin 0.8s linear infinite; 
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } }

/* --- NAVBAR --- */
header.navbar { 
  position: absolute; top: 0; left: 0; right: 0; 
  height: var(--nav-height); z-index: 500; 
  display: flex; align-items: center; padding: 0 4%; 
  background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, transparent 100%); 
}
.nav-inner { width: 100%; max-width: 1600px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.logo-img { height: 35px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); pointer-events: auto; }
.brand-text { font-family: 'Outfit'; font-weight: 800; font-size: 24px; color: #fff; letter-spacing: -0.5px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.nav-btn { 
  width: 44px; height: 44px; border-radius: 50%; 
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1); 
  color: #fff; display: flex; align-items: center; justify-content: center; 
}

/* GOD MODE: HOVER ONLY ON PC */
@media (hover: hover) { 
  .nav-btn { transition: transform 0.3s, background 0.3s; }
  .nav-btn:hover { background: rgba(255,255,255,0.2); border-color: #fff; transform: scale(1.05); } 
}

/* --- HERO SECTION --- */
.hero-wrapper { position: relative; width: 100%; height: var(--hero-h); overflow: hidden; margin-bottom: 40px; background: #000; }
.hero-slider { display: flex; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
.hero-slide { min-width: 100%; height: 100%; position: relative; overflow: hidden; }
.hero-bg { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hero-overlay { position: absolute; inset: 0; z-index: 2; background: radial-gradient(circle at 0% 100%, rgba(15,19,26,0.98) 0%, rgba(15,19,26,0.5) 50%, transparent 80%); }

.hero-content { 
  position: absolute; bottom: 70px; left: 4%; width: 90%; max-width: 800px; 
  z-index: 10; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; 
}
.hero-title { 
  font-family: 'Outfit'; font-size: clamp(24px, 4.5vw, 40px); font-weight: 900; line-height: 1.1; margin: 0 0 12px 0; 
  text-shadow: 0 5px 40px rgba(0,0,0,1); color: #fff; opacity: 0; transform: translateY(30px); transition: 0.8s ease; 
}
.hero-meta { 
  font-size: 14px; color: rgba(255,255,255,0.9); margin-bottom: 0; font-weight: 600; 
  text-shadow: 0 2px 15px rgba(0,0,0,1); opacity: 0; transform: translateY(30px); transition: 0.8s 0.1s ease; 
  display: flex; gap: 15px; align-items: center; 
}
.hero-slide.active .hero-title, .hero-slide.active .hero-meta { opacity: 1; transform: translateY(0); }
.rating-tag { background: var(--gold); color: #000; padding: 2px 8px; border-radius: 4px; font-weight: 800; font-size: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.hero-static-layer { position: absolute; bottom: 10px; left: 4%; z-index: 20; pointer-events: none; }
.btn-hero { 
  padding: 10px 22px; border-radius: 100px; pointer-events: auto; 
  background: var(--accent); color: #fff; font-family: 'Outfit'; font-weight: 800; font-size: 20px; letter-spacing: 1px; 
  box-shadow: 0 10px 30px -5px rgba(229,9,20,0.5); display: inline-flex; align-items: center; gap: 2px; cursor: pointer; 
}

/* GOD MODE: HOVER ONLY ON PC */
@media (hover: hover) { 
  .btn-hero { transition: transform 0.3s, box-shadow 0.3s; }
  .btn-hero:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 40px -5px rgba(229,9,20,0.6); } 
}

.hero-nav { position: absolute; bottom: 20px; right: 4%; z-index: 20; display: flex; gap: 12px; }
.hero-arrow { 
  width: 45px; height: 45px; border-radius: 50%; 
  background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); 
  color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; 
}

/* GOD MODE: HOVER ONLY ON PC */
@media (hover: hover) { 
  .hero-arrow { transition: background 0.3s, color 0.3s; }
  .hero-arrow:hover { background: #fff; color: #000; }
}

/* --- SPOTLIGHT (16:9) --- */
.spotlight-wrapper { position: relative; margin: 60px 0; padding: 0 4%; max-width: 1400px; margin: 0 auto 60px; display: flex; flex-direction: column; }
.spotlight-container { 
  width: 100%; aspect-ratio: 16/9; max-height: 500px; position: relative; 
  border-radius: 16px 16px 0 0; overflow: hidden; 
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.6); 
  border: 1px solid rgba(255,255,255,0.1); border-bottom: none; background: #000; 
}
.spotlight-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease-in-out; display: flex; align-items: center; justify-content: center; }
.spotlight-slide.active { opacity: 1; z-index: 2; }
.spot-poster-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.9; transform: scale(1); transition: transform 10s linear; }
.spotlight-slide.active .spot-poster-bg { transform: scale(1.15); }

.spot-number { 
  position: absolute; bottom: 10px; left: 15px; font-family: 'Rajdhani'; font-weight: 900; 
  font-size: clamp(90px, 14vw, 160px); color: transparent; -webkit-text-stroke: 2.5px rgba(255, 255, 255, 0.444); 
  z-index: 10; line-height: 0.8; opacity: 0; transform: translateX(-30px); transition: 0.8s; 
}
.spotlight-slide.active .spot-number { opacity: 1; transform: translateX(0); }

.spot-info-area { 
  width: 100%; background: #161b22; border-radius: 0 0 16px 16px; border: 2px solid var(--border); border-top: none; 
  padding: 25px 30px; display: flex; align-items: center; justify-content: space-between; 
  box-shadow: 0 20px 40px rgba(0,0,0,0.4); z-index: 20; position: relative; 
}
.spot-text-anim { flex: 1; opacity: 0; transform: translateY(10px); transition: 0.5s; }
.spot-text-anim.active { opacity: 1; transform: translateY(0); }
.spot-title { font-family: 'Outfit'; font-size: 28px; font-weight: 800; margin-bottom: 6px; color: #fff; line-height: 1.1; }
.spot-meta { font-size: 14px; color: #d8d6d6; display: flex; gap: 12px; font-weight: 600; align-items: center; }
.spot-meta span.gold { color: var(--gold); }
.spot-desc { font-size: 14px; color: #cecece; margin-top: 8px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 700px; }
.btn-spot { 
  padding: 12px 30px; background: #fff; color: #000; font-weight: 800; border-radius: 10px; 
  font-size: 15px; display: inline-flex; align-items: center; gap: 8px; 
  box-shadow: 0 5px 20px rgba(0,0,0,0.2); white-space: nowrap; height: 48px; flex-shrink: 0; 
}

/* GOD MODE: HOVER ONLY ON PC */
@media (hover: hover) { 
  .btn-spot { transition: background 0.3s; }
  .btn-spot:hover { background: var(--accent); color: #fff; }
}

/* --- SECTIONS --- */
.container { max-width: 1600px; margin: 0 auto; padding: 0 0 0px; overflow-x: hidden; }
.section { margin-bottom: 10px; position: relative; padding: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 4%; }
.section-title { font-family: 'Outfit'; font-size: 22px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; width: 4px; height: 24px; background: var(--accent); border-radius: 2px; }
.see-all { 
  font-size: 12px; font-weight: 600; color: var(--accent); cursor: pointer; 
  padding: 6px 14px; background: rgba(229, 9, 20, 0.1); border-radius: 100px; border: 1px solid rgba(229, 9, 20, 0.2); 
}

/* TRACK */
.track-wrap { position: relative; mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%); }
.track { 
  display: flex; gap: 15px; overflow-x: auto; padding: 5px 4% 10px 4%; 
  scroll-snap-type: x mandatory; scroll-behavior: smooth; margin-left: 30px; 
  -webkit-overflow-scrolling: touch; 
}

/* CARD DESIGN */
.card { 
  flex: 0 0 clamp(110px, 16vw, 180px); position: relative; cursor: pointer; scroll-snap-align: start; 
  display: flex; flex-direction: column; background: transparent; 
  border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; 
  /* NO DEFAULT TRANSITION to prevent mobile stickiness */
}

/* 🔥 GOD MODE: HOVER ANIMATIONS ONLY FOR PC */
@media (hover: hover) { 
  .card { transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
  .card:hover { transform: translateY(-8px); z-index: 5; border-color: rgba(255,255,255,0.3); box-shadow: var(--shadow-card); }
  .card:hover .poster-img { transform: scale(1.05); } 
}

.poster-box { width: 100%; aspect-ratio: 2/3; overflow: hidden; background: #1a1f29; position: relative; border-radius: var(--radius) var(--radius) 0 0; }
.poster-img { width: 100%; height: 100%; object-fit: cover; transition: 0.4s; }

.card-info-box { padding: 8px 12px; background: var(--surface-bright); display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.05); height: 35px; border-radius: 0 0 var(--radius) var(--radius); }
.card-year { font-size: 11px; color: #fff; font-weight: 700; font-family: 'Rajdhani'; opacity: 0.9; } 
.card-rating { font-size: 11px; color: var(--gold); font-weight: 800; }

/* ARROWS */
.track-btn { 
  position: absolute; top: 40%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; 
  background: rgba(20,20,20,0.9); border: 1px solid rgba(255, 255, 255, 0.295); color: #ffffff; font-size: 35px; 
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; opacity: 0; 
  transition: opacity 0.3s ease; box-shadow: 0 5px 15px rgba(247, 247, 247, 0.23); pointer-events: none; 
}
.track-btn.left { left: 10px; }
.track-btn.right { right: 10px; }

/* GOD MODE: HOVER ONLY ON PC */
@media (hover: hover) { 
  .track-wrap:hover .track-btn.visible { opacity: 1; pointer-events: auto; }
  .track-btn:hover { background: var(--accent); border-color: var(--accent); }
}

/* --- PREMIUM CARD (New Addition) --- */
.premium-card-section { margin: 60px 4% 20px; }
.premium-card {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #1A1F29, #12151A);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 25px 30px; cursor: pointer; position: relative; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3); text-decoration: none;
}
.premium-card::before { content:''; position: absolute; left:0; top:0; height:100%; width:4px; background: var(--gold); }
.prem-content { flex: 1; margin-right: 20px; }
.prem-label { font-size: 11px; color: var(--gold); font-weight: 800; letter-spacing: 1px; margin-bottom: 5px; text-transform: uppercase; }
.prem-title { font-family: 'Outfit'; font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 5px 0; }
.prem-desc { font-size: 13px; color: var(--text-muted); max-width: 90%; margin: 0; }
.prem-icon { 
  width: 45px; height: 45px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,215,0,0.1); color: var(--gold); 
  display: flex; align-items: center; justify-content: center; 
}

/* PREMIUM CARD HOVER ONLY ON PC */
@media (hover: hover) {
  .premium-card { transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s; }
  .premium-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 15px 40px rgba(0,0,0,0.5); }
  .prem-icon { transition: background 0.3s, color 0.3s; }
  .premium-card:hover .prem-icon { background: var(--gold); color: #000; }
}

/* FOOTER */
footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 20px 0 20px; text-align: center; color: var(--text-muted); font-size: 13px; background: #0d1117; }
.footer-links { display: flex; justify-content: center; gap: 25px; margin-bottom: 20px; font-weight: 500; }
.footer-links a { opacity: 0.7; position: relative; color: #fff; }

/* GOD MODE: HOVER ONLY ON PC */
@media (hover: hover) { 
  .footer-links a { transition: opacity 0.3s, color 0.3s; }
  .footer-links a:hover { opacity: 1; color: var(--accent); }
}

.tmdb-credit { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 20px; opacity: 0.5; font-size: 11px; }

/* MODALS */
.full-modal { position: fixed; inset: 0; z-index: 2000; background: var(--bg-main); background-image: var(--bg-gradient); opacity: 0; visibility: hidden; transition: 0.3s; display: flex; flex-direction: column; }
.full-modal.open { opacity: 1; visibility: visible; }
.modal-nav { height: 60px; flex-shrink: 0; display: flex; align-items: center; padding: 0 4%; gap: 15px; background: rgba(15,19,26,0.98); border-bottom: 1px solid var(--border); }
.modal-title { font-family: 'Outfit'; font-weight: 800; font-size: 18px; color: #fff; flex: 1; text-align: center; }
.back-btn { padding: 6px 14px; border-radius: 8px; background: rgba(255,255,255,0.05); color: #fff; font-weight: 600; font-size: 13px; border: 1px solid var(--border); }

.lib-header { display: flex; flex-direction: column; background: var(--bg-main); border-bottom: 1px solid var(--border); }
.search-wrap { padding: 5px 4%; border-bottom: 1px solid var(--border); }
.search-box { display: flex; align-items: center; background: rgba(255,255,255,0.05); border-radius: 8px; padding: 0 15px; border: 1px solid var(--border); }
.search-input { width: 100%; padding: 10px 0; background: none; border: none; color: #fff; font-size: 14px; }
.category-row { display: flex; gap: 10px; padding: 10px 4%; overflow-x: auto; }
.chip { padding: 6px 14px; border-radius: 50px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: #aaa; font-size: 12px; font-weight: 600; white-space: nowrap; transition: 0.2s; }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.lib-grid-wrap { flex: 1; overflow-y: auto; padding: 20px 4%; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; align-items: start; }
.lib-card { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; cursor: pointer; transition: transform 0.2s; display: flex; flex-direction: column; height: 100%; }
.lib-card-img { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: #1a1f29; display: block; }
.lib-card-content { padding: 8px 10px; background: var(--surface-bright); flex: 1; display: flex; flex-direction: column; justify-content: center; }
.lib-card-title { font-size: 12px; font-weight: 600; color: #e0e0e0; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.6em; }
.loading-trigger { display: flex; justify-content: center; padding: 20px; width: 100%; }
.empty-state { text-align: center; padding-top: 50px; color: var(--text-muted); }
.empty-state img { width: 60px; margin-bottom: 15px; opacity: 0.5; display: inline-block; }

/* --- MOBILE SPECIFIC (NO HOVER + APP FEEL) --- */
@media(max-width: 768px) {
  :root { --hero-h: 350px; }
  body { overflow-x: hidden; width: 100%; position: relative; }
  
  .hero-content { bottom: 60px; width: 92%; }
  .hero-title { font-size: 30px; text-shadow: 0 5px 30px rgba(0,0,0,1); }
  .hero-static-layer { bottom: 5px; left: 2.5%; font-size: 10px; }
  .hero-nav { display: none; }
  .btn-hero { padding: 8px 12px; }
  
  .spotlight-wrapper { margin: 30px 0; }
  .spotlight-container { aspect-ratio: 16/9; max-height: none; }
  .spot-info-area { padding: 15px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .spot-title { font-size: 18px; margin-bottom: 2px; }
  .spot-meta { font-size: 11px; margin-bottom: 0; }
  .spot-desc { font-size: 12px; -webkit-line-clamp: 3; }
  .btn-spot { width: 100%; justify-content: center; padding: 8px 14px; font-size: 16px; height: 36px; }
  
  .lib-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .lib-card-img { aspect-ratio: 5/6;}
  .lib-grid-wrap { padding: 5px 6%; }
  
  /* APP-LIKE FEEL: Smaller cards, No Arrows, Native Scroll */
  .card { flex: 0 0 110px; } 
  .track-btn { display: none !important; }
  .track { padding: 0px 4px 8px 4px; gap: 8px; margin-left: 10px; } 
}