/* ========================================
   Template Group 14 - 新云影视
   home.css - Homepage Layout & Components (Dark Theme)
   ======================================== */

/* ========================================
   Hot Grid (热门观看)
   ======================================== */
.hot-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}
.hot-card {
  display: block;
  background: #1a1a2e;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.hot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Poster & Placeholder Image
   ======================================== */
.hot-card .poster {
  position: relative;
  width: 100%;
  padding-top: 140%;
  background: #16213e;
  overflow: hidden;
}
.hot-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%);
}
.hot-card .poster .placeholder-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hot-card .poster .placeholder-img .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(240, 165, 0, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a2e;
  font-size: 18px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s;
}
.hot-card .poster .placeholder-img:hover .play-icon { opacity: 1; }
.hot-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;
}
.hot-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;
}

/* ========================================
   Section Flex (各栏目布局)
   ======================================== */
.section-flex {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  background: #1a1a2e;
  border-radius: 6px;
  padding: 20px;
}

/* Cards Area */
.cards-area { flex: 1; min-width: 0; }
.cards-area .section-header { margin-bottom: 12px; }

/* ========================================
   Rank Sidebar
   ======================================== */
.rank-sidebar { width: 240px; flex-shrink: 0; }
.sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: #f0a500;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar-title a { font-size: 12px; font-weight: 400; color: #888; }
.sidebar-title a:hover { color: #f0a500; }

.rank-link-list { display: flex; flex-direction: column; gap: 6px; }
.rank-link-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: #aaa;
  transition: all 0.2s;
}
.rank-link-list a:hover { background: #16213e; color: #f0a500; }
.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #555;
  flex-shrink: 0;
}
.rank-link-list a:nth-child(1) .rank-num { background: #e50914; }
.rank-link-list a:nth-child(2) .rank-num { background: #e67e22; }
.rank-link-list a:nth-child(3) .rank-num { background: #f39c12; }

/* ========================================
   Home Two Column (榜单区域)
   ======================================== */
.home-two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

.ranking-section {
  background: #1a1a2e;
  border-radius: 6px;
  padding: 20px;
}
.ranking-section .section-header { margin-bottom: 12px; }

.ranking-first {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  padding: 12px;
  background: #16213e;
  border-radius: 6px;
  transition: background 0.2s;
}
.ranking-first:hover { background: #1e1e38; }

.rank-poster {
  width: 120px;
  height: 160px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(145deg, #1e2a4a 0%, #16213e 50%, #0f1a30 100%);
}
.rank-poster img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  border-radius: 4px;
}
.rank-poster .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: rgba(240, 165, 0, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a2e;
  font-size: 14px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s;
}
.rank-poster:hover .play-icon { opacity: 1; }
.rank-poster .img-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 6px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 12px;
  z-index: 2;
  text-align: center;
}

.rank-detail { flex: 1; min-width: 0; }
.rank-detail h4 { font-size: 15px; font-weight: 600; color: #e0e0e0; margin-bottom: 8px; }
.meta-line { font-size: 12px; color: #888; margin-bottom: 4px; }

.ranking-rest { display: flex; flex-direction: column; gap: 5px; }
.ranking-rest a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: #aaa;
  transition: all 0.2s;
}
.ranking-rest a:hover { background: #16213e; color: #f0a500; }
.ranking-rest .rank-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
