/* ========================================
   Template Group 14 - 新云影视
   main.css - Dark Theme + All Pages
   ======================================== */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px; line-height: 1.5; color: #e0e0e0; background: #0f0f1e;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #f0a500; }
ul, ol { list-style: none; }
img { max-width: 100%; vertical-align: middle; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input { font-family: inherit; font-size: inherit; }

/* ========================================
   Container
   ======================================== */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ========================================
   Top Bar (Header)
   ======================================== */
.top-bar {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 12px 0;
}
.top-bar .container { display: flex; align-items: center; justify-content: space-between; }
.top-bar .logo {
  font-size: 22px; font-weight: 700; color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.top-bar .logo:hover { color: #f0a500; }

.search-box { display: flex; align-items: center; background: rgba(255,255,255,0.15); border-radius: 20px; overflow: hidden; }
.search-box input {
  width: 280px; padding: 8px 16px; background: transparent; border: none;
  color: #fff; font-size: 14px; outline: none;
}
.search-box input::placeholder { color: rgba(255,255,255,0.5); }
.search-box button {
  padding: 8px 18px; background: #f0a500; color: #1a1a2e;
  font-size: 13px; font-weight: 600; border-radius: 0 20px 20px 0; transition: background 0.2s;
}
.search-box button:hover { background: #e69500; }

/* ========================================
   Navigation Bar
   ======================================== */
.nav-bar { background: #1a1a2e; border-bottom: 1px solid #2a2a4a; }
.nav-bar .container { display: flex; align-items: center; gap: 4px; padding: 0 15px; overflow-x: auto; }
.nav-bar a {
  display: block; padding: 12px 18px; font-size: 15px; font-weight: 500;
  color: #aaa; transition: all 0.2s; position: relative; white-space: nowrap;
}
.nav-bar a:hover { color: #f0a500; background: rgba(240, 165, 0, 0.08); }
.nav-bar a.active { color: #f0a500; font-weight: 600; }
.nav-bar a.active::after {
  content: ''; position: absolute; bottom: 0; left: 18px; right: 18px;
  height: 3px; background: #f0a500; border-radius: 3px 3px 0 0;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb {
  padding: 15px 0;
  font-size: 13px;
  color: #888;
}
.breadcrumb a { color: #aaa; }
.breadcrumb a:hover { color: #f0a500; }
.breadcrumb span { margin: 0 8px; color: #666; }

/* ========================================
   Common Section
   ======================================== */
.section { margin-bottom: 25px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; margin-bottom: 15px; border-bottom: 2px solid #2a2a4a;
}
.section-header h2, .section-header h3 { 
  font-size: 18px; font-weight: 700; color: #f0a500; position: relative; padding-left: 12px; 
}
.section-header h2::before, .section-header h3::before {
  content: ''; position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 4px; background: #f0a500; border-radius: 2px;
}
.section-header .more { font-size: 13px; color: #888; }
.section-header .more:hover { color: #f0a500; }

/* ========================================
   Card Grid (栏目页/推荐)
   ======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}
.card {
  display: block; background: #1a1a2e; border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.card .poster { position: relative; width: 100%; padding-top: 140%; background: #16213e; overflow: hidden; }
.card .poster .placeholder-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(145deg, #1e2a4a 0%, #16213e 50%, #0f1a30 100%);
}
.card .poster .placeholder-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.card .poster .placeholder-img .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 26px;
  color: rgba(240, 165, 0, 0.4);
  z-index: 2;
}
.card .poster .placeholder-img .img-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 8px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  z-index: 2;
  text-align: center;
}
.card .status-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  background: #f0a500;
  color: #1a1a2e;
  border-radius: 3px;
  z-index: 3;
}
.card .card-info { padding: 10px; }
.card .card-title {
  font-size: 13px;
  font-weight: 600;
  color: #e0e0e0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}
.card .card-title:hover { color: #f0a500; }
.card .card-meta { font-size: 12px; color: #888; }

/* ========================================
   Filter Bar (栏目页筛选)
   ======================================== */
.filter-bar {
  background: #1a1a2e;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
}
.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2a2a4a;
}
.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.filter-label {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
  min-width: 48px;
  padding-top: 2px;
}
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-options a {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  border-radius: 3px;
  color: #aaa;
  border: 1px solid #2a2a4a;
  transition: all 0.2s;
}
.filter-options a:hover,
.filter-options a.active {
  border-color: #f0a500;
  color: #f0a500;
  background: rgba(240, 165, 0, 0.08);
}
.filter-options a.active {
  background: #f0a500;
  color: #1a1a2e;
  border-color: #f0a500;
  font-weight: bold;
}

/* ========================================
   Pagination (分页)
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 30px 0;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid #2a2a4a;
  color: #aaa;
  transition: all 0.2s;
}
.pagination a:hover {
  border-color: #f0a500;
  color: #f0a500;
}
.pagination .current {
  background: #f0a500;
  color: #1a1a2e;
  border-color: #f0a500;
  font-weight: bold;
}
.pagination .dots {
  border-color: transparent;
}

/* ========================================
   Detail Header (信息页头部)
   ======================================== */
.detail-header {
  display: flex;
  gap: 24px;
  background: #1a1a2e;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}
.detail-poster {
  width: 240px;
  flex-shrink: 0;
}
.detail-poster .poster-img {
  width: 100%;
  padding-top: 140%;
  background: #16213e;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.detail-poster .poster-img img,
.detail-poster .poster-img .placeholder-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.detail-poster .poster-img .placeholder-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background: linear-gradient(145deg, #1e2a4a 0%, #16213e 50%, #0f1a30 100%);
  gap: 10px;
}
.detail-poster .poster-img .placeholder-img .play-icon {
  font-size: 40px;
  color: rgba(240, 165, 0, 0.4);
}
.detail-poster .poster-img .placeholder-img .img-title {
  font-size: 15px;
  color: #999;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.detail-status-tag {
  display: inline-block;
  background: #f0a500;
  color: #1a1a2e;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: bold;
  margin-top: 12px;
}
.detail-info {
  flex: 1;
}
.detail-info h1 {
  font-size: 26px;
  color: #fff;
  margin-bottom: 12px;
}
.detail-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.detail-rating .score {
  font-size: 28px;
  font-weight: bold;
  color: #f0a500;
}
.detail-info .meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.meta-item {
  font-size: 14px;
  color: #ccc;
}
.meta-item .meta-label {
  color: #888;
  margin-right: 8px;
}
.meta-item a {
  color: #f0a500;
}
.meta-item a:hover {
  text-decoration: underline;
}

/* ========================================
   Play Sources (播放地址)
   ======================================== */
.play-sources {
  margin: 24px 0;
  background: #1a1a2e;
  border-radius: 8px;
  padding: 20px;
}
.play-sources h3 {
  font-size: 18px;
  color: #f0a500;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2a4a;
}
.source-group {
  margin-bottom: 16px;
}
.source-group:last-child {
  margin-bottom: 0;
}
.source-group .source-name {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 8px;
  font-weight: bold;
}
.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.source-links a {
  display: inline-block;
  padding: 6px 16px;
  background: #16213e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  font-size: 13px;
  color: #aaa;
  transition: all 0.2s;
}
.source-links a:hover {
  border-color: #f0a500;
  color: #f0a500;
  background: rgba(240, 165, 0, 0.08);
}

/* ========================================
   Synopsis (剧情简介)
   ======================================== */
.synopsis {
  background: #1a1a2e;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}
.synopsis h3 {
  font-size: 18px;
  color: #f0a500;
  margin-bottom: 12px;
}
.synopsis p {
  font-size: 14px;
  color: #bbb;
  line-height: 1.8;
}

/* ========================================
   Related Section (相关推荐)
   ======================================== */
.related-section {
  margin: 24px 0;
}
.related-section h3 {
  font-size: 18px;
  color: #f0a500;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid #f0a500;
}

/* ========================================
   Comment Section (评论区)
   ======================================== */
.comment-section {
  background: #1a1a2e;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}
.comment-section h3 {
  font-size: 18px;
  color: #f0a500;
  margin-bottom: 16px;
}
.comment-placeholder {
  text-align: center;
  color: #666;
  padding: 30px 0;
  font-size: 14px;
}

/* ========================================
   Player (播放页)
   ======================================== */
.player-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}
.player-placeholder {
  width: 100%;
  padding-top: 56.25%;
  background: #0a0a15;
  position: relative;
}
.player-placeholder-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #555;
}
.player-placeholder .play-icon {
  font-size: 64px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.player-placeholder .player-text {
  font-size: 14px;
  opacity: 0.5;
}
.player-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1a2e;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.player-info-bar .current-title {
  font-size: 16px;
  font-weight: bold;
  color: #f0a500;
}
.player-info-bar .view-count {
  font-size: 13px;
  color: #888;
}
.player-info-bar .source-info {
  font-size: 13px;
  color: #aaa;
}
.player-control-panel {
  background: #1a1a2e;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}
.player-control-panel .control-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}
.player-control-panel .line-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.player-control-panel .line-btn {
  padding: 6px 16px;
  font-size: 13px;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  background: #16213e;
  color: #aaa;
  cursor: pointer;
  transition: all 0.2s;
}
.player-control-panel .line-btn:hover {
  border-color: #f0a500;
  color: #f0a500;
}
.player-control-panel .line-btn.active {
  background: #f0a500;
  color: #1a1a2e;
  border-color: #f0a500;
  font-weight: bold;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: #1a1a2e;
  color: #999;
  padding: 30px 0 20px;
  margin-top: 30px;
  text-align: center;
  border-top: 1px solid #2a2a4a;
}
.footer .friend-links { margin-bottom: 20px; }
.footer .friend-links h4 { color: #ccc; font-size: 14px; margin-bottom: 10px; }
.footer .links-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 16px; }
.footer .links-row a { color: #888; font-size: 13px; }
.footer .links-row a:hover { color: #f0a500; }
.footer p { font-size: 12px; line-height: 1.8; color: #777; }

/* ========================================
   Back to Top
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 42px;
  height: 42px;
  background: #f0a500;
  color: #1a1a2e;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 999;
  transition: all 0.3s;
  cursor: pointer;
}
.back-to-top:hover {
  background: #e69500;
  transform: translateY(-2px);
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
  text-align: center;
  padding: 60px;
  color: #666;
  font-size: 14px;
}

/* 平板/窄窗口下导航横向滚动，避免栏目名被压缩成竖排 */
@media (max-width: 1199px) {
  .nav-bar .container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .nav-bar .container::-webkit-scrollbar {
    display: none;
  }
  .nav-bar a {
    white-space: nowrap;
  }
}
