/* ==========================================================================
   渡影 (DuCinema) - 渡赏专属云端片库设计规范
   风格：黑曜石深黑底色 × 纯金流晶光泽 × 现代影视沉浸风
   ========================================================================== */

:root {
  --bg-deep: #06070a;
  --bg-surface: #0c0e15;
  --bg-card: rgba(16, 20, 30, 0.72);
  --bg-card-hover: rgba(24, 30, 46, 0.9);
  
  --gold-primary: #D4AF37;
  --gold-glow: #F5D77F;
  --gold-deep: #9E7D23;
  --gold-gradient: linear-gradient(135deg, #FFE599 0%, #D4AF37 50%, #9E7D23 100%);
  --gold-border: rgba(212, 175, 55, 0.28);
  --gold-shadow: 0 8px 32px rgba(212, 175, 55, 0.18);
  
  --ruby-accent: #FF2A55;
  --ruby-gradient: linear-gradient(135deg, #FF4B72 0%, #D8113B 100%);

  --text-main: #F4F6FB;
  --text-muted: #8E98AC;
  --text-dim: #545E75;

  --glass-bg: rgba(14, 18, 26, 0.75);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --blur-base: blur(20px);

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

  --transition-smooth: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Ambient Background Lights */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.35), transparent 70%);
  top: -100px;
  right: -50px;
}
.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 42, 85, 0.2), transparent 70%);
  top: 30%;
  left: -150px;
}
.glow-3 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(30, 80, 180, 0.15), transparent 70%);
  bottom: 0;
  right: 10%;
}

/* ==========================================================================
   Header Section
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 10, 15, 0.82);
  backdrop-filter: var(--blur-base);
  -webkit-backdrop-filter: var(--blur-base);
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
  padding: 12px 24px;
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand Logo */
.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}

.brand-crest {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1b202e 0%, #0d1017 100%);
  border: 1.5px solid var(--gold-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(212, 175, 55, 0.2);
  transition: var(--transition-smooth);
}
.brand-group:hover .brand-crest {
  border-color: var(--gold-glow);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
  transform: rotate(-3deg) scale(1.05);
}

.sail-icon {
  width: 28px;
  height: 28px;
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.brand-sub {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.brand-caption {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-top: -2px;
}

/* Navigation Categories */
.nav-categories {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 22, 32, 0.6);
  padding: 4px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-item:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.06);
}
.nav-item.active {
  color: #0b0c10;
  background: var(--gold-gradient);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
  font-weight: 700;
}

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

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.api-btn {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-glow);
  border: 1px solid var(--gold-border);
}
.api-btn:hover {
  background: var(--gold-primary);
  color: #0a0b10;
  box-shadow: var(--gold-shadow);
  transform: translateY(-1px);
}

.source-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.source-btn:hover {
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Search Bar */
.search-bar-wrap {
  max-width: 900px;
  margin: 14px auto 2px;
}

.search-input-box {
  display: flex;
  align-items: center;
  background: rgba(14, 18, 27, 0.85);
  border: 1.5px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  transition: var(--transition-smooth);
}
.search-input-box:focus-within {
  border-color: var(--gold-glow);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.25), inset 0 0 10px rgba(212, 175, 55, 0.1);
}

.search-icon {
  font-size: 1.1rem;
  margin-right: 10px;
  opacity: 0.7;
}

.search-input-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: #FFF;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
}
.search-input-box input::placeholder {
  color: var(--text-dim);
}

.search-clear-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-size: 0.75rem;
}

.search-submit-btn {
  background: var(--gold-gradient);
  border: none;
  color: #0b0c10;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.search-submit-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.hot-search-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.8rem;
}
.tag-label {
  color: var(--text-dim);
}
.hot-tag {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.hot-tag:hover {
  color: var(--gold-glow);
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   Hero Spotlight Section
   ========================================================================== */
.main-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 24px 60px;
  position: relative;
  z-index: 1;
}

.hero-spotlight {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 40px;
  display: flex;
  align-items: flex-end;
  padding: 48px;
  border: 1px solid var(--gold-border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  background: #0d1017;
}

.spotlight-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  filter: brightness(0.65) saturate(1.2);
  transition: opacity 0.5s ease;
  z-index: 1;
}

.spotlight-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6, 7, 10, 0.95) 0%, rgba(6, 7, 10, 0.65) 50%, rgba(6, 7, 10, 0.25) 100%),
              radial-gradient(circle at 15% 90%, rgba(212, 175, 55, 0.18) 0%, transparent 60%);
  z-index: 2;
}

.spotlight-content {
  position: relative;
  z-index: 3;
  max-width: 760px;
}

.spotlight-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-glow);
  border: 1px solid var(--gold-border);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 12px;
}

.spotlight-title {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.spotlight-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.meta-tag {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.gold-tag {
  background: var(--gold-gradient);
  color: #0b0c10;
  font-weight: 700;
}

.spotlight-desc {
  font-size: 0.95rem;
  color: #C0C8D6;
  line-height: 1.6;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

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

.btn-dushang-glow {
  background: var(--gold-gradient);
  border: none;
  color: #0a0b10;
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.45);
  transition: var(--transition-smooth);
}
.btn-dushang-glow:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.6);
}

.btn-web-play {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--blur-base);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFF;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}
.btn-web-play:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* ==========================================================================
   Catalog & Media Grid
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.section-counter {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dim);
}

.filter-pill-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 22, 32, 0.6);
  padding: 3px;
  border-radius: 8px;
}
.filter-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.filter-pill.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold-glow);
}

/* Media Cards Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

.movie-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--transition-spring);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.movie-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--gold-border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(212, 175, 55, 0.2);
}

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

.card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.movie-card:hover .card-poster {
  transform: scale(1.06);
}

.card-badge-top {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(8, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  color: var(--gold-glow);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--gold-border);
}

.card-badge-bottom {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(8, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  color: #FFF;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
}

.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 15, 0.8);
  backdrop-filter: blur(4px);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  text-align: center;
  transition: opacity 0.3s ease;
}
.movie-card:hover .card-hover-overlay {
  opacity: 1;
}

.card-play-icon {
  width: 48px;
  height: 48px;
  background: var(--gold-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0c10;
  font-size: 1.4rem;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.5);
  margin-bottom: 12px;
  transform: scale(0.85);
  transition: var(--transition-spring);
}
.movie-card:hover .card-play-icon {
  transform: scale(1);
}

.card-overlay-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFF;
  letter-spacing: 0.05em;
}

.card-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.movie-card:hover .card-title {
  color: var(--gold-glow);
}

.card-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Skeleton Loading */
.skeleton-card {
  aspect-ratio: 2 / 3.4;
  background: linear-gradient(90deg, #10141e 25%, #181d2c 50%, #10141e 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}
.page-nav-btn {
  background: rgba(18, 22, 32, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.page-nav-btn:hover:not(:disabled) {
  border-color: var(--gold-border);
  color: var(--gold-glow);
  transform: translateY(-1px);
}
.page-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.page-indicator {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   Player & Detail Modal
   ========================================================================== */
.player-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.player-modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 9, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.modal-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1280px;
  max-height: 92vh;
  background: #0d1017;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gold-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), var(--gold-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.95) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 16px 24px;
  background: rgba(14, 18, 27, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-movie-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFF;
}
.modal-current-ep {
  font-size: 0.82rem;
  color: var(--gold-glow);
  margin-left: 10px;
  font-weight: 600;
}

.modal-back-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}
.modal-back-btn:hover {
  background: var(--gold-primary);
  color: #0b0c10;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}
.modal-close-btn:hover {
  background: var(--ruby-accent);
  color: #FFF;
  transform: rotate(90deg);
}

/* Modal Body Split Layout */
.modal-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  flex: 1;
  overflow: hidden;
  background: #090b10;
}

.player-stage {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.player-mode-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 22, 32, 0.7);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.mode-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
}
.mode-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.mode-tab:hover {
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.3);
}
.mode-tab.active {
  background: var(--gold-gradient);
  color: #0b0c10;
  border-color: var(--gold-glow);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

#html5-player {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

.player-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gold-glow);
  font-size: 0.95rem;
  font-weight: 600;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold-glow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Dual Engine Bar */
.dual-engine-bar {
  display: flex;
  gap: 12px;
}

.dushang-direct-btn {
  flex: 1;
  background: linear-gradient(135deg, #1e2433 0%, #121622 100%);
  border: 1.5px solid var(--gold-primary);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.dushang-direct-btn:hover {
  background: linear-gradient(135deg, #2b3347 0%, #181d2e 100%);
  border-color: var(--gold-glow);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.35);
  transform: translateY(-2px);
}

.btn-sail-badge {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.5));
}

.btn-text-content .main-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold-glow);
  letter-spacing: -0.01em;
}
.btn-text-content .sub-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.copy-stream-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.copy-stream-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold-glow);
}

/* Playlist & Details Stage */
.playlist-info-stage {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #0c0f16;
}

.episodes-panel {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.panel-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.headline-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFF;
}
.headline-count {
  font-size: 0.76rem;
  color: var(--gold-glow);
  background: rgba(212, 175, 55, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.ep-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 4px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.2);
}
.ep-btn.active {
  background: var(--gold-gradient);
  color: #08090d;
  font-weight: 800;
  border-color: var(--gold-glow);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

.synopsis-panel {
  padding: 20px;
  font-size: 0.82rem;
}
.meta-row {
  margin-bottom: 8px;
  display: flex;
}
.meta-key {
  color: var(--text-dim);
  min-width: 48px;
}
.meta-val {
  color: var(--text-muted);
  word-break: break-all;
}
.synopsis-text {
  color: #A0AABF;
  line-height: 1.6;
  max-height: 160px;
  overflow-y: auto;
  margin-top: 4px;
}

/* ==========================================================================
   DuShang API Modal
   ========================================================================== */
.api-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.api-modal.active {
  display: flex;
}

.api-modal-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 620px;
  background: #0f121a;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), var(--gold-shadow);
  padding: 30px;
  animation: modalPop 0.3s ease;
}

.api-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.api-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold-glow);
  background: rgba(212, 175, 55, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  display: inline-block;
}
.api-title-group h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFF;
}
.api-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.api-lead {
  font-size: 0.92rem;
  color: #C0C8D6;
  line-height: 1.6;
  margin-bottom: 20px;
}

.code-box {
  background: #07080d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 22px;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.copy-code-btn {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-border);
  color: var(--gold-glow);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.code-box code {
  color: var(--gold-glow);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  word-break: break-all;
  display: block;
}

.api-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-item {
  display: flex;
  gap: 12px;
}
.feat-icon {
  font-size: 1.2rem;
}
.feature-item strong {
  font-size: 0.9rem;
  color: #FFF;
  display: block;
  margin-bottom: 2px;
}
.feature-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Source Selector Cards */
.source-list-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.source-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.source-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}
.source-card.active {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-glow);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}
.src-icon {
  font-size: 1.6rem;
}
.src-info {
  flex: 1;
}
.src-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFF;
  display: flex;
  align-items: center;
  gap: 8px;
}
.src-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.src-badge-rec {
  background: var(--gold-gradient);
  color: #08090d;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}
.src-badge-new {
  background: rgba(33, 150, 243, 0.2);
  color: #64B5F6;
  border: 1px solid rgba(33, 150, 243, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.src-badge-fast, .src-badge-all {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
}
.src-radio {
  font-size: 1.2rem;
  color: var(--gold-glow);
  font-weight: 900;
  min-width: 24px;
  text-align: right;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: rgba(14, 18, 27, 0.95);
  backdrop-filter: blur(16px);
  border: 1.5px solid var(--gold-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 16px rgba(212, 175, 55, 0.25);
  color: #FFF;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Responsive Adaptations (Mobile & iPhone Flagship UI)
   ========================================================================== */

/* Safe Areas for iOS Notches & Home Indicators */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* Tablet & Intermediate Screens */
@media (max-width: 1024px) {
  .hero-spotlight {
    padding: 32px;
    min-height: 340px;
  }
  .spotlight-title {
    font-size: 2.2rem;
  }
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  .modal-body {
    grid-template-columns: 1fr 320px;
  }
}

/* Mobile & iPhone Screens (<= 768px) */
@media (max-width: 768px) {
  /* Ambient glow reduction for mobile GPU performance */
  .ambient-glow {
    opacity: 0.2;
    filter: blur(80px);
  }
  .glow-1 { width: 260px; height: 260px; }
  .glow-2 { width: 280px; height: 280px; }
  .glow-3 { display: none; }

  /* Sleek Compact Header */
  .app-header {
    padding: 8px 12px 10px;
    padding-top: max(8px, env(safe-area-inset-top));
  }
  .header-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  /* Brand Logo: Compact */
  .brand-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .brand-crest {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .sail-icon {
    width: 20px;
    height: 20px;
  }
  .brand-title {
    font-size: 1.15rem;
    gap: 4px;
  }
  .brand-sub {
    font-size: 0.65rem;
  }
  .brand-caption {
    display: none; /* Hide subtitle on mobile to preserve height */
  }

  /* Header Action Pills */
  .header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .action-btn {
    padding: 6px 10px;
    font-size: 0.74rem;
    border-radius: 99px;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .action-btn .btn-text {
    font-size: 0.74rem;
    white-space: nowrap;
  }

  /* Category Navigation: Horizontal Swipeable Ribbon */
  .nav-categories {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    margin-top: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    padding: 3px;
    gap: 4px;
    border-radius: 99px;
  }
  .nav-categories::-webkit-scrollbar {
    display: none;
  }
  .nav-item {
    padding: 5px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Search Section */
  .search-bar-wrap {
    margin: 8px 0 0;
    width: 100%;
  }
  .search-input-box {
    padding: 3px 4px 3px 12px;
    border-radius: 10px;
  }
  .search-input-box input {
    font-size: 16px; /* 16px prevents iOS Safari from automatically zooming into the page */
    padding: 5px 0;
  }
  .search-icon {
    font-size: 0.95rem;
    margin-right: 6px;
  }
  .search-submit-btn {
    padding: 7px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
    white-space: nowrap;
  }

  /* Hot Search Tags: Single-line smooth scroll */
  .hot-search-tags {
    margin-top: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    gap: 6px;
    padding-bottom: 2px;
    width: 100%;
  }
  .hot-search-tags::-webkit-scrollbar {
    display: none;
  }
  .tag-label {
    white-space: nowrap;
    font-size: 0.72rem;
    flex-shrink: 0;
  }
  .hot-tag {
    white-space: nowrap;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
  }

  /* Main Container & Hero Spotlight */
  .main-layout {
    padding: 10px 10px 40px;
  }
  .hero-spotlight {
    min-height: 200px;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    align-items: flex-end;
  }
  .spotlight-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    margin-bottom: 4px;
  }
  .spotlight-title {
    font-size: 1.3rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .spotlight-meta {
    gap: 6px;
    margin-bottom: 8px;
  }
  .meta-tag {
    padding: 2px 6px;
    font-size: 0.68rem;
    border-radius: 4px;
  }
  .spotlight-desc {
    display: none; /* Keep hero clean and compact on phone */
  }
  .spotlight-actions {
    gap: 8px;
  }
  .btn-dushang-glow, .btn-web-play {
    padding: 8px 14px;
    font-size: 0.78rem;
    border-radius: 8px;
    gap: 6px;
  }

  /* Catalog Section Header */
  .section-header {
    margin-bottom: 10px;
    gap: 6px;
    flex-direction: column;
    align-items: flex-start;
  }
  .section-title-wrap {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
  }
  .section-title {
    font-size: 1.15rem;
  }
  .section-counter {
    font-size: 0.72rem;
  }
  .filter-pill-group {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding: 2px;
    border-radius: 6px;
  }
  .filter-pill {
    padding: 4px 8px;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 3-Column Native App Poster Grid */
  .media-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
  }
  .movie-card {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }
  .movie-card:active {
    transform: scale(0.96);
    opacity: 0.9;
  }
  .card-hover-overlay {
    display: none !important; /* Disable hover overlay on touch */
  }
  .card-poster-wrap {
    aspect-ratio: 2 / 3;
    border-radius: 8px 8px 0 0;
  }
  .card-badge-top {
    top: 4px;
    right: 4px;
    font-size: 0.58rem;
    padding: 1px 4px;
    border-radius: 3px;
  }
  .card-badge-bottom {
    bottom: 4px;
    left: 4px;
    font-size: 0.58rem;
    padding: 1px 4px;
    border-radius: 3px;
  }
  .card-info {
    padding: 5px 4px 6px;
  }
  .card-title {
    font-size: 0.76rem;
    line-height: 1.25;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .card-sub {
    font-size: 0.65rem;
    color: var(--text-dim);
  }

  /* Pagination Bar */
  .pagination-bar {
    gap: 10px;
    margin-top: 14px;
  }
  .page-nav-btn {
    padding: 7px 16px;
    font-size: 0.8rem;
  }
  .page-indicator {
    font-size: 0.8rem;
  }

  /* ========================================================================
     Player Modal (Mobile Fullscreen Cinema Architecture)
     ======================================================================== */
  .player-modal {
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .modal-backdrop {
    display: none;
  }
  .modal-container {
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
    background: #06070a;
  }
  .modal-header {
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top));
    background: #0c0e15;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .modal-back-btn {
    display: flex !important;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #FFF;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    flex-shrink: 0;
  }
  .modal-title-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }
  .modal-movie-title {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .modal-current-ep {
    font-size: 0.7rem;
    color: var(--gold-glow);
    display: block;
    margin-top: 1px;
    margin-left: 0;
  }
  .modal-close-btn {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  /* Modal Content Body */
  .modal-body {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    flex: 1;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    background: #06070a;
  }
  .player-stage {
    padding: 0;
    gap: 8px;
    flex-shrink: 0;
    background: #000;
    overflow: visible;
  }
  .video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
  }
  .player-mode-bar {
    margin: 8px 10px 0;
    padding: 5px 8px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .mode-label {
    font-size: 0.72rem;
  }
  .mode-tab {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 6px;
  }

  .dual-engine-bar {
    margin: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .dushang-direct-btn {
    padding: 9px 12px;
    gap: 10px;
    border-radius: 8px;
  }
  .btn-sail-badge {
    font-size: 1.25rem;
  }
  .btn-text-content .main-label {
    font-size: 0.8rem;
  }
  .btn-text-content .sub-label {
    font-size: 0.65rem;
  }
  .copy-stream-btn {
    padding: 8px;
    border-radius: 8px;
    font-size: 0.76rem;
    text-align: center;
    justify-content: center;
    display: flex;
  }

  /* Episodes & Details Stage */
  .playlist-info-stage {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #080a10;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    flex: 1;
  }
  .episodes-panel {
    padding: 10px 10px;
  }
  .panel-headline {
    margin-bottom: 8px;
  }
  .headline-title {
    font-size: 0.84rem;
  }
  .headline-count {
    font-size: 0.7rem;
  }

  /* 5-Column Episode Touch Grid */
  .episodes-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 6px;
    max-height: none !important;
    overflow-y: visible !important;
  }
  .ep-btn {
    min-height: 38px;
    padding: 8px 2px;
    font-size: 0.78rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
  }

  .synopsis-panel {
    padding: 10px 12px;
    font-size: 0.74rem;
  }
  .meta-row {
    margin-bottom: 4px;
  }
  .synopsis-text {
    max-height: none;
    font-size: 0.74rem;
  }

  /* ========================================================================
     API & Source Modals (Mobile Bottom-Sheet Pattern)
     ======================================================================== */
  .api-modal {
    padding: 0;
    align-items: flex-end;
  }
  .api-modal-card {
    border-radius: 18px 18px 0 0;
    max-width: 100vw;
    width: 100vw;
    max-height: 85dvh;
    overflow-y: auto;
    padding: 20px 14px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    margin: 0;
  }
  .api-title-group h3 {
    font-size: 1.15rem;
  }
  .source-card {
    padding: 10px 12px;
  }
  .src-icon {
    font-size: 1.3rem;
  }
  .src-title {
    font-size: 0.85rem;
  }
  .src-desc {
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   📡 电视直播 (LIVE TV) 专属轻奢暗金视界组件
   ========================================================================== */

/* 导航栏闪烁直播标识 */
.nav-live-item {
  position: relative;
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #ff6b6b !important;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.nav-live-item:hover,
.nav-live-item.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(212, 175, 55, 0.2)) !important;
  border-color: #ef4444 !important;
  color: #FFF !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
}

.live-dot-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
  animation: liveDotBlink 1.4s ease-in-out infinite;
}

@keyframes liveDotBlink {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.8;
    box-shadow: 0 0 4px #ef4444;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 12px #ef4444, 0 0 20px rgba(239, 68, 68, 0.6);
  }
}

/* 电视直播专区容器 */
.live-tv-section {
  max-width: 1440px;
  margin: 0 auto 50px auto;
  padding: 0 24px;
}

.live-tv-header {
  background: linear-gradient(135deg, rgba(16, 20, 29, 0.95), rgba(22, 17, 24, 0.95));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.live-tv-header::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.12), transparent 70%);
  pointer-events: none;
}

.live-badge-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ff8e8e;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  width: fit-content;
}

.live-tv-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #FFF;
  letter-spacing: -0.5px;
  margin: 0;
  background: linear-gradient(135deg, #FFF 30%, #ffd977 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.live-tv-sub {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.live-tv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.live-cat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.live-cat-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(212, 175, 55, 0.4);
  color: #FFF;
  transform: translateY(-1px);
}
.live-cat-pill.active {
  background: linear-gradient(135deg, var(--gold-start), var(--gold-end));
  border-color: var(--gold-start);
  color: #08090d;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
}

/* 频道列表网格 */
.live-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

/* 频道卡片 */
.channel-card {
  background: rgba(16, 20, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  backdrop-filter: blur(12px);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.channel-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(212, 175, 55, 0.15);
  background: rgba(22, 27, 38, 0.95);
}

.channel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.channel-logo-wrap {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: #080b11;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  flex-shrink: 0;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}
.channel-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.channel-logo-fallback {
  font-size: 1.5rem;
}

.channel-meta-wrap {
  flex: 1;
  min-width: 0;
}
.channel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFF;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel-tags-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.channel-badge-res {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #ffd977;
  padding: 1px 6px;
  border-radius: 4px;
}
.channel-badge-cat {
  font-size: 0.68rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
}

.channel-epg-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #cbd5e1;
}
.epg-icon {
  color: #eab308;
  font-size: 0.85rem;
}
.epg-content {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

.btn-tv-web,
.btn-tv-dushang {
  border: none;
  outline: none;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-tv-web {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFF;
}
.btn-tv-web:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-tv-dushang {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(184, 134, 11, 0.35));
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #ffe699;
}
.btn-tv-dushang:hover {
  background: linear-gradient(135deg, var(--gold-start), var(--gold-end));
  color: #08090d;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

/* 播放弹窗中的电视频道快速切换列表 */
.tv-quick-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.tv-quick-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tv-quick-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateX(2px);
}
.tv-quick-item.active {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.06));
  border-color: var(--gold-start);
  box-shadow: inset 3px 0 0 var(--gold-start);
}
.tv-quick-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #FFF;
}
.tv-quick-item.active .tv-quick-name {
  color: #ffd977;
}

@media (max-width: 768px) {
  .live-tv-section {
    padding: 0 12px;
    margin-bottom: 30px;
  }
  .live-tv-header {
    padding: 18px 16px;
    border-radius: 16px;
    gap: 14px;
  }
  .live-tv-title {
    font-size: 1.35rem;
  }
  .live-tv-sub {
    font-size: 0.8rem;
  }
  .live-channel-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .channel-card {
    padding: 14px;
  }
  .channel-logo-wrap {
    width: 48px;
    height: 48px;
  }
}

