/* 
 * 星芒短剧 & 影视平台 (SparkStream / SparkDrama) - 前台现代深色流媒体风格设计系统
 * 100% 原生纯 CSS 打造，极度丝滑、支持短剧竖屏滑屏 + 影视横屏长视频专业播放
 */

:root {
  --bg-primary: #0b0d14;
  --bg-secondary: #131622;
  --bg-card: rgba(24, 28, 44, 0.7);
  --bg-card-hover: rgba(35, 41, 64, 0.85);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-pink: #ff2c74;
  --accent-purple: #8b5cf6;
  --accent-blue: #38bdf8;
  --accent-gold: #fbbf24;
  --gradient-brand: linear-gradient(135deg, #ff2c74 0%, #8b5cf6 100%);
  --gradient-movie: linear-gradient(135deg, #38bdf8 0%, #8b5cf6 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --border-glass: rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --max-width-mobile: 480px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #05060a;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow-x: hidden;
}

#app-container {
  width: 100%;
  max-width: var(--max-width-mobile);
  min-height: 100vh;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

/* 顶部通用导航栏 */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-brand);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(255, 44, 116, 0.4);
}

.brand-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #fff 40%, #ff8ab3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-user-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coins-badge {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s;
}

.coins-badge:active {
  transform: scale(0.95);
}

.vip-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.vip-badge.is-vip {
  background: var(--gradient-gold);
  color: #000;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

/* 页面主体视口 */
.app-view {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 75px;
  -webkit-overflow-scrolling: touch;
}

/* 首页 Banner 轮播推荐卡片 */
.hero-banner-container {
  padding: 14px 16px;
}

.hero-card {
  position: relative;
  height: 230px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.hero-badge-tag {
  align-self: flex-start;
  background: var(--gradient-brand);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(255, 44, 116, 0.5);
}

.hero-title {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.25;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.hero-desc {
  font-size: 12px;
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  line-height: 1.4;
}

.hero-meta-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.hero-chip {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.btn-play-hero {
  flex: 1;
  background: var(--gradient-brand);
  border: none;
  color: white;
  border-radius: 10px;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(255, 44, 116, 0.4);
}

.btn-play-hero:active {
  transform: scale(0.97);
}

.btn-detail-hero {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* 历史续播气泡栏 */
.history-section {
  padding: 0 16px 12px;
}

.history-scroll-wrap {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.history-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.history-item-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  padding: 6px 12px 6px 6px;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.2s;
}

.history-item-pill img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.hist-info {
  line-height: 1.2;
}

.hist-title {
  font-size: 12px;
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hist-ep {
  font-size: 10px;
  color: var(--accent-pink);
}

/* 分类 Tab 与 搜索栏 */
.section-filter-bar {
  padding: 4px 16px 12px;
}

.search-input-wrap {
  position: relative;
  margin-bottom: 12px;
}

.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  color: white;
  padding: 10px 14px 10px 38px;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--accent-pink);
}

.search-icon-svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  fill: var(--text-dim);
}

.cat-tabs-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-tabs-row::-webkit-scrollbar {
  display: none;
}

.cat-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.cat-tab-btn.active {
  background: var(--bg-card-hover);
  color: white;
  border-color: rgba(255, 44, 116, 0.4);
}

/* 短剧瀑布流网格 */
.dramas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px;
}

.drama-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.drama-card:active {
  transform: scale(0.98);
}

.drama-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 13;
  overflow: hidden;
  background: #181b2a;
}

.drama-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.drama-card:hover .drama-cover-img {
  transform: scale(1.05);
}

.card-tag-pill {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: #fbbf24;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.card-ep-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.card-play-hover-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 44px;
  height: 44px;
  background: rgba(255, 44, 116, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.25s ease;
}

.drama-card:hover .card-play-hover-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.drama-info-wrap {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drama-card-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drama-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

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

.drama-card-free {
  color: #10b981;
  font-weight: 600;
}

/* ========================================================
   沉浸式全屏短剧播放器 (仿抖音体验)
   ======================================================== */
#view-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 100;
  padding-bottom: 0;
  overflow: hidden;
}

.player-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.video-slide {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 默认适屏，完整显示，避免文字与剧情跑出手机外 */
  background: #000;
}

.video-wrapper video.fit-contain {
  object-fit: contain !important;
}

.video-wrapper video.fit-cover {
  object-fit: cover !important;
}

/* 沉浸纯享看剧模式核心动画与过渡 (支持打开时无任何多余UI，仅播放剧情) */
.video-slide.immersive-mode .slide-header {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-24px) !important;
}

.video-slide.immersive-mode .slide-sidebar {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(24px) !important;
}

.video-slide.immersive-mode .slide-footer {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(24px) !important;
}

/* 沉浸模式温和入场提示浮条 */
.immersive-hint-badge {
  position: absolute;
  top: calc(env(safe-area-inset-top, 24px) + 18px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  animation: hintAutoFade 2.6s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes hintAutoFade {
  0% { opacity: 0; transform: translate(-50%, -10px); }
  12% { opacity: 1; transform: translate(-50%, 0); }
  75% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

.video-click-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

.play-state-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 6;
}

.slide-header {
  position: relative;
  z-index: 15;
  padding-top: calc(env(safe-area-inset-top, 24px) + 12px);
  padding-left: calc(env(safe-area-inset-left, 0px) + 12px);
  padding-right: calc(env(safe-area-inset-right, 0px) + 12px);
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-home-btn {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.drama-headline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  margin: 0 10px;
  overflow: hidden;
}

.drama-tag-badge {
  background: var(--gradient-brand);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.drama-title-text {
  font-size: 14px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.player-pill-btn {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-pill-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.2);
}

.player-pill-btn.imm-btn {
  background: rgba(139, 92, 246, 0.35);
  border-color: rgba(139, 92, 246, 0.6);
  color: #ddd6fe;
}

.slide-sidebar {
  position: absolute;
  right: calc(env(safe-area-inset-right, 0px) + 10px);
  bottom: calc(env(safe-area-inset-bottom, 24px) + 65px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid white;
  object-fit: cover;
}

.avatar-plus-icon {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-pink);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.icon-wrap {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.15s, background 0.15s;
}

.action-btn:active .icon-wrap {
  transform: scale(0.88);
}

.like-icon.liked {
  color: var(--accent-pink);
  background: rgba(255, 44, 116, 0.2);
  border-color: var(--accent-pink);
}

.vip-gold-btn {
  background: rgba(251, 191, 36, 0.25);
  border-color: rgba(251, 191, 36, 0.5);
  animation: pulseGold 2s infinite ease-in-out;
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 rgba(251, 191, 36, 0); }
  50% { box-shadow: 0 0 16px rgba(251, 191, 36, 0.5); }
}

.action-label {
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.slide-footer {
  position: relative;
  z-index: 14;
  padding-top: 20px;
  padding-left: calc(env(safe-area-inset-left, 0px) + 16px);
  padding-right: calc(env(safe-area-inset-right, 0px) + 72px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-ep-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.current-ep-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.status-free-pill {
  color: #10b981;
  font-size: 11px;
  font-weight: 600;
}

.status-lock-pill {
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 600;
}

.footer-ep-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.footer-drama-desc {
  font-size: 12px;
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.progress-bar-bg {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
  overflow: visible;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 2px;
  position: relative;
}

.time-tip {
  font-size: 10px;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

/* 锁定付费拦截蒙层 */
.lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 13, 20, 0.92);
  backdrop-filter: blur(20px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lock-card {
  width: 100%;
  background: rgba(25, 30, 48, 0.8);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
}

.lock-icon-circle {
  width: 68px;
  height: 68px;
  background: rgba(251, 191, 36, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.lock-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 6px;
  color: white;
}

.lock-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.lock-user-status {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  margin-bottom: 18px;
}

.gold-text {
  color: var(--accent-gold);
}

.user-vip-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.lock-actions-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-unlock-ep {
  width: 100%;
  background: var(--gradient-brand);
  border: none;
  color: white;
  padding: 12px 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 44, 116, 0.4);
}

.btn-open-vip-wall {
  width: 100%;
  background: var(--gradient-gold);
  border: none;
  color: #000;
  padding: 12px 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.floating-heart {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transition: transform 0.85s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.85s ease;
  filter: drop-shadow(0 4px 12px rgba(255, 44, 116, 0.7));
}

.slide-up-in {
  animation: slideUpIn 0.35s ease forwards;
}

.slide-down-in {
  animation: slideDownIn 0.35s ease forwards;
}

@keyframes slideUpIn {
  from { transform: translateY(40px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDownIn {
  from { transform: translateY(-40px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

/* ========================================================
   选集抽屉 (Episodes Drawer)
   ======================================================== */
.episodes-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 70%;
  background: rgba(19, 22, 34, 0.98);
  backdrop-filter: blur(25px);
  border-top: 1px solid var(--border-glass);
  border-radius: 20px 20px 0 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
}

.episodes-drawer.open {
  transform: translateY(0);
}

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

.drawer-title {
  font-size: 16px;
  font-weight: 700;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-episodes-list {
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-ep-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 12px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-ep-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.drawer-ep-item.active {
  background: rgba(255, 44, 116, 0.15);
  border-color: var(--accent-pink);
}

.drawer-ep-item.active .ep-num {
  color: var(--accent-pink);
  font-weight: 800;
}

.ep-num {
  font-size: 13px;
  font-weight: 600;
  min-width: 65px;
}

.ep-desc {
  flex: 1;
  font-size: 13px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 10px;
}

.status-icon-free {
  font-size: 11px;
  color: #10b981;
  font-weight: 600;
}

.status-icon-lock {
  font-size: 13px;
}

/* ========================================================
   🎬 影视板块专属样式 (长视频大厅与宽屏播放器)
   ======================================================== */
.movie-hero-banner {
  padding: 14px 16px;
}

.movie-filter-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: none;
}
.movie-filter-pills-row::-webkit-scrollbar {
  display: none;
}

.movie-filter-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.movie-filter-pill.active {
  background: var(--gradient-movie);
  color: #000;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.4);
}

/* 影视卡片海报网格 (3列紧凑布局或2列大图) */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px 20px;
}

.movie-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.movie-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.movie-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #181b2a;
  overflow: hidden;
}

.movie-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-score-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(245, 158, 11, 0.9);
  color: #000;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
}

.movie-vip-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--gradient-gold);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.movie-quality-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #38bdf8;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.movie-info-wrap {
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.movie-title-text {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-sub-info {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================================
   🎬 影视独立横屏播放器页 (Movie Detail & Player View)
   ======================================================== */
#view-movie-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: 120;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.movie-player-screen {
  position: sticky;
  top: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  z-index: 20;
  overflow: hidden;
}

.movie-player-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.movie-back-btn {
  position: absolute;
  top: calc(10px + var(--safe-top));
  left: 12px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 35;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.movie-back-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.3);
}

/* 影视播放器右下角专属全屏沉浸按钮 */
.movie-fullscreen-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 35;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.movie-fullscreen-btn:active {
  transform: scale(0.92);
  background: rgba(255, 44, 116, 0.7);
}

/* 隐藏浏览器在左上角或控件条中冲突的自带按钮，避免与左上角返回键重叠 */
video::-webkit-media-controls-fullscreen-button {
  display: none !important;
}
video::-webkit-media-controls-picture-in-picture-button {
  display: none !important;
}

.movie-player-details {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.movie-header-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.movie-detail-title {
  font-size: 19px;
  font-weight: 800;
}

.movie-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
}

.chip-score {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
}

.chip-meta {
  color: var(--text-muted);
}

/* 播放线路切换 Tabs */
.sources-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  padding: 6px 10px;
  border-radius: 12px;
}

.source-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}

.source-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.source-pill-btn.active {
  background: var(--gradient-movie);
  color: #000;
  font-weight: 700;
  border-color: transparent;
}

/* 电视剧/分集选集网格 (Grid 1~30) */
.episodes-grid-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.episodes-grid-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
}

.episodes-buttons-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.ep-grid-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  color: white;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  position: relative;
}

.ep-grid-btn:hover {
  background: var(--bg-card-hover);
}

.ep-grid-btn.active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: white;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(255, 44, 116, 0.4);
}

.ep-grid-btn.locked::after {
  content: '🔒';
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 8px;
}

/* 简介与演员卡片 */
.movie-synopsis-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.synopsis-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.synopsis-text {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.5;
}

.cast-text {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* 影视横屏播放拦截锁定遮罩 */
.movie-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 13, 20, 0.95);
  backdrop-filter: blur(14px);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

/* ========================================================
   充值中心与卡密兑换模态框 (Recharge & Card Modal)
   ======================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.recharge-modal-body {
  width: 100%;
  max-width: var(--max-width-mobile);
  background: var(--bg-secondary);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border-glass);
  padding: 20px 20px 30px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
  max-height: 85vh;
  overflow-y: auto;
}

.modal-backdrop.open .recharge-modal-body {
  transform: translateY(0);
}

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

.modal-title-text {
  font-size: 18px;
  font-weight: 800;
}

.modal-close-icon {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}

.recharge-user-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 13px;
}

.recharge-tabs-nav {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 18px;
}

.recharge-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.recharge-tab-btn.active {
  background: var(--gradient-brand);
  color: white;
  box-shadow: 0 2px 10px rgba(255, 44, 116, 0.4);
}

.package-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.pack-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.pack-card:hover, .pack-card.selected {
  border-color: var(--accent-pink);
  background: rgba(255, 44, 116, 0.12);
}

.pack-badge-hot {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent-pink);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 0 0 0 8px;
}

.pack-amount {
  font-size: 17px;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
}

.pack-price {
  font-size: 13px;
  color: var(--accent-gold);
  font-weight: 700;
  margin-bottom: 4px;
}

.pack-bonus {
  font-size: 10px;
  color: #10b981;
}

.card-redeem-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-input-row {
  display: flex;
  gap: 8px;
}

.card-code-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  color: white;
  padding: 12px 14px;
  border-radius: 10px;
  font-family: monospace;
  font-size: 14px;
  text-transform: uppercase;
  outline: none;
}

.card-code-input:focus {
  border-color: var(--accent-gold);
}

.btn-redeem-card {
  background: var(--gradient-gold);
  color: #000;
  border: none;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.test-cards-quick-tip {
  background: rgba(251, 191, 36, 0.08);
  border: 1px dashed rgba(251, 191, 36, 0.3);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: #fde68a;
}

.test-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.test-chip {
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

/* ========================================================
   排行榜与个人中心
   ======================================================== */
.ranking-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s;
}

.ranking-item:hover {
  transform: translateX(4px);
  background: var(--bg-card-hover);
}

.rank-index {
  font-size: 18px;
  font-weight: 800;
  width: 24px;
  text-align: center;
  color: var(--text-dim);
}

.rank-index.top-three {
  color: var(--accent-pink);
  font-size: 21px;
}

.rank-thumb {
  width: 55px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
}

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

.rank-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-tag-row {
  display: flex;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 4px;
}

.rank-tag {
  color: var(--accent-gold);
}

.rank-heat {
  color: var(--text-dim);
}

.rank-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-btn-play {
  background: var(--gradient-brand);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* 个人中心 Profile */
.profile-card-header {
  background: linear-gradient(135deg, rgba(255, 44, 116, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border-bottom: 1px solid var(--border-glass);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid white;
  object-fit: cover;
}

.profile-details h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.profile-assets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

.asset-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.asset-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.asset-label {
  font-size: 12px;
  color: var(--text-muted);
}

.profile-section-title {
  padding: 16px 16px 8px;
  font-size: 15px;
  font-weight: 700;
}

.orders-list-wrap {
  padding: 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-row {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  padding: 10px 14px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.order-amount {
  font-weight: 700;
  color: var(--accent-gold);
}

.order-time {
  font-size: 11px;
  color: var(--text-dim);
}

.empty-tip {
  text-align: center;
  color: var(--text-dim);
  padding: 20px;
  font-size: 13px;
}

/* ========================================================
   底部全局主导航栏 (Bottom Nav: 剧场 / 影视 / 滑屏 / 榜单 / 我的)
   ======================================================== */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width-mobile);
  height: 62px;
  background: rgba(11, 13, 20, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid var(--border-glass);
  display: flex !important;
  justify-content: space-around;
  align-items: center;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
  padding-bottom: var(--safe-bottom);
  box-sizing: border-box;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  padding: 6px 8px;
}

.bottom-nav-item svg {
  fill: currentColor;
  transition: transform 0.2s;
}

.bottom-nav-item span {
  font-size: 10.5px;
  font-weight: 600;
}

.bottom-nav-item.active {
  color: var(--accent-pink);
}

.bottom-nav-item.active svg {
  transform: translateY(-2px);
}

.bottom-nav-item.highlight-play {
  color: #fff;
}

.bottom-nav-item.highlight-play .play-center-circle {
  width: 36px;
  height: 36px;
  background: var(--gradient-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 44, 116, 0.5);
  margin-top: -12px;
}

/* 全局 Toast */
.spark-toast {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(20, 24, 38, 0.95);
  border: 1px solid var(--border-glass);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  z-index: 99999;
}

.spark-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================= 📱 PWA 原生桌面体验与手机操作体验增强 ================= */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* 顶部状态栏安全区保护 */
.app-header {
  padding-top: calc(12px + var(--safe-top));
}

/* 底部功能条在全屏手势横条 (Home Indicator) 之上 */
.bottom-nav-bar {
  padding-bottom: calc(10px + var(--safe-bottom));
}

/* 竖屏全屏播放器沉浸模式安全适配 */
.player-slide-item .slide-header {
  padding-top: calc(14px + var(--safe-top));
}

/* 手机端触控按压反馈 */
button, .bottom-nav-item, .drama-card, .movie-card, .btn-play-hero {
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

button:active, .bottom-nav-item:active, .cat-tab-btn:active, .movie-filter-pill:active {
  transform: scale(0.96);
  opacity: 0.9;
  transition: transform 0.08s ease;
}

/* PWA 桌面添加到主屏幕便捷提示条 */
.pwa-install-bar {
  position: relative;
  z-index: 99;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: pwaSlideDown 0.3s ease;
}

@keyframes pwaSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pwa-app-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.15);
}

.pwa-text-col {
  display: flex;
  flex-direction: column;
}

.pwa-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.pwa-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-pwa-action {
  background: linear-gradient(135deg, #ff2c74 0%, #8b5cf6 100%);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(255, 44, 116, 0.4);
}

.btn-pwa-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
}

/* iOS 手势引导弹窗 Sheet */
.ios-install-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ios-install-sheet {
  width: 100%;
  max-width: var(--max-width-mobile);
  background: #131622;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 16px 20px calc(24px + var(--safe-bottom));
  border-top: 1px solid var(--border-glass);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
  animation: sheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.ios-sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 0 auto 14px;
}

.ios-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin: 18px 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 14px;
}

.ios-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ios-step-num {
  width: 22px;
  height: 22px;
  background: var(--gradient-brand);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.ios-step-text {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.4;
}

/* PWA 独立全屏模式特殊适配 */
.pwa-standalone #pwa-install-banner {
  display: none !important;
}

.pwa-standalone .app-header {
  padding-top: calc(16px + var(--safe-top));
}

/* ========================================================
   会员系统 (手机号免验证码极速注册与登录 & 个人中心会员体系)
   ======================================================== */
.header-auth-pill {
  background: linear-gradient(135deg, rgba(255, 44, 116, 0.25) 0%, rgba(124, 58, 237, 0.3) 100%);
  border: 1px solid rgba(255, 44, 116, 0.6);
  color: #ff3370;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(255, 44, 116, 0.25);
}

.header-auth-pill:active {
  transform: scale(0.96);
  background: linear-gradient(135deg, rgba(255, 44, 116, 0.4) 0%, rgba(124, 58, 237, 0.45) 100%);
}

/* 会员登录/注册模态框 */
#auth-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#auth-modal.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.auth-modal-card {
  position: relative;
  background: linear-gradient(180deg, #1b1e2e 0%, #10131f 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  width: 100%;
  max-width: 380px;
  padding: 26px 20px 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  animation: zoomAuthIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  z-index: 100000;
}

.auth-modal-card .modal-close-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.auth-modal-card .modal-close-icon:hover {
  background: rgba(255, 255, 255, 0.25);
}

@keyframes zoomAuthIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-card-brand {
  text-align: center;
  margin-bottom: 18px;
}

.auth-brand-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ff2c74 0%, #7c3aed 100%);
  border-radius: 14px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(255, 44, 116, 0.45);
}

.auth-brand-title {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.auth-brand-subtitle {
  font-size: 12px;
  color: #94a3b8;
}

/* 顶部选项卡 */
.auth-tabs-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 18px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 9px 0;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.auth-badge-free {
  background: linear-gradient(135deg, #ff4d4f 0%, #ff7a45 100%);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 99px;
  line-height: 1.3;
}

/* 表单与输入框 */
.auth-field-group {
  margin-bottom: 14px;
  text-align: left;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.auth-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0 12px;
  transition: border-color 0.2s;
}

.auth-input-wrapper:focus-within {
  border-color: #ff2c74;
  box-shadow: 0 0 0 2px rgba(255, 44, 116, 0.2);
}

.auth-input-icon {
  font-size: 15px;
  margin-right: 8px;
  opacity: 0.8;
}

.auth-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  padding: 12px 0;
  min-width: 0;
}

.auth-input::placeholder {
  color: #64748b;
  font-size: 13px;
}

.auth-toggle-pwd {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 15px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.auth-toggle-pwd:hover {
  opacity: 1;
}

/* 福利提示条 */
.auth-perk-tip {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
  font-size: 11.5px;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 16px;
  text-align: left;
}

/* 提交按钮 */
.auth-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #ff2c74 0%, #7c3aed 100%);
  border: none;
  color: white;
  padding: 13px 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 18px rgba(255, 44, 116, 0.4);
  transition: all 0.2s;
}

.auth-submit-btn:hover {
  filter: brightness(1.08);
}

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

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-switch-link {
  margin-top: 14px;
  font-size: 12.5px;
  color: #94a3b8;
  text-align: center;
}

.auth-switch-link a {
  color: #ff3370;
  text-decoration: none;
  font-weight: 600;
}

/* 个人中心增强样式 */
.profile-card-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.profile-avatar-wrap {
  position: relative;
  width: 62px;
  height: 62px;
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.profile-vip-crown {
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 17px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.profile-details {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-name-row h3 {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-edit-name-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  font-size: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.profile-edit-name-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.profile-phone-text {
  font-size: 13px;
  color: #94a3b8;
  margin: 3px 0;
}

.profile-uid-text {
  font-size: 11px;
  color: #64748b;
  font-family: monospace;
  margin-bottom: 4px;
}

.btn-profile-login {
  background: var(--gradient-brand);
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(255, 44, 116, 0.35);
}

/* VIP 黑金尊享横幅 */
.vip-gold-banner-card {
  background: linear-gradient(135deg, #2b220e 0%, #1d1911 100%);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}

.vip-gold-banner-card:active {
  transform: scale(0.98);
}

.vip-banner-content {
  text-align: left;
}

.vip-banner-title {
  font-size: 14px;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 2px;
}

.vip-banner-desc {
  font-size: 11.5px;
  color: #d1b88a;
  line-height: 1.4;
}

.vip-banner-action-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border: none;
  color: #1a1306;
  font-size: 12.5px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 99px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 10px;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.4);
}

/* 退出登录 */
.profile-logout-wrap {
  margin-top: 24px;
  margin-bottom: 30px;
}

.btn-logout-action {
  width: 100%;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 12px 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout-action:active {
  background: rgba(239, 68, 68, 0.25);
}

/* 剧集锁定遮罩中的快速注册/登录按钮 */
.btn-quick-login-ep {
  width: 100%;
  background: linear-gradient(135deg, rgba(255, 44, 116, 0.2) 0%, rgba(124, 58, 237, 0.25) 100%);
  border: 1px solid rgba(255, 44, 116, 0.5);
  color: #ff5480;
  padding: 11px 0;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-quick-login-ep:active {
  transform: scale(0.98);
}

/* ========================================================
   个人中心 - 专属观看历史记录与自动续播
   ======================================================== */
.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.profile-section-header .section-title {
  margin-bottom: 0;
}

.profile-clear-history-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-clear-history-btn:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.profile-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.profile-history-card:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.05);
}

.history-thumb-wrap {
  width: 64px;
  height: 86px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #0f172a;
  cursor: pointer;
}

.history-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-type-chip {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #fbbf24;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.history-progress-mini-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
}

.history-progress-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 0 2px 2px 0;
}

.history-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.history-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.history-ep-status {
  font-size: 12.5px;
  color: #38bdf8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-time-meta {
  font-size: 11px;
  color: var(--text-dim);
}

.history-card-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-resume-play {
  background: var(--gradient-brand);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 44, 116, 0.4);
  transition: transform 0.15s ease;
}

.btn-resume-play:active {
  transform: scale(0.92);
}

.btn-del-history {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.btn-del-history:hover {
  color: #f87171;
}

.empty-history-box {
  padding: 36px 20px;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border-glass);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-history-box p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.btn-go-explore {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #f8fafc;
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.btn-go-explore:hover {
  background: var(--gradient-brand);
  border-color: transparent;
}



