/* ==========================================================================
   Арбузик (арбузик.топ) - Modern Cinema Design System
   Sleek Obsidian & Watermelon Ruby/Emerald Palette, Pure Vanilla CSS
   ========================================================================== */

:root {
  /* Watermelon & Obsidian Theme */
  --bg-dark: #07090e;
  --bg-surface: #0e1219;
  --bg-surface-elevated: #151b24;
  --bg-glass: rgba(14, 18, 25, 0.82);
  --bg-glass-card: rgba(21, 27, 36, 0.7);
  
  /* Watermelon Accents */
  --primary: #ff2a5f;
  --primary-hover: #ff4777;
  --primary-glow: rgba(255, 42, 95, 0.35);
  --primary-gradient: linear-gradient(135deg, #ff3b6f 0%, #e11d48 100%);

  --emerald: #10b981;
  --emerald-hover: #34d399;
  --emerald-glow: rgba(16, 185, 129, 0.3);

  --accent-blue: #38bdf8;
  --accent-gold: #fbbf24;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-active: rgba(255, 42, 95, 0.5);

  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 25px var(--primary-glow);

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.16s var(--ease-spring);
  --transition-smooth: 0.28s var(--ease-spring);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3, h4, .logo-text, .hero-title {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

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

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

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Header & Navigation (Netflix / Kion Style)
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
}

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

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.logo-icon-svg {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 10px rgba(255, 42, 95, 0.4));
}
.logo-icon-svg svg {
  width: 100%;
  height: 100%;
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.logo-text .highlight {
  color: var(--primary);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Category Navigation */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-link {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: #ffffff;
  background: var(--primary-gradient);
  font-weight: 700;
  box-shadow: 0 2px 12px var(--primary-glow);
}

/* Search Box */
.search-box {
  position: relative;
  flex: 1;
  max-width: 380px;
}

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

.search-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--text-subtle);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-surface-elevated);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.search-clear-btn svg {
  width: 12px;
  height: 12px;
}
.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Dropdown Results */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 460px;
  overflow-y: auto;
  z-index: 120;
  padding: 8px;
  animation: dropFadeIn 0.18s ease-out;
}

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

.search-drop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

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

.search-drop-thumb {
  width: 44px;
  height: 62px;
  border-radius: 4px;
  object-fit: cover;
  background: #111622;
}

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

.search-drop-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

.search-drop-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  margin-top: 3px;
}

.search-drop-rating {
  color: var(--accent-gold);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

.action-btn.icon-only {
  padding: 9px;
  border-radius: 50%;
}

.action-btn .badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

/* ==========================================================================
   Hero Featured Banner (Clean Netflix Style)
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 50px;
  overflow: hidden;
  margin-bottom: 24px;
}

.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center 20%;
  transition: opacity 0.7s ease-in-out, background-image 0.7s ease-in-out;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 9, 14, 0.2) 0%,
    rgba(7, 9, 14, 0.75) 55%,
    var(--bg-dark) 100%
  ),
  linear-gradient(
    90deg,
    var(--bg-dark) 0%,
    rgba(7, 9, 14, 0.88) 40%,
    rgba(7, 9, 14, 0.25) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(255, 42, 95, 0.16);
  border: 1px solid rgba(255, 42, 95, 0.35);
  color: #ff6b8b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.hero-title {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 12px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.9);
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-sm);
  background: var(--emerald);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--emerald-glow);
}

.meta-tag {
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.hero-genres {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero-overview {
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.6;
  max-width: 680px;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

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

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition-smooth);
  user-select: none;
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--primary-glow);
  font-weight: 700;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px var(--primary-glow);
}

.btn-glass {
  background: rgba(14, 18, 25, 0.75);
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(10px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Dots */
.hero-slider-nav {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all var(--transition-smooth);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--primary);
  width: 26px;
  border-radius: 6px;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ==========================================================================
   Genre Tabs & Filter Controls
   ========================================================================== */

.filter-section {
  margin-bottom: 28px;
}

.genre-tabs-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.genre-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 6px 2px 10px;
  scrollbar-width: none;
}
.genre-tabs::-webkit-scrollbar {
  display: none;
}

.genre-tab {
  white-space: nowrap;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  user-select: none;
}

.genre-tab:hover {
  color: #ffffff;
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}

.genre-tab.active {
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  border-color: var(--primary);
  box-shadow: 0 2px 14px var(--primary-glow);
}

/* Secondary Controls Row */
.filter-controls-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Custom Dropdown Component */
.custom-dropdown {
  position: relative;
}

.custom-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.custom-dropdown-btn:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-label-prefix {
  color: var(--text-subtle);
}

.dropdown-selected-val {
  font-weight: 600;
  color: #ffffff;
}

.dropdown-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.custom-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 190px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 110;
  backdrop-filter: blur(20px);
  animation: dropFadeIn 0.18s ease-out;
}

.dropdown-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dropdown-item.active {
  color: var(--primary);
  background: rgba(255, 42, 95, 0.12);
  font-weight: 600;
}

.reset-btn {
  padding: 7px 14px;
}

.quality-badges-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.quality-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  color: #cbd5e1;
}

.quality-pill-item.highlight-brand {
  background: rgba(255, 42, 95, 0.15);
  border-color: rgba(255, 42, 95, 0.4);
  color: #ff6b8b;
}

.catalog-info-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.catalog-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.catalog-heading h2 {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}

.catalog-count {
  font-size: 14px;
  color: var(--text-subtle);
  font-weight: 500;
}

/* ==========================================================================
   Movie Cards Grid
   ========================================================================== */

.main-content {
  margin-bottom: 80px;
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px;
}

.movie-card {
  position: relative;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
  border-color: var(--border-active);
}

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

.card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-spring);
}

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

.card-rating {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-rating svg {
  width: 12px;
  height: 12px;
}

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 4px;
  box-shadow: 0 2px 8px var(--primary-glow);
}

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

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

.play-circle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px var(--primary-glow);
  transform: scale(0.85);
  transition: transform var(--transition-fast);
}

.play-circle-btn svg {
  width: 22px;
  height: 22px;
  margin-left: 2px;
}

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

.card-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.card-genres {
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-subtle);
}

.empty-icon-svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--text-subtle);
}

.empty-state h3 {
  font-size: 22px;
  color: #ffffff;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ==========================================================================
   Player & Details Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 201;
}

.modal-window {
  position: relative;
  z-index: 202;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1180px;
  max-height: 94vh;
  overflow-y: auto;
  box-shadow: 0 24px 75px rgba(0, 0, 0, 0.9);
  animation: modalScaleUp 0.22s var(--ease-spring);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.modal-title-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-title-group h3 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.modal-orig-title {
  font-size: 13px;
  color: var(--text-subtle);
}

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

.modal-tool-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  transition: all var(--transition-fast);
}

.modal-tool-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.modal-close-btn:hover {
  background: #e11d48;
  color: #ffffff;
}

/* Player Screen */
.player-screen-wrapper {
  background: #000000;
  width: 100%;
}

.player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

.kinobox_player, .video-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000000;
}

/* Minimal Player Sub-Bar */
.player-sub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: #090c12;
  border-top: 1px solid var(--border-subtle);
}

.player-brand-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.player-server-pills {
  display: flex;
  gap: 8px;
}

.server-pill {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.server-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.server-pill.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Modal Details */
.modal-body-details {
  padding: 24px;
}

.details-cols {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.details-poster-col {
  width: 180px;
  flex-shrink: 0;
}

.details-poster {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.details-info-col {
  flex: 1;
}

.details-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.rating-badge-large {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--emerald);
  color: #ffffff;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
}

.detail-tag {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #e2e8f0;
}

.details-genres {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.details-overview {
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 20px;
}

.details-cast-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.cast-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.cast-label {
  color: var(--text-subtle);
  font-weight: 600;
  width: 120px;
  flex-shrink: 0;
}

.cast-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cast-chip {
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  color: #e2e8f0;
  font-size: 12px;
}

/* Similar */
.similar-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}

.similar-section h4 {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 16px;
}

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

.similar-card {
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-fast);
}

.similar-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.similar-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.similar-card-title {
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

/* ==========================================================================
   Side Drawers
   ========================================================================== */

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 380px;
  background: var(--bg-surface-elevated);
  border-left: 1px solid var(--border-medium);
  box-shadow: -8px 0 36px rgba(0, 0, 0, 0.8);
  z-index: 150;
  display: flex;
  flex-direction: column;
  animation: panelSlideIn 0.24s var(--ease-spring);
}

@keyframes panelSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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

.panel-title-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title-with-icon h3 {
  font-size: 18px;
  color: #ffffff;
}

.panel-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.panel-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.side-item:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

.side-item-thumb {
  width: 50px;
  height: 70px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

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

.side-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-item-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.side-item-remove {
  color: var(--text-subtle);
  padding: 6px;
  border-radius: 4px;
}
.side-item-remove:hover {
  color: var(--primary);
}

/* Cinema Curtain */
.cinema-curtain {
  position: fixed;
  inset: 0;
  background: #000000;
  opacity: 0.96;
  z-index: 199;
  cursor: pointer;
}

/* Settings Modal */
.settings-window {
  max-width: 540px;
}

.settings-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-item label {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.setting-pill-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-pill-btn {
  padding: 10px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.setting-pill-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.setting-pill-btn.active {
  background: rgba(255, 42, 95, 0.15);
  border-color: var(--primary);
  color: var(--primary-hover);
  font-weight: 700;
}

.settings-btns {
  display: flex;
  gap: 10px;
}

.setting-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 18, 25, 0.96);
  border: 1px solid var(--primary);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  z-index: 300;
  backdrop-filter: blur(12px);
  animation: toastFade 0.2s ease-out;
}

@keyframes toastFade {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Footer */
.footer {
  background: #040609;
  border-top: 1px solid var(--border-subtle);
  padding: 50px 0 30px;
  color: var(--text-muted);
}

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

.footer-desc {
  font-size: 14px;
  color: var(--text-subtle);
  margin-top: 14px;
  max-width: 360px;
}

.footer-col h4 {
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

.footer-note {
  font-size: 13px;
  color: var(--text-subtle);
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: var(--text-subtle);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(7, 9, 14, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  z-index: 99;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 12px;
}

.mobile-nav-btn.active {
  color: var(--primary);
}

.mobile-nav-btn svg {
  width: 18px;
  height: 18px;
}

/* Responsive */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  .quality-badges-right {
    display: none;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 60px;
  }
  .action-btn-text {
    display: none;
  }
  .hero-section {
    min-height: 480px;
    padding-bottom: 40px;
  }
  .hero-title {
    font-size: 28px;
  }
  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
  }
  .details-cols {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .details-poster-col {
    width: 140px;
  }
  .details-meta-row {
    justify-content: center;
  }
  .cast-row {
    flex-direction: column;
    align-items: center;
  }
  .cast-label {
    width: auto;
  }
  .filter-controls-row {
    flex-direction: column;
    align-items: stretch;
  }
  .custom-dropdown-btn {
    width: 100%;
    justify-content: space-between;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  body {
    padding-bottom: 60px;
  }
}
