/* ═══════════════════════════════════════════
   Komorebi — Cinejoy-Inspired Dark UI
   Ultra-sleek cinema streaming design
═══════════════════════════════════════════ */

:root {
  --bg:             #07080d;
  --bg-gradient:    radial-gradient(ellipse at 50% 0%, #11152a 0%, #07080d 75%);
  --surface:        #0e111d;
  --surface-glass:  rgba(14, 17, 29, 0.82);
  --card:           #141726;
  --card-hover:     #1a1f33;
  --border:         rgba(255, 255, 255, 0.07);
  --border-light:   rgba(255, 255, 255, 0.12);
  --border-glow:    rgba(0, 229, 255, 0.4);
  --text:           #f0f2fb;
  --text-dim:       #c3c7db;
  --muted:          #717796;
  --accent:         #00e5ff;
  --accent-rgb:     0, 229, 255;
  --accent-blue:    #3b82f6;
  --accent-grad:    linear-gradient(135deg, #00e5ff 0%, #3b82f6 100%);
  --accent-red:     #ff3366;
  --gold:           #ffb800;
  --hd-green:       #00e676;
  --r:              12px;
  --r-sm:           8px;
  --r-pill:         999px;
  --nav-h:          70px;
  --shadow-card:    0 12px 35px rgba(0, 0, 0, 0.6);
  --shadow-glow:    0 0 25px rgba(0, 229, 255, 0.35);
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

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

select {
  font-family: inherit;
}

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

/* ── Scrollbar ─────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #1e2338;
  border-radius: 4px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #2a3250;
}

/* ══════════════════════════════════════
   NAVBAR (Cinejoy Style)
══════════════════════════════════════ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.25s ease;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--nav-h);
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
  flex-shrink: 0;
  text-transform: none;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-grad);
  box-shadow: 0 2px 10px rgba(0, 229, 255, 0.4);
  flex-shrink: 0;
}

.logo-icon svg {
  display: block;
}

.logo-name span,
.logo span {
  color: var(--accent);
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  color: var(--muted);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-links a.active {
  color: #fff;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent);
}

/* Cinejoy Search Input */
.nav-search {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.search-svg {
  position: absolute;
  left: 14px;
  pointer-events: none;
  color: var(--muted);
  transition: color 0.2s;
  z-index: 2;
}

.nav-search input {
  background: rgba(20, 24, 38, 0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--r-pill);
  padding: 9px 18px 9px 40px;
  color: var(--text);
  font-size: 0.88rem;
  width: 260px;
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-search input:focus {
  width: 320px;
  background: rgba(14, 18, 30, 0.95);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.18), 0 0 15px rgba(0, 229, 255, 0.15);
}

.nav-search:focus-within .search-svg {
  color: var(--accent);
}

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

.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-height: 480px;
  overflow-y: auto;
  background: #111422;
  border: 1px solid var(--border-light);
  border-radius: var(--r);
  z-index: 200;
  display: none;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 229, 255, 0.1);
}

.search-dropdown.open {
  display: block;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

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

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

.search-item img {
  width: 44px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

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

.search-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.search-item-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 3px;
}

.search-item-type {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  background: var(--accent-grad);
  color: #05060a;
  flex-shrink: 0;
}

.search-item-type.tv {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
}

.hamburger {
  display: none;
  color: var(--text);
  font-size: 1.4rem;
  padding: 6px 10px;
  border-radius: 6px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px 16px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  padding: 12px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
  border: none;
}

/* ══════════════════════════════════════
   HERO BANNER (Cinejoy Style)
══════════════════════════════════════ */
.hero {
  position: relative;
  height: 85vh;
  min-height: 540px;
  max-height: 760px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-bottom: 70px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  transition: background-image 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(7, 8, 13, 0.85) 25%, rgba(7, 8, 13, 0.3) 60%, transparent 100%),
    linear-gradient(to right, var(--bg) 0%, rgba(7, 8, 13, 0.85) 30%, rgba(7, 8, 13, 0.2) 70%, transparent 100%);
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 16px;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
}

.hero-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.hero-title {
  font-size: clamp(32px, 5.2vw, 62px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 16px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.hero-desc {
  font-size: clamp(14px, 1.4vw, 16px);
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

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

.hero-meta .tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  backdrop-filter: blur(4px);
}

.hero-meta .tag-quality {
  background: rgba(0, 230, 118, 0.15);
  border-color: rgba(0, 230, 118, 0.35);
  color: var(--hd-green);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero-meta .tag-star {
  color: var(--gold);
  border-color: rgba(255, 184, 0, 0.35);
  background: rgba(255, 184, 0, 0.12);
  font-weight: 700;
}

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

/* ── Buttons (Cinejoy Style) ─────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-grad);
  color: #060911;
  font-weight: 800;
  font-size: 15px;
  padding: 13px 30px;
  border-radius: var(--r-pill);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 229, 255, 0.55);
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary svg {
  fill: currentColor;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

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

.btn-secondary:active {
  transform: scale(0.98);
}

/* ══════════════════════════════════════
   CATEGORY TABS (Cinejoy Signature)
══════════════════════════════════════ */
.category-tabs-wrap {
  margin-top: -24px;
  margin-bottom: 36px;
  position: relative;
  z-index: 10;
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
  height: 0;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-tab:hover {
  color: #fff;
  border-color: var(--border-light);
  background: var(--card-hover);
  transform: translateY(-1px);
}

.cat-tab.active {
  background: var(--accent-grad);
  border-color: transparent;
  color: #060911;
  box-shadow: 0 4px 18px rgba(0, 229, 255, 0.4);
}

/* ══════════════════════════════════════
   SHELVES / CONTENT ROWS
══════════════════════════════════════ */
.main {
  padding-bottom: 90px;
}

.shelf {
  margin-bottom: 46px;
  position: relative;
}

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

.shelf-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.shelf-title .shelf-icon {
  font-size: 1.25rem;
}

.shelf-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.shelf-row::-webkit-scrollbar {
  height: 6px;
}

/* ══════════════════════════════════════
   CINEJOY MOVIE / TV CARD
══════════════════════════════════════ */
.card {
  position: relative;
  flex-shrink: 0;
  width: 175px;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  scroll-snap-align: start;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), 0 0 20px rgba(0, 229, 255, 0.15);
  z-index: 10;
}

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

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

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

.card-poster-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #131728 0%, #1a2038 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--muted);
}

/* Cinejoy Badges */
.card-quality-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 230, 118, 0.9);
  color: #060911;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.card-type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(14, 18, 30, 0.85);
  backdrop-filter: blur(4px);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 255, 0.3);
  z-index: 2;
}

.card-type-badge.tv {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.3);
}

/* Cinejoy Center Play Hover */
.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 15, 0.65);
  backdrop-filter: blur(2px);
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: opacity 0.25s ease;
  z-index: 3;
}

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

.card-play-center {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #060911;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.6);
  transform: scale(0.85);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.card-play-center:hover {
  transform: scale(1.1);
  box-shadow: 0 0 35px rgba(0, 229, 255, 0.85);
}

.card-info-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid var(--border-light);
  backdrop-filter: blur(4px);
  transition: all 0.15s ease;
}

.card-info-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: var(--accent);
}

/* Card Body */
.card-body {
  padding: 10px 12px 14px;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

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

.card-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--gold);
  font-weight: 700;
}

.card-year {
  color: var(--text-dim);
}

/* ══════════════════════════════════════
   GRID VIEW (Browse Pages)
══════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
}

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-bar select {
  background: var(--card);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 9px 18px;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpolyline points='0,0 5,6 10,0' fill='none' stroke='%2300e5ff' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.filter-bar select:focus,
.filter-bar select:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

.filter-bar select option {
  background: #0e111d;
  color: #fff;
}

.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 22px;
  min-height: 400px;
}

.grid-view .card {
  width: 100%;
  flex-shrink: unset;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #121524 25%, #1c223a 50%, #121524 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r);
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.skel-poster {
  width: 100%;
  aspect-ratio: 2/3;
}

.skel-line {
  height: 12px;
  border-radius: 4px;
  margin-top: 10px;
}

.skel-line-sm {
  width: 60%;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.page-btn {
  background: var(--card);
  border: 1px solid var(--border-light);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--accent-grad);
  border-color: transparent;
  color: #060911;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.4);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--border);
}

/* ══════════════════════════════════════
   PLAYER MODAL (Cinejoy Theater Mode)
══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #0f1220;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 18px;
  width: 100%;
  max-width: 980px;
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.95), 0 0 40px rgba(0, 229, 255, 0.15);
  animation: modalIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { transform: scale(0.94) translateY(24px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: #121526;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--accent-red);
  color: #fff;
  transform: rotate(90deg);
}

.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.player-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #05060b;
  z-index: 3;
  transition: opacity 0.3s;
}

.player-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.player-loader p {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(0, 229, 255, 0.15);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

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

.player-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Source bar */
.source-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #111424;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.source-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}

.source-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hd-green);
  box-shadow: 0 0 6px var(--hd-green);
}

.source-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.source-btn.active {
  background: var(--accent-grad);
  border-color: transparent;
  color: #060911;
  box-shadow: 0 2px 12px rgba(0, 229, 255, 0.4);
}

.source-btn.active .server-dot {
  background: #060911;
  box-shadow: none;
}

/* TV Controls */
.tv-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: #131728;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.tv-controls label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-controls select {
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  outline: none;
  cursor: pointer;
}

.tv-controls select:focus {
  border-color: var(--accent);
}

/* ══════════════════════════════════════
   INFO MODAL
══════════════════════════════════════ */
.modal-info-box {
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-info-box .modal-close {
  position: sticky;
  top: 14px;
  float: right;
  margin: 14px 14px 0 0;
  z-index: 5;
}

.info-inner {
  padding: 0 0 32px;
}

.info-backdrop {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.info-backdrop-placeholder {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, #131728, #1c223a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.info-body {
  padding: 26px 28px 0;
}

.info-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 12px;
}

.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.info-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
}

.info-tag-rating {
  color: var(--gold);
  border-color: rgba(255, 184, 0, 0.35);
  background: rgba(255, 184, 0, 0.1);
}

.info-tag-genre {
  color: #fff;
}

.info-overview {
  font-size: 0.94rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 22px;
}

.info-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.info-detail-lbl {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.info-detail-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.info-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════
   FOOTER (Cinejoy Style)
══════════════════════════════════════ */
.footer {
  background: #090b13;
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer .logo {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.footer p {
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}

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

.footer-note {
  font-size: 0.74rem !important;
  max-width: 540px;
  line-height: 1.6;
  color: var(--muted);
}

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
#toast {
  position: fixed;
  bottom: 26px;
  right: 26px;
  background: #141829;
  border: 1px solid var(--accent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 229, 255, 0.25);
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

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

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .nav-search input { width: 200px; }
  .nav-search input:focus { width: 240px; }
}

@media (max-width: 768px) {
  .hero-content { max-width: 100%; }
  .hero { height: 60vh; min-height: 480px; }
  .grid-view { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .card { width: 145px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .search-dropdown { width: 300px; right: -20px; }
}

@media (max-width: 480px) {
  .nav-search input { width: 160px; font-size: 0.8rem; padding-left: 34px; }
  .nav-search input:focus { width: 190px; }
  .filter-bar { width: 100%; }
  .filter-bar select { flex: 1; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .tv-controls { flex-direction: column; align-items: flex-start; }
  .card { width: 135px; }
}
