:root {
  --primary-color: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #a78bfa;
  --dark-color: #1e293b;
  --gray-color: #64748b;
  --light-gray: #f1f5f9;
  --card-radius: 16px;
  --border-radius: 8px;
  --box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  /* --glass-background: rgba(255, 255, 255, 0.7); */
  --glass-blur: blur(10px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  --primary-gradient: linear-gradient(135deg, #7c3aed, #2563eb);
}

.episode-overview-container {
  width: 100%;
  padding: 0;
  box-sizing: border-box; /* 确保padding不会增加容器宽度 */
  overflow-x: hidden; /* 防止水平溢出 */
}

.loading-section, .error-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.loading-section .loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.4));
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-section {
  color: #e74c3c;
}

.error-section i {
  font-size: 40px;
  margin-bottom: 10px;
}

/* 整体布局 */
.overview-layout {
  display: flex;
  gap: 20px; /* 减小间距 */
  width: 100%;
  box-sizing: border-box; /* 确保padding和border包含在宽度内 */
}

.left-column {
  flex: 0 0 38%; /* 略微减小左侧比例 */
  max-width: 38%;
  box-sizing: border-box;
}

.right-column {
  flex: 0 0 60%;
  max-width: 60%;
  display: flex;
  flex-direction: column;
  gap: 15px; 
  box-sizing: border-box;
  overflow: hidden; /* 防止内容溢出 */
  /* background: #ececfb; */
}

/* 避免右侧内容超出 */
.season-tabs-wrapper,
.episodes-carousel-container,
.synopsis-section,
.actors-section {
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* 左侧图片区域样式 */
.main-image-container {
  height: 450px;
  overflow: hidden;
  border-radius: var(--card-radius);
  box-shadow: var(--box-shadow);
  background-color: #FFFFFF99;
  position: relative;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-sizing: border-box;
}

.image-slider {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.image-slider:hover .main-image {
  transform: scale(1.04);
}

.image-nav-button {
  position: absolute;
  background-color: rgba(124, 58, 237, 0.3);
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 2;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.image-nav-button:hover {
  opacity: 1;
  transform: scale(1.1);
}

.image-nav-button.left {
  left: 15px;
}

.image-nav-button.right {
  right: 15px;
}

.image-nav-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.image-indicators {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.image-indicators span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(32, 28, 28, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.image-indicators span.active {
  background-color: var(--primary-color);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}

.no-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--light-gray);
  color: var(--gray-color);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.no-image-placeholder i {
  font-size: 50px;
  margin-bottom: 15px;
  opacity: 0.5;
}

/* 章节标题样式 */
.section-title {
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
  color: var(--dark-color);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

/* 季切换标签样式 - 更紧凑 */
.season-tabs-wrapper {
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
  background: var(--glass-background);
  border-radius: var(--border-radius);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--box-shadow);
  padding: 8px 12px;
}

.season-tabs {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.season-tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.season-tab {
  position: relative;
  padding: 10px 5px;
  cursor: pointer;
  font-size: 15px;
  color: var(--gray-color);
  transition: color 0.3s, transform 0.3s;
  white-space: nowrap;
}

.season-tab.active {
  color: var(--primary-color);
  font-weight: 600;
}

.season-tab:hover {
  transform: translateY(-2px);
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-gradient);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
}

/* 图文滑动的集选择器 - 更紧凑 */
.episodes-carousel-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  background: var(--glass-background);
  border-radius: var(--card-radius);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  padding: 15px;
  box-shadow: var(--box-shadow);
}

.episodes-carousel {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 5px 0;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

.episodes-carousel::-webkit-scrollbar {
  height: 4px;
}

.episodes-carousel::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
}

.episodes-carousel::-webkit-scrollbar-track {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
}

.episode-card {
  flex: 0 0 120px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background-color: white;
  border: 2px solid transparent;
}

.episode-card.active {
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  transform: translateY(-3px);
  border: 2px solid var(--primary-color);
}

.episode-thumb {
  height: 70px;
  overflow: hidden;
  position: relative;
}

.episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.episode-card:hover .episode-thumb img {
  transform: scale(1.1);
}

.episode-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-gray);
  color: var(--gray-color);
}

.episode-thumb-placeholder span {
  font-size: 18px;
  font-weight: bold;
}

.episode-card-info {
  padding: 8px 10px;
  border-top: 1px solid rgba(124, 58, 237, 0.1);
}

.episode-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dark-color);
}

/* 合并的简介区域 */
.synopsis-section {
  background: var(--glass-background);
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: var(--box-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  overflow: hidden;
  position: relative;
}

.synopsis-section::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  z-index: -1;
  background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
             radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.synopsis-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  z-index: 1;
}

.synopsis-subtitle {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark-color);
  position: relative;
  display: inline-block;
  margin-right: 15px;
}

.synopsis-subtitle::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60%;
  height: 2px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.season-synopsis p, 
.episode-synopsis p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--dark-color);
  margin: 0;
}

.episode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 13px;
  color: var(--gray-color);
  margin: 5px 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(124, 58, 237, 0.2);
}

.episode-meta span {
  display: inline-flex;
  align-items: center;
}

.episode-meta span::before {
  content: "•";
  margin-right: 5px;
  color: var(--primary-light);
}

/* 演员区域 */
.actors-section {
  background: var(--glass-background);
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: var(--box-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  position: relative;
}

.actors-container {
  margin-bottom: 10px;
}

.actors-subtitle {
  font-size: 14px;
  color: var(--gray-color);
  margin: 10px 0 8px;
  font-weight: 500;
  position: relative;
  padding-left: 15px;
}

.actors-subtitle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--primary-gradient);
  border-radius: 50%;
}

.actors-carousel {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 5px 0;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  margin-bottom: 15px;
  flex-wrap: wrap; /* 允许换行 */
  justify-content: flex-start; /* 左对齐 */
}

.actors-carousel::-webkit-scrollbar {
  height: 4px;
}

.actors-carousel::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
}

.actors-carousel::-webkit-scrollbar-track {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
}

.actor-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  flex: 0 0 auto;
  position: relative;
}

.actor-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--light-gray);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 6px;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.2);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.actor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.actor-avatar i {
  font-size: 20px;
  color: var(--gray-color);
}

.actor-avatar:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 8px 15px rgba(124, 58, 237, 0.3);
}

.actor-avatar:hover img {
  transform: scale(1.05);
}

.actor-name {
  font-size: 12px;
  text-align: center;
  margin: 0;
  line-height: 1.2;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--dark-color);
  transition: color 0.3s;
}

.actor-circle:hover .actor-name {
  color: var(--primary-color);
}

.guest-badge {
  position: absolute;
  top: -5px;
  right: 5px;
  background: var(--primary-gradient);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(124, 58, 237, 0.3);
}

.no-actors {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  background-color: var(--light-gray);
  border-radius: 8px;
  color: var(--gray-color);
}

.no-actors i {
  font-size: 25px;
  margin-bottom: 10px;
  opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .overview-layout {
    flex-direction: column;
  }
  
  .left-column, .right-column {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .main-image-container {
    height: 400px;
  }
  
  .actors-list {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .main-image-container {
    height: 300px;
  }
  
  .episode-card {
    flex: 0 0 110px;
  }
  
  .episode-thumb {
    height: 65px;
  }
  
  .section-title {
    font-size: 16px;
  }
  
  .synopsis-subtitle {
    font-size: 15px;
  }
}

/* 演员详情弹窗样式 */
.actor-details-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: pointer; /* 添加指针样式，提示可点击 */
}

.actor-details-modal {
  background: var(--glass-background);
  background-color: white;
  border-radius: var(--card-radius);
  padding: 25px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  cursor: default; /* 恢复默认光标 */
}

.actor-details-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  color: var(--gray-color);
  line-height: 1;
  transition: transform 0.3s, color 0.3s;
  width: 40px; /* 增大点击区域 */
  height: 40px; /* 增大点击区域 */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 1010; /* 提高层级，确保可点击 */
}

.actor-details-close:hover {
  color: var(--primary-color);
  transform: rotate(90deg);
  background-color: rgba(255, 255, 255, 0.3);
}

.actor-details-content {
  display: flex;
  gap: 20px;
}

.actor-details-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.3);
  border: 3px solid white;
}

.actor-details-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.actor-details-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--light-gray);
  color: var(--gray-color);
}

.actor-details-no-image i {
  font-size: 40px;
  opacity: 0.7;
}

.actor-details-info {
  flex-grow: 1;
}

.actor-details-info h4 {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: var(--dark-color);
  position: relative;
  padding-bottom: 8px;
}

.actor-details-info h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.actor-details-info .actor-original-name {
  color: var(--gray-color);
  font-size: 14px;
  margin: 0 0 15px 0;
}

.actor-details-info .actor-character {
  color: var(--dark-color);
  font-size: 15px;
  margin: 0;
  padding: 8px 0;
  border-top: 1px dashed rgba(124, 58, 237, 0.2);
}

@media (max-width: 576px) {
  .actor-details-modal {
    padding: 20px;
  }
  
  .actor-details-image {
    width: 80px;
    height: 80px;
  }
  
  .actor-details-info h4 {
    font-size: 18px;
  }
  
  .episodes-carousel-container {
    padding: 10px;
  }
  
  .synopsis-section {
    padding: 15px;
  }
  
  .actors-section {
    padding: 15px;
  }
}

/* 当模态框打开时，整个演职人员区域指针样式 */
.actors-section {
  position: relative;
}

/* 保持演员头像的正常光标 */
.actor-avatar {
  cursor: pointer;
}

/* 添加模态框样式 */
/* 自定义模态框 */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 图片预览模态框 */
.modal-image-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.preview-large-image {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--card-radius);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  border: 3px solid rgba(255, 255, 255, 0.8);
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.image-close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  background: white;
  color: var(--dark-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
  opacity: 0.8;
  transition: all 0.3s ease;
  border: none;
}

.image-close-btn:hover {
  opacity: 1;
  transform: rotate(90deg);
}


/* 添加图片加载相关样式 */
.image-display-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.main-image {
  max-width: 100% !important;
  max-height: 400px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  transition: transform 0.3s ease; /* 添加切换时的平滑过渡 */
}

/* 添加图片切换的过渡效果 */
.main-image:hover {
  transform: scale(1.02); /* 轻微放大效果，增加交互感 */
}

/* 添加旋转动画 */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}