/* StreamVault - Premium Movie & Series Discovery Platform */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CSS Variables ===== */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a2e;
  --bg-card: #16162a;
  --bg-glass: rgba(20, 20, 40, 0.85);
  --bg-glass-light: rgba(255, 255, 255, 0.05);
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --accent: #e50914;
  --accent-hover: #ff1a26;
  --accent-glow: rgba(229, 9, 20, 0.3);
  --gold: #ffd700;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 68px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 4%;
  transition: background var(--transition), box-shadow var(--transition);
  background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.navbar.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 1px 0 var(--border), var(--shadow);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: 32px;
  flex-shrink: 0;
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-logo-icon {
  font-size: 1.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-glass-light);
}

.nav-link.active {
  color: var(--accent);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Genre Button & Dropdown */
.genre-wrapper {
  position: relative;
}

.genre-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.genre-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: rgba(255,255,255,0.08);
}

.genre-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 360px;
  width: max-content;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  backdrop-filter: blur(20px);
  animation: fadeSlideDown 0.2s ease;
}

.genre-dropdown.active {
  display: flex;
}

.genre-item {
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.genre-item:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Search */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 36px 8px 36px;
  border-radius: 24px;
  font-size: 0.88rem;
  font-family: var(--font);
  width: 220px;
  transition: all var(--transition);
  outline: none;
}

.search-input:focus {
  width: 300px;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255,255,255,0.08);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px;
}

.search-clear:hover {
  color: var(--text-primary);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  width: 100%;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  animation: heroZoom 30s ease infinite alternate;
}

@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to top, var(--bg-primary) 0%, transparent 50%),
    linear-gradient(to right, rgba(10,10,15,0.9) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(10,10,15,0.4) 0%, transparent 30%);
}

.hero-content {
  position: relative;
  padding: 0 4% 5%;
  max-width: 700px;
  animation: fadeSlideUp 0.8s ease;
}

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 12px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  letter-spacing: -1px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.hero-overview {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 550px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

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

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
}

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

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* ===== Content Rows ===== */
.content-row {
  padding: 0 4%;
  margin-bottom: 32px;
}

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

.row-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.row-controls {
  display: flex;
  gap: 6px;
}

.row-arrow {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.row-arrow:hover {
  background: rgba(255,255,255,0.15);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.row-slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.row-slider::-webkit-scrollbar {
  display: none;
}

/* ===== Cards ===== */
.card {
  flex: 0 0 180px;
  cursor: pointer;
  transition: transform var(--transition);
}

.card:hover {
  transform: scale(1.06);
  z-index: 2;
}

.card-poster {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-tertiary);
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter var(--transition);
}

.card:hover .card-poster img {
  filter: brightness(0.6);
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  background: rgba(0,0,0,0.3);
}

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

.card-play {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: scale(0.8);
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.card:hover .card-play {
  transform: scale(1);
}

.card-play:hover {
  box-shadow: 0 8px 30px var(--accent-glow);
}

.card-rating {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
}

.card-type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-no-poster {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-tertiary);
}

.card-info {
  padding: 10px 4px 4px;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-year {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Detail Modal ===== */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px;
}

.detail-modal.active {
  display: flex;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 920px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: fadeSlideUp 0.4s ease;
  border: 1px solid var(--border);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.modal-hero {
  position: relative;
  height: 420px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.modal-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-secondary) 0%, transparent 60%),
              linear-gradient(to right, rgba(18,18,26,0.6) 0%, transparent 50%);
}

.modal-hero-info {
  position: relative;
  padding: 24px 32px;
  width: 100%;
}

.modal-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.modal-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.modal-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-rating {
  color: var(--gold) !important;
  font-weight: 600;
}

.modal-trailer-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all var(--transition);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.modal-trailer-btn:hover {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 12px 40px var(--accent-glow);
}

/* Modal Body */
.modal-body {
  padding: 24px 32px 40px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  margin-bottom: 32px;
}

.modal-tagline {
  color: var(--text-muted);
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 12px;
}

.modal-overview {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

/* Trailer */
.modal-trailer-section h3,
.modal-cast h3,
.modal-similar h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.trailer-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.trailer-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.trailer-placeholder {
  position: relative;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.trailer-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trailer-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  transition: background var(--transition);
}

.trailer-placeholder:hover .trailer-play-overlay {
  background: rgba(0,0,0,0.2);
}

/* Providers */
.modal-providers {
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.modal-providers h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.provider-section {
  margin-bottom: 12px;
}

.provider-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 8px;
}

.provider-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.provider-item {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-tertiary);
  transition: transform var(--transition);
}

.provider-item:hover {
  transform: scale(1.1);
}

.provider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.provider-link {
  display: block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.provider-link:hover {
  color: var(--accent-hover);
}

.no-providers {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Detail List */
.modal-details-list {
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

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

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

/* Cast */
.modal-cast {
  margin-bottom: 32px;
}

.cast-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.cast-grid::-webkit-scrollbar {
  display: none;
}

.cast-card {
  flex: 0 0 90px;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition);
}

.cast-card:hover {
  transform: translateY(-4px);
}

.cast-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 8px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
}

.cast-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cast-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Similar */
.modal-similar {
  margin-bottom: 32px;
}

.similar-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.similar-grid::-webkit-scrollbar {
  display: none;
}

.similar-card {
  flex: 0 0 120px;
  cursor: pointer;
  transition: transform var(--transition);
}

.similar-card:hover {
  transform: scale(1.06);
}

.similar-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.similar-card span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Search Results ===== */
.search-header {
  padding: 100px 4% 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.search-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
}

.search-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  padding: 0 4% 60px;
}

.search-grid .card {
  flex: none;
  width: 100%;
}

.search-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.search-empty svg {
  margin-bottom: 16px;
  opacity: 0.4;
}

.search-empty h3 {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ===== Loading ===== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

/* Skeleton Loading */
.skeleton-row .row-header {
  margin-bottom: 14px;
}

.skeleton-title {
  width: 200px;
  height: 24px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  animation: shimmer 1.5s infinite;
}

.skeleton-card {
  flex: 0 0 180px;
}

.skeleton-poster {
  aspect-ratio: 2/3;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  animation: shimmer 1.5s infinite;
}

.skeleton-info {
  padding: 10px 4px;
}

.skeleton-text {
  height: 14px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  margin-bottom: 6px;
  animation: shimmer 1.5s infinite;
}

.skeleton-text.short {
  width: 60%;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Hero Skeleton */
.hero-skeleton {
  padding: 0 4% 5%;
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.skeleton-hero-title {
  width: 400px;
  height: 40px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  animation: shimmer 1.5s infinite;
}

.skeleton-hero-text {
  width: 500px;
  height: 60px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  animation: shimmer 1.5s infinite;
}

.skeleton-hero-buttons {
  width: 280px;
  height: 48px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  animation: shimmer 1.5s infinite;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 4% 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand h3 {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.footer-bottom a {
  color: var(--accent);
  text-decoration: none;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  box-shadow: 0 4px 20px var(--accent-glow);
  z-index: 500;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* ===== Trailer Overlay ===== */
.trailer-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trailer-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
  cursor: pointer;
}

.trailer-overlay-content {
  position: relative;
  width: 90%;
  max-width: 960px;
  aspect-ratio: 16/9;
}

.trailer-overlay-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius);
}

.trailer-overlay-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  padding: 12px 24px;
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.88rem;
  z-index: 5000;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-error {
  border-color: var(--accent);
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-title { font-size: 2.4rem; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-hero { height: 300px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.active { display: flex; }
  .mobile-menu-btn { display: block; }
  .nav-brand { margin-right: 12px; }

  .hero { min-height: 70vh; }
  .hero-title { font-size: 1.8rem; }
  .hero-overview { font-size: 0.9rem; }
  .hero-content { padding: 0 5% 8%; }

  .card { flex: 0 0 140px; }
  .search-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
  .search-grid .card { flex: none; }

  .modal-content { margin: 10px; }
  .modal-hero { height: 240px; }
  .modal-title { font-size: 1.5rem; }
  .modal-body { padding: 16px 20px 32px; }

  .search-input { width: 160px; }
  .search-input:focus { width: 200px; }

  .genre-btn span.genre-text { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 20px; }

  .skeleton-hero-title { width: 250px; height: 30px; }
  .skeleton-hero-text { width: 300px; height: 40px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.5rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .card { flex: 0 0 120px; }
  .search-input { width: 120px; font-size: 0.8rem; }
  .search-input:focus { width: 160px; }
  .nav-logo { font-size: 1.2rem; }
}
