/* ----------------------------------------------------
   MovieStream Premium CSS Stylesheet
   Design System: OLED Dark Mode + Glassmorphism
---------------------------------------------------- */

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

:root {
  --color-bg: #06060c;
  --color-bg-rgb: 6, 6, 12;
  --color-surface: #111122;
  --color-surface-rgb: 17, 17, 34;
  --color-primary: #6366f1;
  --color-primary-glow: rgba(99, 102, 241, 0.4);
  --color-accent: #22c55e;
  --color-accent-glow: rgba(34, 197, 94, 0.4);
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-border: #2e2a56;
  --color-destructive: #ef4444;
  
  --font-title: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-speed: 0.3s;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  
  --z-index-nav: 100;
  --z-index-modal: 1000;
  --z-index-toast: 2000;
}

/* Base Styles & Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

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

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

input {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
}

input:focus {
  outline: none;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: #1f1f3a;
  border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Header & Navigation */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 4%;
  background: rgba(6, 6, 12, 0.98);
  border-bottom: 1px solid rgba(46, 42, 86, 0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: var(--z-index-nav);
  transition: background var(--transition-speed);
}

.header-nav.scrolled {
  background: rgba(6, 6, 12, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--color-primary);
  text-shadow: 0 0 10px var(--color-primary-glow);
}

.logo-badge {
  background: var(--color-accent);
  color: #000;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  vertical-align: middle;
  margin-left: 5px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-speed);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--color-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Live Search Container */
.search-container {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: 30px;
  padding: 0.4rem 1rem 0.4rem 2.2rem;
  width: 240px;
  transition: width var(--transition-speed), border-color var(--transition-speed);
  display: flex;
  align-items: center;
}

.search-container:focus-within {
  width: 320px;
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

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

.search-input {
  width: 100%;
  font-size: 0.85rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 90vh;
  padding: 120px 4% 60px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(6, 6, 12, 0.9) 30%, rgba(6, 6, 12, 0.4) 60%, rgba(6, 6, 12, 0.9) 100%),
              linear-gradient(to top, rgba(6, 6, 12, 1) 0%, rgba(6, 6, 12, 0) 50%, rgba(6, 6, 12, 0.6) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  margin-top: 2rem;
}

.hero-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-primary), #818cf8);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 1.2rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.8rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fbbf24;
  font-weight: 700;
}

.hero-rating svg {
  fill: #fbbf24;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.hero-description {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 30px;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background-color: var(--color-accent);
  color: #06060c;
  box-shadow: 0 0 15px var(--color-accent-glow);
}

.btn-primary:hover {
  background-color: #4ade80;
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--color-accent-glow);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

/* Genres/Category Filtering Toolbar */
.genre-filter-bar {
  padding: 2.5rem 4% 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-left: 12px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background-color: var(--color-primary);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--color-primary);
}

.genre-tags {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none; /* Hide scrollbar for clean tags */
}

.genre-tags::-webkit-scrollbar {
  display: none;
}

.genre-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  padding: 0.4rem 1.1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.genre-tag:hover {
  color: #fff;
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.05);
}

.genre-tag.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 0 15px var(--color-primary-glow);
}

/* Movie Slider Shelf */
.movies-shelf-section {
  padding: 1.5rem 0 1.5rem 4%;
  position: relative;
  content-visibility: auto; /* Defer rendering of off-screen elements */
  contain-intrinsic-size: 280px;
}

.movies-slider-container {
  position: relative;
  width: 100%;
}

.movies-slider {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 10px 4% 20px 0;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

/* Movie Card */
.movie-card {
  flex: 0 0 190px;
  width: 190px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background-color: var(--color-surface);
  border: 1px solid rgba(46, 42, 86, 0.2);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  cursor: pointer;
  transform: translateZ(0); /* Hardware acceleration hint */
}

.movie-card:hover {
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.movie-poster-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 2.9;
  background: #0d0d1e;
  overflow: hidden;
}

.movie-poster-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(0, 0, 0); /* Force GPU layer */
  backface-visibility: hidden;
}

.movie-card:hover .movie-poster-wrapper img {
  /* Removed scaling transform to prevent TV Box performance lagging */
}

.movie-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(6, 6, 12, 0.95) 15%, rgba(6, 6, 12, 0.4) 50%, rgba(6, 6, 12, 0.1) 100%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  transition: opacity var(--transition-speed);
}

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

.movie-rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(6, 6, 12, 0.95);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  z-index: 2;
}

.movie-year-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(6, 6, 12, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 6px;
  z-index: 2;
}

.movie-play-btn {
  align-self: center;
  margin-bottom: auto;
  margin-top: auto;
  background: var(--color-accent);
  color: #06060c;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--color-accent-glow);
  transform: scale(0.8);
  transition: transform var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.movie-play-btn:hover {
  background-color: #4ade80;
  transform: scale(1.1) !important;
}

.movie-card-info-top {
  margin-top: 0.5rem;
}

.movie-card-genres {
  font-size: 0.7rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.movie-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.movie-card-title-en {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card-details {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

/* Footer Section */
footer {
  background-color: #030308;
  border-top: 1px solid var(--color-border);
  padding: 3rem 4% 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 0.8rem;
}

.footer-links-group {
  display: flex;
  gap: 3rem;
}

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

.footer-links h4 {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Modals general wrapper */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 3, 6, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: var(--z-index-modal);
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(6, 6, 12, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--color-destructive);
  border-color: var(--color-destructive);
  transform: rotate(90deg);
}

/* Movie Details Modal Specifics */
.modal-hero-banner {
  position: relative;
  width: 100%;
  height: 280px;
  background-size: cover;
  background-position: center;
}

.modal-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--color-surface) 0%, rgba(17, 17, 34, 0.2) 60%, rgba(17, 17, 34, 0.6) 100%);
}

.modal-body {
  padding: 2rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
}

.modal-poster-wrapper {
  margin-top: -120px;
  position: relative;
  z-index: 2;
}

.modal-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  border: 3px solid var(--color-border);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.modal-info-panel h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.modal-info-panel h3 {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-bottom: 1rem;
}

.modal-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
}

.modal-rating {
  color: #fbbf24;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-rating svg {
  fill: #fbbf24;
}

.modal-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  padding: 1px 6px;
  border-radius: 4px;
}

.modal-synopsis {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-cast {
  margin-bottom: 1.5rem;
}

.modal-cast strong {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.modal-cast-list {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.modal-action-buttons {
  display: flex;
  gap: 1rem;
}

.btn-sm {
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
  border-radius: 20px;
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
  gap: 1.5rem;
}

.modal-tab-btn {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding-bottom: 0.6rem;
  position: relative;
}

.modal-tab-btn.active {
  color: #fff;
}

.modal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Video Player Modal Specifics */
.player-modal-container {
  max-width: 950px;
  background: #000;
  border: 1px solid #1f1f3a;
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

/* Player Top Server Buttons Bar */
.player-top-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  background-color: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}

.player-server-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: #3e3e42;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.player-server-btn:hover {
  opacity: 0.9;
}

.player-server-btn.active, .player-server-btn-primary {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4);
}

.player-server-btn-backup {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

/* Player Bottom Selectors Bar */
.player-bottom-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background-color: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}

.player-select-btn {
  background: #16a34a;
  color: #ffffff;
  border: none;
  padding: 0.55rem 1.4rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  appearance: auto;
}

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

.video-frame-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
}

.video-frame-wrapper iframe,
.video-frame-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Custom HTML5 Video Player Controls */
.custom-player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transition: opacity var(--transition-speed);
  z-index: 5;
}

.video-frame-wrapper:hover .custom-player-controls,
.video-frame-wrapper:focus-within .custom-player-controls {
  opacity: 1;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  transition: height 0.1s ease;
}

.progress-bar-container:hover {
  height: 8px;
}

.progress-filled {
  height: 100%;
  background-color: var(--color-accent);
  border-radius: 3px;
  width: 0;
  position: relative;
  box-shadow: 0 0 10px var(--color-accent-glow);
}

.progress-handle {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease;
  pointer-events: none;
}

.progress-bar-container:hover .progress-handle {
  transform: translateY(-50%) scale(1);
}

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.player-btn {
  color: #fff;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.1s;
}

.player-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.player-time {
  font-size: 0.82rem;
  font-weight: 500;
  color: #e2e8f0;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.volume-slider {
  width: 70px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: width 0.2s;
}

.volume-slider:hover {
  width: 90px;
}

.volume-filled {
  height: 100%;
  background-color: #fff;
  border-radius: 2px;
  width: 80%;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  z-index: var(--z-index-toast);
}

.toast {
  background: rgba(17, 17, 34, 0.98);
  border: 1px solid var(--color-border);
  color: #fff;
  padding: 0.9rem 1.5rem;
  border-radius: var(--border-radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(50px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success-icon {
  color: var(--color-accent);
}

/* Grid layout for watchlist/search results */
.grid-container {
  padding: 2.5rem 4%;
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--color-text-muted);
}

.empty-state svg {
  margin-bottom: 1rem;
  color: var(--color-border);
}

.empty-state h3 {
  color: #fff;
  margin-bottom: 0.5rem;
  font-family: var(--font-title);
}

/* Embedded ads alert blocker styling */
.player-blocker-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(6, 6, 12, 0.95);
  border: 1px solid var(--color-border);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--color-text-muted);
  pointer-events: none;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-blocker-overlay svg {
  color: var(--color-accent);
}

/* Responsive Styles */
@media (max-width: 900px) {
  .modal-body {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.5rem;
  }
  
  .modal-poster-wrapper {
    margin-top: 0;
    max-width: 160px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .modal-hero-banner {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .header-nav {
    padding: 0.8rem 5%;
  }
  
  .nav-links {
    display: none; /* In a full app, a hamburger menu would be added here */
  }
  
  .search-container {
    width: 160px;
  }
  
  .search-container:focus-within {
    width: 200px;
  }
  
  .hero-section {
    min-height: 70vh;
    padding-top: 100px;
  }
  
  .hero-content {
    margin-top: 0;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-description {
    -webkit-line-clamp: 3;
    margin-bottom: 1.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .footer-links-group {
    flex-wrap: wrap;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.4rem;
  }
  
  .search-container {
    display: none; /* Hide top search bar on extremely small screens to save space */
  }
  
  .hero-section {
    min-height: 60vh;
  }
  
  .btn {
    width: 100%;
  }
  
  .modal-action-buttons {
    flex-direction: column;
    gap: 0.6rem;
  }
  
  .movies-slider {
    gap: 0.8rem;
  }
  
  .movie-card {
    flex: 0 0 145px;
    width: 145px;
  }
}

#mainContent {
  padding-top: 85px;
}

