@charset "UTF-8";

/* ==========================================================================
   TMDB CINEMA PULSE - PREMIUM DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-main: #0b0f19;
  --bg-card: rgba(22, 29, 47, 0.85);
  --bg-card-hover: rgba(30, 41, 67, 0.95);
  --bg-glass: rgba(15, 23, 42, 0.75);
  --bg-glass-heavy: rgba(11, 15, 25, 0.9);
  
  --primary: #e50914;
  --primary-hover: #f40612;
  --primary-glow: rgba(229, 9, 20, 0.4);
  
  --accent-gold: #f5c518;
  --accent-gold-glow: rgba(245, 197, 24, 0.35);
  --accent-cyan: #00d2ff;
  --accent-cyan-glow: rgba(0, 210, 255, 0.35);
  --accent-purple: #9d4edd;
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-active: rgba(229, 9, 20, 0.6);
  --border-gold: rgba(245, 197, 24, 0.5);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px var(--primary-glow);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  
  --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(229, 9, 20, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 210, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(157, 78, 221, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input, select {
  font-family: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0b0f19;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ==========================================================================
   LAYOUT CONTAINER
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-glass-heavy);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(8, 11, 18, 0.95);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  cursor: pointer;
}

.brand-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), #ff4757);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: var(--shadow-glow);
}

.brand-logo .tmdb-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: linear-gradient(90deg, #01b4e4, #90cea1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 2px 6px;
  border: 1px solid rgba(1, 180, 228, 0.3);
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.search-box-header {
  position: relative;
  flex: 1;
  max-width: 460px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1rem;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 10px 42px 10px 40px;
  font-size: 0.92rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-size: 1rem;
  display: none;
  padding: 4px;
}

.search-clear-btn.active {
  display: block;
}

.search-clear-btn:hover {
  color: #fff;
}

/* Quick Search Suggestions Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1001;
  display: none;
}

.search-dropdown.active {
  display: block;
  animation: dropdownFadeIn 0.2s ease-out;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestion-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-sugg-poster {
  width: 36px;
  height: 52px;
  border-radius: 4px;
  object-fit: cover;
  background: #1e293b;
}

.search-sugg-info {
  flex: 1;
  min-width: 0;
}

.search-sugg-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-sugg-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.header-btn.highlight {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.2), rgba(229, 9, 20, 0.05));
  border-color: var(--border-active);
  color: #ff6b6b;
}

.header-btn.highlight:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.header-tmdb-btn {
  background: linear-gradient(135deg, rgba(1, 180, 228, 0.15), rgba(144, 206, 161, 0.1));
  border: 1px solid rgba(1, 180, 228, 0.4);
  color: #01b4e4;
  font-weight: 700;
}

.header-tmdb-btn:hover {
  background: linear-gradient(135deg, #01b4e4, #0d8abc);
  border-color: #01b4e4;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(1, 180, 228, 0.45);
  transform: translateY(-1px);
}

.tmdb-pill-icon {
  background: linear-gradient(90deg, #01b4e4, #90cea1);
  color: #0b0f19;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  line-height: 1;
}

.header-tmdb-btn:hover .tmdb-pill-icon {
  background: #ffffff;
  color: #01b4e4;
}

.tmdb-ext-icon {
  font-size: 0.72rem;
  opacity: 0.75;
}

.badge-count {
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

/* ==========================================================================
   HERO BANNER & FEATURED CAROUSEL
   ========================================================================== */
.hero-section {
  position: relative;
  margin-top: 72px;
  height: 580px;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  background-size: cover;
  background-position: center top;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-backdrop-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg, 
    rgba(11, 15, 25, 0.95) 0%, 
    rgba(11, 15, 25, 0.7) 45%, 
    rgba(11, 15, 25, 0.2) 100%
  ),
  linear-gradient(
    0deg,
    rgba(11, 15, 25, 1) 0%,
    rgba(11, 15, 25, 0) 50%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 680px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 9, 20, 0.9);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  width: fit-content;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 18px;
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-gold);
  font-weight: 700;
}

.hero-dday {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #000;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.hero-overview {
  font-size: 1rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 26px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  box-shadow: 0 4px 18px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-tmdb-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(1, 180, 228, 0.18), rgba(144, 206, 161, 0.15));
  backdrop-filter: blur(8px);
  color: #01b4e4;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(1, 180, 228, 0.45);
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(1, 180, 228, 0.15);
}

.btn-tmdb-hero:hover {
  background: linear-gradient(135deg, #01b4e4, #0d8abc);
  color: #ffffff;
  border-color: #01b4e4;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(1, 180, 228, 0.45);
}

.btn-tmdb-hero:hover .tmdb-tag-pill {
  background: #ffffff;
  color: #01b4e4;
}

.tmdb-tag-pill {
  background: linear-gradient(90deg, #01b4e4, #90cea1);
  color: #0b0f19;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.4px;
  line-height: 1;
}

.btn-tmdb-modal {
  border-color: rgba(1, 180, 228, 0.4);
  color: #01b4e4;
  background: rgba(1, 180, 228, 0.08);
}

.btn-tmdb-modal:hover {
  background: linear-gradient(135deg, #01b4e4, #0d8abc);
  color: #ffffff;
  border-color: #01b4e4;
  box-shadow: 0 6px 20px rgba(1, 180, 228, 0.35);
}

.btn-tmdb-modal:hover .tmdb-tag-pill {
  background: #ffffff;
  color: #01b4e4;
}

.hero-controls {
  position: absolute;
  right: 40px;
  bottom: 40px;
  z-index: 10;
  display: flex;
  gap: 10px;
}

.hero-ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.hero-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

/* ==========================================================================
   NAVIGATION TABS & FILTERS BAR
   ========================================================================== */
.main-nav-bar {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 72px;
  z-index: 900;
  padding: 14px 0;
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.tab-group {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.tab-group::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: var(--transition);
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 14px var(--primary-glow);
}

.tab-btn.tmdb-nav-tab {
  background: linear-gradient(135deg, rgba(1, 180, 228, 0.15), rgba(144, 206, 161, 0.1));
  border-color: rgba(1, 180, 228, 0.4);
  color: #01b4e4;
  font-weight: 700;
}

.tab-btn.tmdb-nav-tab:hover {
  background: linear-gradient(135deg, #01b4e4, #0d8abc);
  border-color: #01b4e4;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(1, 180, 228, 0.4);
  transform: translateY(-1px);
}

.tab-btn .tab-badge {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 10px;
}

/* Sort & View Controls */
.filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  color: #cbd5e1;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.custom-select:focus {
  border-color: var(--accent-cyan);
}

.custom-select option {
  background: #0f172a;
  color: #fff;
}

/* Genre Pills */
.genre-bar-section {
  padding: 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.genre-bar-section::-webkit-scrollbar {
  display: none;
}

.genre-list {
  display: flex;
  gap: 8px;
  align-items: center;
}

.genre-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.genre-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.genre-pill.active {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 700;
}

/* ==========================================================================
   SECTION HEADER & STATS
   ========================================================================== */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 28px 0 20px 0;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   MOVIE CARD GRID
   ========================================================================== */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.movie-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-slow);
  cursor: pointer;
}

.movie-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 210, 255, 0.15);
}

.poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #131b2e;
  overflow: hidden;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.movie-card:hover .poster-img {
  transform: scale(1.08);
}

/* Badges */
.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 3;
  pointer-events: none;
}

.badge-dday {
  background: linear-gradient(135deg, #e50914, #ff4757);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.badge-dday.released {
  background: linear-gradient(135deg, #10b981, #059669);
}

.badge-dday.upcoming-far {
  background: linear-gradient(135deg, #0284c7, #00d2ff);
  color: #000;
}

.btn-bookmark {
  pointer-events: auto;
  width: 32px;
  height: 32px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.btn-bookmark:hover {
  transform: scale(1.15);
  background: rgba(229, 9, 20, 0.8);
}

.btn-bookmark.bookmarked {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.95);
}

/* Hover Quick Action Overlay */
.card-overlay-actions {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(11, 15, 25, 0.95) 0%, rgba(11, 15, 25, 0.4) 50%, rgba(11, 15, 25, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}

.movie-card:hover .card-overlay-actions {
  opacity: 1;
}

.btn-quick-trailer {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: var(--transition);
}

.btn-quick-trailer:hover {
  background: var(--primary-hover);
  transform: scale(1.03);
}

/* Movie Info in Card */
.movie-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.movie-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.movie-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.movie-score {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--accent-gold);
}

.movie-genres-snippet {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   PAGINATION / LOAD MORE
   ========================================================================== */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 30px 0 60px;
}

.btn-load-more {
  padding: 12px 36px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-load-more:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* ==========================================================================
   CALENDAR VIEW
   ========================================================================== */
.calendar-view-container {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 60px;
}

.calendar-view-container.active {
  display: block;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
}

.calendar-title-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cal-month-title {
  font-size: 1.5rem;
  font-weight: 800;
}

.cal-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cal-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.cal-day-header {
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 10px 0;
}

.cal-day-header.sunday {
  color: #ff6b6b;
}

.cal-day-header.saturday {
  color: #38bdf8;
}

.cal-cell {
  min-height: 120px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.cal-cell:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.cal-cell.today {
  border-color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.04);
}

.cal-cell.empty {
  opacity: 0.2;
  pointer-events: none;
}

.cal-date-num {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.cal-cell.today .cal-date-num {
  color: var(--accent-cyan);
  font-weight: 800;
}

.cal-movie-pill {
  font-size: 0.72rem;
  background: rgba(229, 9, 20, 0.2);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: #ff9999;
  padding: 3px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: var(--transition);
}

.cal-movie-pill:hover {
  background: var(--primary);
  color: #fff;
}

.cal-more-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: auto;
}

/* ==========================================================================
   MOVIE DETAILS MODAL & VIDEO PLAYER
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
  animation: modalFadeIn 0.3s ease-out;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--primary);
  transform: scale(1.1);
}

/* Modal Hero Backdrop */
.modal-hero {
  position: relative;
  height: 380px;
  background-size: cover;
  background-position: center top;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

.modal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg-card) 0%, rgba(22, 29, 47, 0.6) 60%, rgba(22, 29, 47, 0.2) 100%);
}

.modal-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 24px;
  width: 100%;
}

.modal-poster {
  width: 130px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.modal-hero-text {
  flex: 1;
}

.modal-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}

.modal-original-title {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.modal-tag-item {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
}

/* Modal Body */
.modal-body {
  padding: 30px;
}

.modal-trailer-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  background: #000;
  border: 1px solid var(--border-light);
}

.modal-trailer-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.modal-section-h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-overview-p {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.7;
  white-space: pre-line;
}

.detail-specs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.spec-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
}

.spec-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.spec-label {
  color: var(--text-muted);
}

.spec-val {
  font-weight: 600;
  color: #fff;
  text-align: right;
}

/* Cast Grid */
.cast-slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.cast-card {
  width: 100px;
  flex-shrink: 0;
  text-align: center;
}

.cast-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  background: #1e293b;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.cast-name {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cast-char {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Similar Movies in Modal */
.similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.similar-item {
  cursor: pointer;
  transition: var(--transition);
}

.similar-item:hover {
  transform: translateY(-4px);
}

.similar-poster {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #1e293b;
  margin-bottom: 6px;
}

.similar-title {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   EMPTY & LOADING STATES
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

/* Shimmer Loading Skeleton */
.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 380px;
  position: relative;
}

.skeleton-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-light);
  background: #080c14;
  padding: 50px 0 30px;
  margin-top: 80px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tmdb-attribution {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tmdb-logo-img {
  height: 18px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .hero-section {
    height: 480px;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .modal-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 60px;
  }
  .site-header {
    height: 60px;
  }
  .hero-section {
    margin-top: 60px;
    height: 420px;
  }
  .hero-title {
    font-size: 1.7rem;
  }
  .hero-overview {
    display: none;
  }
  .hero-controls {
    display: none;
  }
  .main-nav-bar {
    top: 60px;
  }
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }
  .movie-title {
    font-size: 0.9rem;
  }
  .modal-hero {
    height: 260px;
    padding: 16px;
  }
  .modal-poster {
    width: 90px;
  }
  .modal-title {
    font-size: 1.4rem;
  }
  .modal-body {
    padding: 16px;
  }
  .calendar-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }
  .cal-cell {
    min-height: 80px;
    padding: 4px;
  }
}

@media (max-width: 576px) {
  .header-actions .header-btn span:not(.tmdb-pill-icon):not(.badge-count) {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
  .header-btn {
    padding: 8px 10px;
  }
  .hero-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
}

