:root {
  --primary-color: #4f46e5;
  --primary-hover: #3c35b5;
  --secondary-color: #f59e0b;
  --dark-color: #1f2937;
  --light-color: #f3f4f6;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
}

body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #1f2937;
  background-color: #f9fafb;
}

/* 视频播放器容器样式 */
.video-container {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.video-container:hover {
  transform: translateY(-5px);
}

.video-container video {
  width: 100%;
  display: block;
}

.digital-human-card {
  transition: all 0.3s ease;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  height: 100%;
}

.digital-human-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.blurred-image {
  filter: blur(3px);
}

.badge-premium {
  background-color: var(--primary-color);
  color: white;
}

.badge-free {
  background-color: var(--success-color);
  color: white;
}

.nav-link.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.sidebar {
  background-color: white;
  border-right: 1px solid #e5e7eb;
  height: 100vh;
  position: fixed;
  width: 240px;
}

.main-content {
  margin-left: 240px;
}

.custom-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.language-toggle {
  cursor: pointer;
}

.script-editor {
  min-height: 200px;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 0.75rem;
}

.video-preview {
  aspect-ratio: 9/16;
  background-color: #000;
  border-radius: 0.5rem;
}

.avatar-upload {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.showcase-frame {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.showcase-title {
  background-color: #f3f4f6;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
}

.showcase-content {
  padding: 1rem;
  max-height: 600px;
  overflow-y: auto;
}

.preview-iframe {
  width: 100%;
  height: 600px;
  border: none;
}

/* 技术支持页面样式 */
.contact-info h6 {
  color: var(--primary-color);
  font-weight: 600;
}

.contact-info p {
  color: var(--dark-color);
  margin-bottom: 0;
}

.contact-form {
  background-color: #f9fafb;
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.contact-form h6 {
  color: var(--primary-color);
  font-weight: 600;
}

/* 公司介绍页面样式 */
.about-section h6 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--primary-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.timeline-date {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.timeline-content h6 {
  color: var(--dark-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-content p {
  color: #6b7280;
  margin-bottom: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .timeline {
    padding-left: 1.5rem;
  }
  
  .timeline-item::before {
    left: -1.5rem;
  }
  
  .video-container {
    margin: 1.5rem auto;
    max-width: 90%;
    border-radius: 1rem;
  }
}

/* Logo样式 */
.navbar-brand img {
  border-radius: 10px;
  height: 32px;
}

.navbar-brand img:hover {
  opacity: 0.9;
}

/* 可点击区域样式 */
.clickable-card {
  cursor: pointer;
  transition: all 0.2s ease;
}

.clickable-card:hover {
  opacity: 0.9;
}

/* 数字人预览图片容器样式 */
.digital-human-image-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%; /* 改为正方形比例 */
  overflow: hidden;
  background-color: #f8f9fa;
  border-radius: 0.5rem 0.5rem 0 0;
}

.digital-human-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 改为cover以填充容器 */
  background-color: #f8f9fa;
  transition: all 0.3s ease;
}

/* 为纵向图片设置不同的容器比例 */
.digital-human-image-container .digital-human-preview[data-orientation="portrait"] {
  object-position: center top; /* 调整为顶部对齐 */
}

/* 为横向图片设置不同的容器比例 */
.digital-human-image-container .digital-human-preview[data-orientation="landscape"] {
  object-position: center;
}

/* 添加播放按钮样式 */
.play-button-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 2;
  cursor: pointer;
}

.play-button-overlay:hover {
  opacity: 1;
}

.play-button {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.play-button i {
  color: var(--primary-color);
  font-size: 20px;
  margin-left: 4px; /* 微调播放图标的位置 */
}

/* 当鼠标悬停时显示播放按钮 */
.digital-human-image-container:hover .play-button-overlay {
  opacity: 1;
}

/* 优化视频播放弹窗 */
.video-modal .modal-content {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.video-modal .modal-header {
  background-color: var(--primary-color);
  color: white;
  border-bottom: none;
  padding: 0.75rem 1.5rem;
}

.video-modal .modal-header .btn-close {
  color: white;
  filter: invert(1) brightness(200%);
}

.video-modal .video-container {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.video-modal .modal-body {
  padding: 0;
}

.video-modal video {
  width: 100%;
  display: block;
  background-color: #000;
  max-height: 70vh;
}

/* 卡片鼠标悬停效果 */
.card:hover .digital-human-preview {
  transform: scale(1.05);
}

/* 训练中数字人样式 */
.training-avatar-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: #f8f9fa;
  min-height: 180px;
  position: relative;
}

/* 可点击的训练中数字人卡片样式 */
.training-avatar-container[onclick] {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.training-avatar-container[onclick]:hover {
  background-color: #edf0f2;
}

.training-avatar-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #e9ecef;
  margin-bottom: 15px;
}

.training-avatar-placeholder i {
  font-size: 48px;
  color: #adb5bd;
}

/* 训练中数字人播放按钮 */
.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  background-color: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  border-radius: 4px;
}

.play-overlay:hover {
  opacity: 1;
}

.play-icon i {
  color: #0d6efd;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
  transition: transform 0.2s ease;
}

.play-overlay:hover .play-icon i {
  transform: scale(1.2);
}

/* 不同训练状态的样式 */
.badge.bg-danger {
  background-color: #dc3545 !important;
}

.badge.bg-secondary {
  background-color: #6c757d !important;
}

.badge.bg-primary {
  background-color: #0d6efd !important;
}

/* 拒绝状态的特殊样式 */
.digital-human-card:has(.badge .fa-times-circle) .training-avatar-placeholder {
  border: 2px solid #dc3545;
}

/* 待训练状态的特殊样式 */
.digital-human-card:has(.badge .fa-clock) .training-avatar-placeholder {
  border: 2px solid #6c757d;
}

/* 训练中状态的特殊样式 */
.digital-human-card:has(.badge .fa-cog) .training-avatar-placeholder {
  border: 2px solid #0d6efd;
}

/* 删除按钮样式 */
.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-danger:hover {
  background-color: #bb2d3b;
  border-color: #b02a37;
} 