/* ==================== CSS Variables ==================== */
:root {
  --bg-primary: #0b0e14;
  --bg-secondary: #141820;
  --bg-card: #1a1f2e;
  --bg-hover: #222839;
  --bg-input: #1e2333;
  --text-primary: #e8eaed;
  --text-secondary: #9aa0b0;
  --text-muted: #6b7280;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --border: #2a2f3e;
  --tag-movie: #ef4444;
  --tag-tv: #22c55e;
  --tag-anime: #a855f7;
  --tag-show: #f59e0b;
  --tag-hot: #f97316;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --transition: all 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

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

ul, ol { list-style: none; }

img { max-width: 100%; height: auto; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ==================== Header ==================== */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 2px;
  cursor: pointer;
  user-select: none;
}

.logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 6px 16px;
  width: 300px;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
  padding: 4px 8px;
}

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

.search-box .search-icon {
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.search-box .search-icon:hover {
  color: var(--accent);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
  position: relative;
}

.btn-icon:hover {
  background: var(--accent);
  color: #fff;
}

.btn-icon .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: var(--tag-hot);
  border-radius: 50%;
  font-size: 10px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation */
.nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav-item {
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
}

.nav-item:hover {
  color: var(--text-primary);
}

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

/* ==================== Main Content ==================== */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

/* ==================== Banner / Carousel ==================== */
.banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  height: 340px;
  background: var(--bg-card);
}

.banner-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.banner-slide.active {
  opacity: 1;
}

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

.banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 30px 30px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
}

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

.banner-meta {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}

.banner-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  max-width: 600px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.banner-dots {
  position: absolute;
  bottom: 16px;
  right: 30px;
  display: flex;
  gap: 8px;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: var(--transition);
}

.banner-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ==================== Section ==================== */
.section {
  margin-bottom: 32px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}

.section-title .icon {
  font-size: 22px;
}

.section-more {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  transition: var(--transition);
}

.section-more:hover {
  background: var(--accent);
  color: #fff;
}

/* Sub tabs */
.sub-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sub-tab {
  padding: 5px 14px;
  font-size: 13px;
  border-radius: 20px;
  cursor: pointer;
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: var(--transition);
  user-select: none;
  border: 1px solid transparent;
}

.sub-tab:hover {
  color: var(--text-primary);
  border-color: var(--border);
}

.sub-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* 次级筛选标签（地区/年份/排序） */
.sub-sub-label {
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 4px;
  flex-shrink: 0;
}

.sub-sub-tab {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 16px;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: var(--transition);
  user-select: none;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.sub-sub-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sub-sub-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* ==================== Video Grid ==================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.video-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
}

.video-thumb {
  position: relative;
  width: 100%;
  padding-top: 140%;
  overflow: hidden;
  background: var(--bg-secondary);
}

.video-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.video-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  z-index: 2;
}

.video-tag.movie { background: var(--tag-movie); }
.video-tag.tv { background: var(--tag-tv); }
.video-tag.anime { background: var(--tag-anime); }
.video-tag.show { background: var(--tag-show); }

.video-quality {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,0.6);
  z-index: 2;
}

.video-score {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(0,0,0,0.7);
  z-index: 2;
}

.video-ep {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.7);
  z-index: 2;
}

.video-info {
  padding: 10px 10px 12px;
}

.video-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.video-title:hover {
  color: var(--accent);
}

.video-sub {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== Video List (libvio style) ==================== */
.video-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.video-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.video-list-item:hover {
  background: var(--bg-hover);
}

.video-list-item .item-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

.item-tag.tag-movie { background: var(--tag-movie); }
.item-tag.tag-tv { background: var(--tag-tv); }
.item-tag.tag-anime { background: var(--tag-anime); }
.item-tag.tag-show { background: var(--tag-show); }

.video-list-item .item-title {
  font-size: 14px;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-list-item .item-title:hover {
  color: var(--accent);
}

.video-list-item .item-status {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.video-list-item .item-score {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: #fbbf24;
}

/* ==================== Modal ==================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

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

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: modalIn 0.3s ease;
}

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

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

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--tag-movie);
  color: #fff;
}

.modal-body {
  padding: 22px;
}

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

.modal-body .highlight {
  color: var(--accent);
  font-weight: 600;
}

.modal-body .dns-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}

.modal-body .dns-table th,
.modal-body .dns-table td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.modal-body .dns-table th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
}

.modal-body .dns-table td {
  color: var(--text-secondary);
}

/* ==================== History Dropdown ==================== */
.history-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
  z-index: 150;
  overflow: hidden;
}

.history-dropdown.show {
  display: block;
}

.history-dropdown .hd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.history-dropdown .hd-header span {
  font-size: 14px;
  font-weight: 600;
}

.history-dropdown .hd-clear {
  font-size: 12px;
  color: var(--tag-movie);
  cursor: pointer;
}

.history-list {
  max-height: 300px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  transition: var(--transition);
  cursor: pointer;
}

.history-item:hover {
  background: var(--bg-hover);
}

.history-item .hi-thumb {
  width: 50px;
  height: 35px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card);
}

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

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

.history-item .hi-title {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item .hi-progress {
  font-size: 11px;
  color: var(--text-muted);
}

.history-empty {
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ==================== Footer ==================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

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

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

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ==================== Search Results Overlay ==================== */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 150;
}

.search-results.show {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-item .sr-thumb {
  width: 40px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card);
}

.search-result-item .sr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.search-result-item .sr-title {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item .sr-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==================== Detail Page ==================== */
.detail-page {
  display: none;
}

.detail-page.show {
  display: block;
}

.detail-hero {
  position: relative;
  height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

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

.detail-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
  padding: 40px;
  display: flex;
  align-items: flex-end;
}

.detail-info {
  max-width: 600px;
}

.detail-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

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

.detail-meta span {
  font-size: 13px;
  color: var(--text-secondary);
}

.detail-meta .score {
  color: #fbbf24;
  font-weight: 700;
  font-size: 16px;
}

.detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.detail-player {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
}

.player-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 48px;
}

.episode-list {
  padding: 16px;
}

.episode-list h4 {
  font-size: 15px;
  margin-bottom: 12px;
  font-weight: 600;
}

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

.episode-btn {
  padding: 8px;
  text-align: center;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.episode-btn:hover, .episode-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
}

.sidebar-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
}

.sidebar-item:hover .si-title {
  color: var(--accent);
}

.sidebar-item .si-rank {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.sidebar-item:nth-child(1) .si-rank { background: var(--tag-movie); color: #fff; }
.sidebar-item:nth-child(2) .si-rank { background: var(--tag-show); color: #fff; }
.sidebar-item:nth-child(3) .si-rank { background: var(--tag-tv); color: #fff; }

.sidebar-item .si-title {
  font-size: 13px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition);
}

.sidebar-item .si-score {
  font-size: 12px;
  color: #fbbf24;
  flex-shrink: 0;
}

/* ==================== Back button ==================== */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 16px;
}

.btn-back:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .detail-body {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    flex-direction: row;
    overflow-x: auto;
  }
  .sidebar-card {
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .search-box {
    width: 200px;
  }
  .banner {
    height: 220px;
  }
  .banner-title {
    font-size: 20px;
  }
  .video-list {
    grid-template-columns: 1fr;
  }
  .episode-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .search-box {
    width: 150px;
  }
  .nav-item {
    padding: 8px 12px;
    font-size: 13px;
  }
  .banner {
    height: 180px;
  }
}

/* ==================== Loading States ==================== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.loading-spinner::before {
  content: '';
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 30px 0;
}

/* ==================== Video Player ==================== */
.player-wrapper {
  width: 100%;
  background: #000;
  position: relative;
}

.player-wrapper video {
  width: 100%;
  max-height: 500px;
  display: block;
  background: #000;
}

/* 视频画质信息栏 */
.video-quality-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.vq-res {
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.vq-codec {
  color: var(--text-secondary);
  font-size: 12px;
}

.vq-fps {
  color: var(--text-muted);
  font-size: 12px;
}
.player-wrapper video:no-src {
  min-height: 200px;
}

/* ==================== Source Switcher ==================== */
.source-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.source-label {
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.source-btn {
  padding: 5px 14px;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.source-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.source-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ==================== Pagination ==================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 0 8px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

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

.page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.page-ellipsis {
  color: var(--text-muted);
  padding: 0 4px;
}

/* ==================== Info List (Detail Sidebar) ==================== */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
}

.info-label {
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 40px;
}

.info-row span:last-child {
  color: var(--text-secondary);
}

/* ==================== Category Page ==================== */
.category-page {
  max-width: 1280px;
  margin: 0 auto;
}

/* ==================== Global Source Switcher ==================== */
.source-switcher-global {
  display: flex;
  align-items: center;
  gap: 6px;
}

.source-switcher-global .source-btn {
  padding: 4px 10px;
  font-size: 11px;
}

/* ==================== Skeleton Loading ==================== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius);
}

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

.skeleton-card {
  width: 100%;
  padding-top: 140%;
}

.skeleton-text {
  height: 14px;
  margin-top: 8px;
  width: 80%;
}

.skeleton-text-short {
  height: 12px;
  margin-top: 4px;
  width: 50%;
}
