/* 在线影院 - 主样式 */
:root {
  --bg-dark: #0d0d0f;
  --bg-card: #16161a;
  --bg-card-hover: #1c1c22;
  --accent: #e50914;
  --accent-hover: #f40612;
  --text: #e5e5e5;
  --text-muted: #8c8c8c;
  --border: #2a2a2e;
  --font-sans: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ========== 顶部导航 ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 15, 0.95);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  width: 220px;
}

.search-box input {
  background: none;
  border: none;
  color: var(--text);
  outline: none;
  width: 100%;
  font-size: 0.9rem;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* ========== 轮播 ========== */
.carousel-wrap {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.carousel {
  width: 100%;
  aspect-ratio: 21/9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.carousel-inner {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.carousel-item.active {
  opacity: 1;
  z-index: 1;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 30px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
}

.carousel-caption h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.carousel-caption p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.carousel-dots {
  position: absolute;
  bottom: 16px;
  right: 24px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.carousel-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-dots span.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ========== 内容区 ========== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.section-title {
  font-size: 1.25rem;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}

.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}

.film-card {
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s, background 0.2s;
  border: 1px solid transparent;
}

.film-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border);
}

.film-card .cover-wrap {
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--border);
}

.film-card .cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.film-card:hover .cover-wrap img {
  transform: scale(1.05);
}

.film-card .info {
  padding: 12px;
}

.film-card .title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.film-card .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.film-card .score {
  color: #f5a623;
  font-weight: 600;
}

/* ========== 播放页 ========== */
.play-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.play-main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 24px;
}

.video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  aspect-ratio: 16/9;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
}

.play-info h1 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.play-info .meta-line {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.play-info .desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* 多源切换 */
.source-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.source-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.source-tabs,
.episode-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.episode-bar {
  margin-top: 12px;
}

.source-tab {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.source-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.source-tab.active {
  border-color: var(--accent);
  background: rgba(229, 9, 20, 0.15);
  color: var(--accent);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

/* ========== 页脚 ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ========== 分类筛选 ========== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-bar button {
  padding: 8px 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.filter-bar button:hover,
.filter-bar button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(229, 9, 20, 0.1);
}

/* 空状态 */
.placeholder-cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2.5rem;
}
