html {
  scroll-behavior: smooth; /* 启用平滑滚动 */
}

:root {
        --primary-color: #1a1a2e;
        --secondary-color: #16213e;
        --accent-color: #0f3460;
        --highlight-color: #e94560;
        --light-color: #f9fafc;
        --text-color: #2e2e3a;
        --text-light: #6c6c7c;
        --shadow-light: rgba(0, 0, 0, 0.08);
        --transition-speed: 0.25s;
      }
      
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow-x: hidden; /* 只隐藏水平滚动条 */
position: relative; /* 确保滚动参考点是body */
}

body {
background-color: var(--light-color);
color: var(--text-color);
font-weight: 400;
line-height: 1.6;
max-width: 1200;
padding-left: 60px; /* Leave space for collapsed sidebar */
transition: padding-left 0.3s ease;
}

/* 添加到你的style.css */
section {
  scroll-margin-top: 80px; /* 与导航栏高度匹配 */
  padding: 40px 0; /* 添加垂直间距 */
}

.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}

.side-nav {
position: fixed;
top: 0;
left: 0;
width: 60px;
height: 100vh;
background-color: var(--primary-color);
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
transition: width 0.3s ease;
z-index: 999;
box-sizing: border-box;
box-shadow: 2px 0 8px var(--shadow-light);
}

.side-nav:hover {
width: 180px;
}

.side-nav .icon-wrapper {
width: 100%;
padding: 18px 14px;
display: flex;
align-items: center;
color: #f0f0f5;
cursor: pointer;
transition: background-color var(--transition-speed);
border-radius: 0 12px 12px 0;
user-select: none;
}

.side-nav .icon-wrapper:hover {
background-color: var(--accent-color);
}

.side-nav .icon-wrapper i {
font-size: 20px;
margin-right: 10px;
width: 20px;
text-align: center;
}

.side-nav .icon-wrapper span {
display: none;
font-size: 14px;
white-space: nowrap;
color: white;
}

.side-nav:hover .icon-wrapper span {
display: inline;
}

.side-nav .lang-btn {
margin-top: auto;
margin-bottom: 20px;
width: 80%;
font-size: 14px;
padding: 8px 12px;
border: 2px solid white;
background-color: transparent;
color: white;
border-radius: 5px;
cursor: pointer;
transition: all 0.3s;
}

.side-nav .lang-btn:hover {
background-color: var(--highlight-color);
border-color: var(--highlight-color);
}

.lang-full {
display: none;
transition: opacity 0.2s ease 0.2s;
margin-left: 5px;
}

.lang-short {
display: inline;
transition: opacity 0.2s ease;
}

/* Show full text only when sidebar is fully expanded */
.side-nav:hover .lang-full {
display: inline;
opacity: 1;
}

.side-nav:hover .lang-short {
display: none;
opacity: 0;
}

/* Header Styles */
header {
background-color: var(--primary-color);
color: white;
padding: 20px 0;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: relative;
z-index: 1;
}

nav {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.language-switch {
margin-left: auto;
margin-top: 10px;
}

.logo {
font-size: 24px;
font-weight: bold;
color: white;
text-decoration: none;
}

.nav-links {
display: flex;
list-style: none;
}

.nav-links li {
margin-left: 30px;
}

.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}

.nav-links a:hover {
color: var(--highlight-color);
}

/* Hero Section */
.hero {
/* Example background image */
background-image: url('/assets/images/hero-bg.png');
background-size: cover;     /* Make the image cover the whole hero */
background-position: center; /* Center the image */
background-repeat: no-repeat;

/* Optional overlay if you want darken or color filter */
position: relative;
color: white; /* Make text white for contrast */

/* Padding and height to suit your design */
padding: 100px 0;
text-align: center;
/* You can set a min-height */
min-height: 300px;
}
.hero::before {
content: "";
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0, 0, 0, 0.4); /* semi-transparent black overlay */
z-index: 0;
}

.hero .container {
position: relative;
z-index: 1; /* keep text above the overlay */
}

.hero h1 {
font-size: 48px;
margin-bottom: 20px;
}

.hero p {
font-size: 20px;
max-width: 700px;
margin: 0 auto 30px;
}

.back-btn {
display: inline-block;
margin-top: 20px;
background-color: var(--highlight-color);
color: white;
padding: 10px 20px;
text-decoration: none;
border-radius: 5px;
transition: background-color 0.3s ease;
}
.back-btn:hover {
background-color: #d13354;
}

.video-wrapper {
width: 100%;
max-width: none;
margin: 0;
}

.video-wrapper video {
width: 100%;
height: auto;
max-width: 100%;
border-radius: 10px;
}


.video-layout {
display: flex;
gap: 30px;
margin-top: 40px;
}

.video-main {
flex: 0 0 75%;
}

.video-sidebar {
flex: 1;
background-color: #ffffff;
border-radius: 10px;
padding: 20px;
box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.video-sidebar h2 {
margin-bottom: 15px;
font-size: 20px;
color: var(--primary-color);
}

.episode-list {

width: 100%;
padding-left: 20px;
box-sizing: border-box;
}

.episode-list h3 {
margin-bottom: 15px;
color: var(--primary-color);
}

.episode-item {
display: flex;
align-items: center;
margin-bottom: 15px;
cursor: pointer;
background-color: #7cadd7;
padding: 8px;
border-radius: 8px;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
transition: background-color 0.2s ease;
}

.episode-item:hover {
background-color: var(--accent-color);
color: white;
}

.episode-item img {
width: 80px;
height: 45px;
object-fit: cover;
border-radius: 5px;
margin-right: 15px;
flex-shrink: 0;
}

.episode-item span {
font-weight: 600;
font-size: 16px;
}


.episode-list li {
margin-bottom: 10px;
}

.episode-list a {
text-decoration: none;
color: var(--accent-color);
transition: color 0.2s;
}

.episode-list a:hover {
color: var(--highlight-color);
}


.lang-btn {
display: flex;
align-items: center;
justify-content: center;
width: 80%;
font-size: 14px;
padding: 8px 12px;
border: 2px solid white;
background-color: transparent;
color: white;
border-radius: 5px;
cursor: pointer;
margin-top: auto;
margin-bottom: 20px;
transition: all 0.3s ease;
white-space: nowrap;
overflow: hidden;
}

.lang-btn:hover {
background-color: var(--highlight-color);
border-color: var(--highlight-color);
}

.btn {
display: inline-block;
background-color: var(--highlight-color);
color: white;
padding: 12px 30px;
border-radius: 5px;
text-decoration: none;
font-weight: bold;
transition: background-color 0.3s;
}

.btn:hover {
background-color: #d13354;
}

.series-intro {
background-color: #f7f9fc;
padding: 3rem 1.5rem;
border-top: 4px solid #003366;
border-bottom: 4px solid #003366;
}

.series-intro h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: #003366;
text-align: center;
}

.series-intro p {
font-size: 1.05rem;
line-height: 1.8;
color: #333;
max-width: 800px;
margin: 0 auto 1.2rem auto;
text-align: justify;
}

.series-intro .highlight {
font-weight: bold;
color: #005e99;
font-size: 1.1rem;
text-align: center;
}


/* Upload Section */
.upload-section {
padding: 80px 0;
background-color: white;
}

.section-title {
text-align: center;
margin-bottom: 50px;
color: var(--primary-color);
}

.upload-container {
background-color: var(--light-color);
border-radius: 10px;
padding: 40px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
max-width: 800px;
margin: 0 auto;
}

.upload-area {
border: 2px dashed var(--accent-color);
border-radius: 5px;
padding: 40px;
text-align: center;
cursor: pointer;
transition: background-color 0.3s;
margin-bottom: 20px;
}

.upload-area:hover {
background-color: rgba(15, 52, 96, 0.05);
}

.upload-icon {
font-size: 50px;
color: var(--accent-color);
margin-bottom: 20px;
}

.upload-text {
margin-bottom: 20px;
}

.file-input {
display: none;
}

.upload-form {
margin-top: 30px;
}

.form-group {
margin-bottom: 20px;
}

.form-group label {
display: block;
margin-bottom: 8px;
font-weight: bold;
}

.form-control {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 16px;
}

textarea.form-control {
min-height: 120px;
resize: vertical;
}

/* Documentaries Section */
.documentaries-section {
  padding-top: 48px;
  padding-bottom: 120px;
  background-color: var(--light-color);
}

.documentaries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding-top: 16px;
  padding-bottom: 32px;
}

.documentary-card {
background-color: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
transition: transform 0.3s;
text-decoration: none; /* Removes underline */
color: inherit; /* Makes text color stay as defined, not blue */
}
.documentary-card h3,
.documentary-card p {
text-decoration: none;
}

.documentary-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-10px);
}

.card-thumbnail {
  height: 300px; /* 或 280px，根据你喜欢的效果调整 */
  background-color: var(--secondary-color);
  position: relative;
  overflow: hidden;
}
.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 50px;
color: white;
opacity: 0.8;
}

.card-content {
padding: 20px;
}

.card-title {
font-size: 20px;
margin-bottom: 10px;
color: var(--primary-color);
}

.card-description {
color: #666;
margin-bottom: 15px;
}

.card-meta {
display: flex;
justify-content: space-between;
color: #888;
font-size: 14px;
}

/* Contribute */
.contribute-section {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.contribute-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.contribute-text {
  flex: 1;
}

.contribute-image {
  max-width: 400px;  /* 容器最大宽度 */
  max-height: 800px; /* 容器最大高度 */
  width: 100%;       /* 自适应父容器 */
  overflow: hidden;  /* 防止内容溢出 */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contribute-image img {
  width: 100%;      /* 图片填满容器 */
  height: auto;     /* 保持原始比例 */
  object-fit: cover; /* 可选：保持比例填充容器 */
}

.contribute-list {
  padding-left: 20px;
  margin: 15px 0;
}

.contribute-list li {
  margin-bottom: 10px;
}

.highlight {
  font-style: italic;
  color: #555;
  margin-top: 20px;
}

/* Footer */
footer {
background-color: var(--primary-color);
color: white;
padding: 50px 0 20px;
}

.footer-content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 30px;
margin-bottom: 40px;
}

.footer-column h3 {
margin-bottom: 20px;
font-size: 18px;
}

.footer-links {
list-style: none;
}

.footer-links li {
margin-bottom: 10px;
}

.footer-links a {
color: #ddd;
text-decoration: none;
transition: color 0.3s;
}

.footer-links a:hover {
color: var(--highlight-color);
}

.copyright {
text-align: center;
padding-top: 20px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
color: #aaa;
font-size: 14px;
}



/* 手机版适配 */
@media (max-width: 768px) {
.container {
  max-width: 90%; /* 手机版变窄 */
}

/* 调整导航栏、卡片等元素的布局 */
.side-nav {
  width: 60px; /* 侧边导航变窄 */
}

.documentaries-grid {
  grid-template-columns: 1fr; /* 手机版单列显示 */
}

.card-thumbnail {
  height: 180px;
}
}

.icon-img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  margin-right: 6px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

.external-links {
  margin-top: 10px;
  display: flex;
  gap: 12px;
}

.link-btn {
  display: flex;
  align-items: center;
  background: #f3f6fa;
  border: none;
  border-radius: 22px;
  padding: 6px 18px 6px 12px;
  cursor: pointer;
  font-size: 1em;
  color: #1a1a2e;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: background 0.18s, box-shadow 0.18s;
  outline: none;
}

.link-btn:hover {
  background: #e0e7ef;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.icon-img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

.card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-description {
  margin-bottom: 0; /* 避免和按钮重复留白 */
}

.external-links {
  margin-top: 12px;
  margin-bottom: 0;
}

.card-meta {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  gap: 16px;
  color: #888;
  font-size: 14px;
}

.documentary-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* 不要设置 min-height，除非你想所有卡片一样高 */
}

.card-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  /* 不要设置 min-height，除非你想所有卡片一样高 */
}

.card-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  gap: 10px;
  padding-top: 18px;
}

.external-links {
  display: flex;
  gap: 12px;
  margin: 0;
}

.card-meta {
  display: flex;
  gap: 16px;
  color: #888;
  font-size: 14px;
  width: 100%;
}
