/* ============================================
   出海短剧平台 H5 样式 v2 - 渐变暧昧风
   移动端优先，自适应 PC
   ============================================ */

:root {
  --bg-gradient: linear-gradient(180deg, #0d0015 0%, #1a0033 30%, #2d0a3d 60%, #0d0015 100%);
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(255, 255, 255, 0.10);
  --primary-rose: #ff4d7a;
  --primary-glow: rgba(255, 77, 122, 0.4);
  --gold-rose: #ffbd7f;
  --text-primary: #f5e8ff;
  --text-secondary: rgba(245, 232, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 20px rgba(255, 77, 122, 0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container,
.home-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ============================================
   头部
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 0, 21, 0.92);
  backdrop-filter: blur(12px);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
}

.header .logo {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #ff4d7a, #ffbd7f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.header .search-box {
  flex: 1;
  max-width: 300px;
  margin: 0 16px;
  position: relative;
}

.header .search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.header .search-box input:focus {
  border-color: var(--primary-rose);
}

.header .search-box .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 14px;
}

.header .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4d7a, #ffbd7f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
}

/* ============================================
   Hero 轮播
   ============================================ */
.hero-carousel {
  position: relative;
  margin: 12px -12px 20px;
  border-radius: 0;
  overflow: hidden;
}

.hero-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.hero-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
}

.hero-item.active {
  opacity: 1;
}

.hero-item .hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-item .hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(transparent, rgba(13, 0, 21, 0.92));
  pointer-events: none;
}

.hero-item .hero-info {
  position: relative;
  z-index: 2;
  padding: 24px 16px 20px;
  width: 100%;
}

.hero-item .hero-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.hero-item .hero-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.hero-item .btn-watch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 28px;
  border-radius: 24px;
  border: none;
  background: linear-gradient(135deg, #ff4d7a, #ff3377);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 77, 122, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-item .btn-watch:active {
  transform: scale(0.95);
  box-shadow: 0 2px 12px rgba(255, 77, 122, 0.25);
}

/* 轮播指示器 */
.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 4px;
}

.hero-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s;
}

.hero-dots .dot.active {
  width: 20px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ff4d7a, #ffbd7f);
}

/* ============================================
   分区标题
   ============================================ */
.section {
  margin: 24px 0 16px;
}

.section:first-child {
  margin-top: 4px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 3px solid var(--primary-rose);
}

.section-header .section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.section-header .see-all {
  font-size: 12px;
  color: var(--primary-rose);
  text-decoration: none;
  font-weight: 600;
  padding-right: 4px;
}

/* ============================================
   横向滚动分区
   ============================================ */
.section-hscroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.section-hscroll::-webkit-scrollbar {
  display: none;
}

/* ============================================
   剧集卡片 (通用)
   ============================================ */
.card-drama {
  flex: 0 0 130px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}

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

.card-drama .cover-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.card-drama .cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-gradient, #0d0015);
  transition: transform 0.3s;
}

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

.card-drama .card-info {
  padding: 8px 2px 0;
}

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

.card-drama .card-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

/* 角标 */
.card-drama .badge {
  position: absolute;
  z-index: 2;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 0 0 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-drama .badge-new {
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #ff4d7a, #ff2277);
  color: #fff;
}

.card-drama .badge-hot {
  top: 0;
  right: 0;
  border-radius: 0 0 0 6px;
  background: linear-gradient(135deg, #ff8c00, #ff6600);
  color: #fff;
}

/* ============================================
   双列网格 (Binge Worthy / See All)
   ============================================ */
.drama-grid-2cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card-drama.hero-card {
  flex: none;
}

/* ============================================
   筛选标签
   ============================================ */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-tag {
  flex: 0 0 auto;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--glass-border);
}

.filter-tag.active {
  background: linear-gradient(135deg, #ff4d7a, #ff3377);
  color: white;
  border-color: transparent;
}

/* ============================================
   播放页 (保持不变, 仅微调)
   ============================================ */
.player-page {
  min-height: 100vh;
  background: #000;
}

.player-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

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

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

.drama-header {
  padding: 16px;
}

.drama-header .title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.drama-header .meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.drama-header .tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.drama-header .tag {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.drama-header .description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.6;
}

.episode-list {
  padding: 0 16px 80px;
}

.episode-list .section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 16px 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.episode-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.episode-item:active {
  transform: scale(0.92);
}

/* ============================================
   Swipe Player (TikTok-style vertical scroll)
   ============================================ */
.swipe-player {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  overflow: hidden;
  touch-action: none;
}

.swipe-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
}

.video-container {
  flex: 0 0 auto;
  aspect-ratio: 9 / 16;
  max-height: 75vh;
  width: min(100%, calc(75vh * 9 / 16));
  margin-left: auto;
  margin-right: auto;
  position: relative;
  background: #000;
  overflow: hidden;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Video progress bar (thin top) */
.video-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 10;
}

.video-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary-rose);
  transition: width 0.3s;
}

/* Episodes button (center-right of video content area) */
.episodes-btn {
  position: absolute;
  top: 55%;
  right: 8px;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Play/pause center overlay */
.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.25s ease;
}

.video-play-overlay.show {
  opacity: 1;
}

.video-play-overlay svg {
  width: 24px;
  height: 24px;
}

/* Mute button (below episodes button) */
.video-mute-btn {
  position: absolute;
  top: calc(55% + 38px);
  right: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s;
}

.video-mute-btn:active {
  color: #fff;
}

/* Info panel (below video, tight) */
.info-panel {
  width: 100%;
  background: #111;
  padding: 10px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.episode-meta {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.info-panel .action-btn {
  margin: 0;
  padding: 10px 20px;
  max-width: 180px;
  font-size: 14px;
  white-space: nowrap;
}

.action-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary-rose);
  color: #fff;
  text-align: center;
}

.action-btn.gold {
  background: linear-gradient(135deg, #ff9d6c, #ff6b35);
  color: #fff;
}

.action-btn:active {
  opacity: 0.8;
}

/* Paywall overlay (covers only video area) */
.paywall-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.paywall-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.paywall-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.paywall-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 240px;
  text-align: center;
}

.paywall-overlay .action-btn {
  max-width: 220px;
}

/* ============================================
   Episodes panel — compact grid, inside video container
   ============================================ */
.episodes-panel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 11;
  border-radius: inherit;
}

.episodes-panel {
  position: absolute;
  top: 55%;
  right: 8px;
  height: auto;
  max-height: 55%;
  width: 55vw;
  max-width: 280px;
  background: #0d0d0f;
  z-index: 12;
  border-radius: 14px;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
  transform: translateY(-50%) translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.episodes-panel.open {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* panel header */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 14px 6px;
  gap: 6px;
  flex-shrink: 0;
}

.panel-header-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.panel-header-sub {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.35);
  padding-top: 2px;
}

.panel-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.panel-close:active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* episode count */
.panel-count-row {
  padding: 0 14px 10px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
}

/* grid container */
.panel-list {
  padding: 0 14px 14px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  align-content: start;
}

.panel-list::-webkit-scrollbar {
  width: 3px;
}

.panel-list::-webkit-scrollbar-track {
  background: transparent;
}

.panel-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

/* grid episode button */
.panel-episode {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: #1a1a1d;
  border: 1px solid #2a2a2d;
  color: #fff;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.panel-episode:active {
  transform: scale(0.92);
}

/* current playing */
.panel-episode.current {
  background: #3d1a24;
  border: 1.5px solid #ff4d7a;
  color: #fff;
}

/* locked */
.panel-episode.locked {
  background: #161618;
  border: 1px solid #26262a;
  color: #555;
}

/* lock icon overlay — bottom-right */
.panel-episode.locked::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 4px;
  height: 6px;
  border: 1.5px solid #555;
  border-radius: 0 0 1px 1px;
  background: none;
}

.panel-episode.locked::before {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 8px;
  width: 6px;
  height: 4px;
  border: 1.5px solid #555;
  border-bottom: none;
  border-radius: 2px 2px 0 0;
}

/* coins required — yellow tint but not full locked */
.panel-episode.coins {
  background: #1a1a15;
  border: 1px solid #3a3520;
  color: #e6c40c;
  font-size: 12px;
}

.episode-item.active {
  background: var(--primary-rose);
  color: white;
}

.episode-item.locked {
  color: var(--gold-rose);
}

.episode-item.locked::after {
  content: "🔒";
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 10px;
}

.episode-item.free {
  color: #28a745;
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 0, 21, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--glass-border);
  z-index: 50;
}

.bottom-bar .coin-balance {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--gold-rose);
}

.btn {
  padding: 10px 24px;
  border-radius: 24px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, #ff4d7a, #ff3377);
  color: white;
  flex: 1;
}

.btn-vip {
  background: linear-gradient(135deg, var(--gold-rose), #ffa066);
  color: #1a0033;
  flex: 1;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

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

.modal-content {
  background: #1a0033;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 600px;
  padding: 24px 20px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.modal-content .modal-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.modal-content .modal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.plan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.plan-item.selected {
  border-color: var(--primary-rose);
  background: rgba(255, 77, 122, 0.1);
}

.plan-item .plan-info .plan-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.plan-item .plan-info .plan-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.plan-item .plan-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-rose);
}

.plan-item .plan-badge {
  background: var(--primary-rose);
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

/* Payment method tabs */
.pay-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 3px;
}

.pay-tab {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.pay-tab.active {
  background: var(--primary-rose);
  color: #fff;
}

.pay-panel {
  display: none;
}

.pay-panel:first-of-type {
  display: block;
}

/* Coin packs */
.coins-intro {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-align: center;
}

/* PayPal buttons */
#paypal-button-container,
#paypal-coin-button-container {
  width: 100%;
}

#paypal-button-container .paypal-buttons,
#paypal-coin-button-container .paypal-buttons {
  width: 100% !important;
}

/* Loading error */
.loading-error {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 10;
}

.payment-result {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.payment-result .icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.payment-result .title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.payment-result .desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  text-align: center;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  width: 100%;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-rose);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* ============================================
   首页底部
   ============================================ */
.home-footer {
  margin-top: 40px;
  padding: 32px 16px 24px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.home-footer .footer-logo {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #ff4d7a, #ffbd7f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.home-footer .footer-company {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.policy-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  max-width: 400px;
  margin: 0 auto 20px;
}

.policy-grid a {
  font-size: 11px;
  color: rgba(245, 232, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.policy-grid a:hover {
  color: var(--primary-rose);
}

.home-footer .footer-copy {
  font-size: 10px;
  color: rgba(245, 232, 255, 0.3);
  margin-top: 12px;
}

/* ============================================
   政策页面通用
   ============================================ */
.policy-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  min-height: 100vh;
}

.policy-page h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ff4d7a, #ffbd7f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.policy-page h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text-primary);
}

.policy-page p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.policy-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-rose);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* ============================================
   PC 适配
   ============================================ */
@media (min-width: 768px) {

  .home-content,
  .container {
    max-width: 900px;
  }

  .header {
    padding: 12px calc((100vw - 900px) / 2 + 12px);
  }

  .hero-carousel {
    border-radius: var(--radius-lg);
    margin: 16px 0;
  }

  .drama-grid-2cols {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-drama {
    flex: 0 0 160px;
  }

  .episode-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (min-width: 1200px) {

  .home-content,
  .container {
    max-width: 1200px;
  }

  .drama-grid-2cols {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-drama {
    flex: 0 0 180px;
  }
}

/* ============================================
   Facebook Pixel 隐藏容器
   ============================================ */
#fb-pixel-helper {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}