/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

/* 侧边导航栏 */
.sidebar {
  width: 200px;
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 20px 0;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: #ff8c00;
}

.nav-menu {
  padding: 20px 0;
}

.nav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  color: #ecf0f1;
  text-decoration: none;
  transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
  background-color: rgba(255, 140, 0, 0.2);
  border-left: 3px solid #ff8c00;
}

.count {
  font-size: 12px;
  color: #95a5a6;
}

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: 200px;
  margin-right: 300px;
  padding: 20px;
  background-color: #fff;
}

/* 面包屑导航 */
.breadcrumb {
  padding: 15px 0;
  font-size: 14px;
  color: #666;
}

.breadcrumb a {
  color: #ff8c00;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.separator {
  margin: 0 8px;
  color: #999;
}

/* 电影卡片 */
.movie-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.movie-header {
  display: flex;
  gap: 30px;
  padding: 30px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.movie-poster {
  width: 200px;
  height: 280px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.movie-info {
  flex: 1;
}

.movie-title {
  font-size: 32px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 15px;
}

.movie-rating {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 20px;
}

.rating-score {
  font-size: 36px;
  font-weight: bold;
  color: #ff8c00;
}

.rating-label {
  font-size: 14px;
  color: #666;
}

.movie-meta {
  margin-bottom: 25px;
}

.meta-item {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.8;
}

.meta-label {
  color: #666;
  font-weight: 500;
}

.meta-value {
  color: #333;
}

.action-buttons {
  display: flex;
  gap: 15px;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background-color: #ff8c00;
  color: #fff;
}

.btn-primary:hover {
  background-color: #ff7700;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.btn-secondary {
  background-color: #95a5a6;
  color: #fff;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

/* 电影区块 */
.movie-section {
  padding: 30px;
  border-top: 1px solid #eee;
}

.section-title {
  font-size: 20px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff8c00;
}

/* 剧情简介 */
.description-wrapper {
  position: relative;
}

.description {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  max-height: 96px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.description.expanded {
  max-height: none;
}

.toggle-btn {
  margin-top: 10px;
  background: none;
  border: none;
  color: #ff8c00;
  cursor: pointer;
  font-size: 14px;
  padding: 5px 0;
}

.toggle-btn:hover {
  text-decoration: underline;
}

/* 播放源标签 */
.source-tabs {
  margin-bottom: 15px;
}

.source-tab {
  padding: 8px 20px;
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  cursor: pointer;
  border-radius: 4px;
  margin-right: 10px;
  transition: all 0.3s;
}

.source-tab.active {
  background-color: #ff8c00;
  color: #fff;
  border-color: #ff8c00;
}

/* 集数列表 */
.episode-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
}

.episode-btn {
  padding: 10px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s;
}

.episode-btn:hover {
  border-color: #ff8c00;
  color: #ff8c00;
}

.episode-btn.active {
  background-color: #ff8c00;
  color: #fff;
  border-color: #ff8c00;
}

/* 推荐网格 */
.recommend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.recommend-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
  background: #f8f9fa;
}

.recommend-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.recommend-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.recommend-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(255, 140, 0, 0.9);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.recommend-info {
  padding: 12px;
}

.recommend-title {
  font-size: 14px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recommend-desc {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 右侧推荐栏 */
.right-sidebar {
  width: 300px;
  background-color: #fff;
  padding: 20px;
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
  border-left: 1px solid #eee;
}

.sidebar-title {
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff8c00;
}

.badge {
  display: inline-block;
  background-color: #ff8c00;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 5px;
}

.current-movie {
  margin-bottom: 30px;
}

.sidebar-poster {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
}

.sidebar-meta {
  font-size: 13px;
  line-height: 1.8;
  color: #555;
}

.sidebar-meta p {
  margin-bottom: 8px;
}

/* 热门列表 */
.hot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hot-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  transition: all 0.3s;
  cursor: pointer;
}

.hot-item:hover {
  background: #fff3e6;
  transform: translateX(5px);
}

.hot-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #95a5a6;
  color: #fff;
  border-radius: 4px;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.hot-rank.rank-1 {
  background-color: #ff6b6b;
}

.hot-rank.rank-2 {
  background-color: #ff8c42;
}

.hot-rank.rank-3 {
  background-color: #ffa726;
}

.hot-content {
  flex: 1;
  min-width: 0;
}

.hot-content h4 {
  font-size: 14px;
  color: #2c3e50;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hot-status {
  font-size: 12px;
  color: #999;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .right-sidebar {
    display: none;
  }

  .main-content {
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }

  .sidebar-header,
  .count {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 12px 10px;
  }

  .main-content {
    margin-left: 60px;
  }

  .movie-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .movie-poster {
    width: 160px;
    height: 224px;
  }

  .episode-list {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }

  .recommend-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 50px;
  }

  .main-content {
    margin-left: 50px;
    padding: 10px;
  }

  .movie-section {
    padding: 20px 15px;
  }

  .movie-title {
    font-size: 24px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}
