/* ═══════════════════════════════════════════════
   FreeMovie — Premium Dark Theme Design System
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ── Custom Properties ───────────────────────── */
:root {
  --bg-primary: #080811;
  --bg-secondary: #0f0f1a;
  --bg-card: #12121f;
  --bg-glass: rgba(18, 18, 31, 0.7);
  --bg-glass-light: rgba(255, 255, 255, 0.04);

  --accent-primary: #7c3aed;
  --accent-secondary: #4f46e5;
  --accent-pink: #ec4899;
  --accent-glow: rgba(124, 58, 237, 0.35);
  --gradient-brand: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #06b6d4 100%);
  --gradient-card: linear-gradient(180deg, rgba(124, 58, 237, 0.1) 0%, transparent 100%);

  --text-primary: #f0f0ff;
  --text-secondary: #8b8ba0;
  --text-muted: #4a4a6a;

  --border: rgba(124, 58, 237, 0.15);
  --border-hover: rgba(124, 58, 237, 0.4);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --shadow-purple: 0 4px 20px rgba(124, 58, 237, 0.3);

  --sidebar-width: 300px;
  --header-height: 70px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Outfit', system-ui, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-secondary); }

/* ── Layout ──────────────────────────────────── */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 0 0 60px;
}

/* ── Header ──────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(8, 8, 17, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow-purple);
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Search Bar ──────────────────────────────── */
.search-wrapper {
  flex: 1;
  max-width: 560px;
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-glass-light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
  padding: 0 14px 0 18px;
  color: var(--text-muted);
  font-size: 16px;
}

#imdb-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 12px 0;
}

#imdb-input::placeholder { color: var(--text-muted); }

.search-btn {
  background: var(--gradient-brand);
  border: none;
  color: white;
  padding: 11px 22px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity var(--transition);
  white-space: nowrap;
}

.search-btn:hover { opacity: 0.85; }

/* ── Suggestions Dropdown ────────────────────── */
.suggestions-box {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 200;
}

.suggestions-box.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--transition);
}

.suggestion-item:hover { background: var(--bg-glass-light); }

.sug-poster {
  width: 36px;
  height: 54px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

.sug-title { font-size: 14px; font-weight: 500; }
.sug-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Header Buttons ──────────────────────────── */
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.icon-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

/* ── Settings Panel ──────────────────────────── */
.settings-panel {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 0 var(--radius-lg);
  padding: 24px;
  z-index: 150;
  box-shadow: var(--shadow-card);
  transform: translateX(110%);
  transition: transform var(--transition-slow);
}

.settings-panel.visible { transform: translateX(0); }

.settings-panel h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.settings-panel p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.settings-panel a {
  color: var(--accent-primary);
  text-decoration: none;
}

.settings-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  padding: 10px 14px;
  outline: none;
  margin-bottom: 12px;
  transition: border-color var(--transition);
}

.settings-input:focus { border-color: var(--accent-primary); }

.btn-save {
  width: 100%;
  background: var(--gradient-brand);
  border: none;
  color: white;
  padding: 11px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn-save:hover { opacity: 0.85; }

/* ── Backdrop Hero ───────────────────────────── */
.backdrop-hero {
  position: relative;
  width: 100%;
  height: 300px;
  background-size: cover;
  background-position: center top;
  display: none;
}

.backdrop-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8,8,17,0.3) 0%, rgba(8,8,17,1) 100%);
}

/* ── Movie Info Section ──────────────────────── */
.movie-info-section {
  display: none;
  padding: 32px 24px;
  position: relative;
  margin-top: -80px;
  z-index: 2;
}

.movie-info-inner {
  display: flex;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.movie-poster-wrap {
  flex-shrink: 0;
}

.movie-poster {
  width: 200px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  display: block;
}

.movie-details {
  flex: 1;
  padding-top: 8px;
  min-width: 0;
}

.movie-type-badge {
  display: inline-block;
  background: var(--gradient-brand);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.movie-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 6px;
}

.movie-tagline {
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
  margin-bottom: 14px;
}

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.meta-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.meta-chip span:first-child { color: var(--text-muted); font-size: 12px; }

.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.genre-tag {
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  padding: 4px 12px;
  color: var(--text-secondary);
}

.movie-overview {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 20px;
  max-width: 680px;
}

.movie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid;
}

.btn-watch {
  background: var(--gradient-brand);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-purple);
}

.btn-watch:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(124,58,237,0.5); }

.btn-fav {
  background: transparent;
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

.btn-fav:hover, .btn-fav.active {
  background: rgba(236, 72, 153, 0.12);
  border-color: var(--accent-pink);
  color: var(--accent-pink);
}

.btn-copy {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-copy:hover { border-color: var(--border-hover); color: var(--text-secondary); }

/* ── Cast Section ────────────────────────────── */
.cast-section {
  margin-top: 28px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.cast-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.cast-scroll::-webkit-scrollbar { height: 3px; }

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

.cast-card img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  margin-bottom: 6px;
  transition: border-color var(--transition);
}

.cast-card:hover img { border-color: var(--accent-primary); }

.cast-name {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ── Player Section ──────────────────────────── */
.player-section {
  display: none;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.player-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

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

.provider-btn {
  background: var(--bg-glass-light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  cursor: pointer;
  transition: all var(--transition);
}

.provider-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.provider-btn.active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-purple);
}

/* ── TV Navigator ────────────────────────────── */
.tv-nav {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tv-nav-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-select {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  padding: 8px 14px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  min-width: 160px;
}

.nav-select:focus { border-color: var(--accent-primary); }

/* ── Player Iframe Wrapper ───────────────────── */
.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 60px rgba(124, 58, 237, 0.2);
  border: 1px solid var(--border);
}

.player-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.fullscreen-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 10;
}

.player-wrap:hover .fullscreen-btn { opacity: 1; }

/* ── Trending Section ────────────────────────── */
.trending-section {
  padding: 40px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.section-badge {
  background: var(--gradient-brand);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

/* ── Movie Cards ─────────────────────────────── */
.trending-card {
  cursor: pointer;
  transition: transform var(--transition);
}

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

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

.card-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.trending-card:hover .card-poster-wrap img { transform: scale(1.05); }

.card-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-rating {
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  color: #ffd700;
}

.card-type {
  background: var(--gradient-brand);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.0);
  color: white;
  font-size: 36px;
  opacity: 0;
  transition: all var(--transition);
}

.trending-card:hover .card-play-btn {
  opacity: 1;
  background: rgba(124, 58, 237, 0.5);
  backdrop-filter: blur(2px);
}

.card-info { padding: 8px 2px 0; }

.card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-year {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Sidebar ─────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  box-shadow: var(--shadow-card);
}

.sidebar.open { transform: translateX(0); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: color var(--transition);
}

.sidebar-close:hover { color: var(--text-primary); }

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.sidebar-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.sidebar-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.sidebar-panels {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.sidebar-panel {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  overflow-y: auto;
}

.sidebar-panel.active { display: flex; }

.sidebar-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.btn-clear {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-clear:hover { border-color: var(--accent-pink); color: var(--accent-pink); }

/* ── History Items ───────────────────────────── */
.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  margin-bottom: 4px;
}

.history-item:hover { background: var(--bg-glass-light); }

.history-poster {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

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

.history-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.history-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  flex-shrink: 0;
  transition: color var(--transition);
}

.history-remove:hover { color: var(--accent-pink); }
.history-remove.fav { color: var(--accent-pink); }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 32px 0;
}

/* ── Search Modal ────────────────────────────── */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 24px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  overflow-y: auto;
}

.search-modal.visible {
  opacity: 1;
  pointer-events: all;
}

.search-modal-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 900px;
  box-shadow: var(--shadow-card);
}

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

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close:hover { color: var(--text-primary); border-color: var(--border-hover); }

/* ── Loading Overlay ─────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 17, 0.85);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}

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

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

.loading-text {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ── Toast Notifications ─────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  min-width: 220px;
  box-shadow: var(--shadow-card);
  transform: translateX(110%);
  transition: transform var(--transition);
}

.toast.show { transform: translateX(0); }

.toast-success { border-color: #10b981; color: #10b981; }
.toast-error { border-color: var(--accent-pink); color: var(--accent-pink); }
.toast-warning { border-color: #f59e0b; color: #f59e0b; }
.toast-info { border-color: var(--accent-primary); color: var(--accent-secondary); }

/* ── Hero Welcome ────────────────────────────── */
.hero-welcome {
  text-align: center;
  padding: 80px 24px 40px;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
}

.hero-examples {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.example-chip {
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  padding: 6px 16px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.example-chip:hover {
  background: var(--accent-glow);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

/* ── Footer ──────────────────────────────────── */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

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

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .header { padding: 0 12px; gap: 8px; }
  .logo-text { display: none; }
  
  .search-icon { padding: 0 10px; font-size: 14px; }
  #imdb-input { font-size: 13px; padding: 10px 0; }
  .search-btn { padding: 10px 14px; font-size: 13px; }
  
  .settings-panel { width: 100%; border-radius: 0; }
  
  .backdrop-hero { height: 200px; }
  .movie-info-section { padding: 20px 16px; margin-top: -60px; }
  .movie-info-inner { flex-direction: column; gap: 16px; align-items: center; text-align: center; width: 100%; }
  .movie-details { width: 100%; max-width: 100%; }
  .movie-poster { width: 140px; }
  .movie-actions { justify-content: center; }
  .genre-tags { justify-content: center; }
  .movie-meta-row { justify-content: center; }
  .movie-title { font-size: 28px; }
  .movie-overview { font-size: 13px; margin-bottom: 16px; max-width: 100%; }
  
  .trending-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
  
  .player-section { padding: 16px; }
  .player-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  
  .tv-nav { flex-direction: column; align-items: stretch; }
  .nav-select { width: 100%; }
  
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: unset; }
}

@media (max-width: 480px) {
  .header { gap: 6px; }
  .icon-btn { width: 36px; height: 36px; font-size: 16px; }
  .search-icon { display: none; }
  #imdb-input { padding-left: 12px; }
  #imdb-input::placeholder { font-size: 12px; }
  
  .hero-title { font-size: 32px; }
  .backdrop-hero { height: 160px; }
  .movie-info-section { padding: 16px 12px; margin-top: -40px; }
  .movie-title { font-size: 24px; }
  
  .trending-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .movie-actions { flex-direction: column; width: 100%; }
  .btn-action { justify-content: center; }
}

/* ── Animations ──────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.movie-info-section,
.player-section,
.trending-section {
  animation: fadeInUp 0.4s ease forwards;
}
