/* -----------------------
   全局基础设置
------------------------ */
body {
  font-family: 'Arial', sans-serif;
  background-color: #0b1e2d;
  color: #f8f8f8;
  margin: 0;
  padding: 0;
  border: 10px solid #f9c038;
  box-sizing: border-box;
}

/* -----------------------
   页眉
------------------------ */
header {
  background-color: #081620;
  color: #f9c038;
  text-align: center;
  padding: 20px 10px;
  font-family: 'Georgia', serif;
}

/* -----------------------
   页脚
------------------------ */
footer {
  background-color: #081620;
  color: #aaa;
  text-align: center;
  padding: 15px 10px;
  font-size: 14px;
}
footer a {
  color: #f9c038;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* -----------------------
   个人签名区域
------------------------ */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px 0;
}

.avatar-frame {
  background-color: white;
  border: 4px solid #f9c038;
  border-radius: 20px;
  padding: 10px;
  max-width: 720px;
}

.avatar-img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
}

.avatar-img:hover {
  transform: scale(1.15);
  opacity: 0.85;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* -----------------------
   简介文字
------------------------ */
.intro-text {
  max-width: 720px;
  margin: 30px auto 60px auto;
  padding: 0 20px;
  text-align: center;
  line-height: 1.7;
  font-size: 16px;
  color: #f0f0f0;
}

.intro-text h2 {
  color: #f9c038;
  margin-bottom: 15px;
  font-size: 24px;
}

/* -----------------------
   标题
------------------------ */
.section-title {
  text-align: center;
  color: #f9c038;
  font-size: 28px;
  margin: 40px 0 20px;
}

/* -----------------------
   作品集区域
------------------------ */
/* 鼠标悬停时轻微放大（仅非.active 项） */
.portfolio-item:hover:not(.active) {
  transform: scale(1.05);
  opacity: 0.7;
  z-index: 2;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.portfolio-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px; /* 增加按钮与作品之间间距 */
  margin: 0 auto 60px auto;
  max-width: 1000px;
  overflow: visible; /* ✅ 允许放大项不被遮挡 */
  position: relative;
  z-index: 10;
}

/* 滚动区（可扩展） */
.portfolio-scroll {
  display: flex;
  gap: 20px;
  width: 900px;
  justify-content: center;
  overflow: visible; /* ✅ 允许内容超出不裁剪 */
  position: relative;
  z-index: 1;
}

/* 单个作品卡片 */
.portfolio-item {
  width: 280px;
  height: 420px;
  background-color: white;
  border: 4px solid #f9c038;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
  color: #333;
  opacity: 0.3;
  transform: scale(0.9);
  transition: all 0.4s ease;
  cursor: default; /* 🚫 让鼠标变为普通箭头，表示不可交互 */
  z-index: 1;
}

.portfolio-item img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 20px;
  object-fit: cover;
  display: block;
}

/* 当前作品放大并浮于上层 */
.portfolio-item.active {
  opacity: 1;
  transform: scale(1.15);
  z-index: 5;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* 两侧作品略缩 */
.portfolio-item.prev,
.portfolio-item.next {
  opacity: 0.5;
  transform: scale(0.95);
}

/* -----------------------
   左右箭头按钮样式
------------------------ */
.scroll-btn {
  font-size: 32px;                 /* 使用 < > 字符 */
  font-weight: bold;
  background-color: #f9c038;
  color: #0b1e2d;
  border: none;
  border-radius: 10px;
  width: 60px;
  height: 60px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;        /* ✅ 垂直 + 水平居中箭头 */
  transition: background-color 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

.scroll-btn:hover {
  background-color: #ffda63;
  transform: scale(1.1);
}

/* -----------------------
   图片展示区
------------------------ */
.image-gallery {
  margin: 60px auto;
  text-align: center;
}

/* 纵向排列图片 */
.gallery-wrapper {
  display: flex;
  flex-direction: column; /* 改为纵向排列 */
  align-items: center;     /* 水平居中图片 */
  gap: 30px;
}

/* 每张图片项可设置最大宽度适配响应 */
.gallery-item {
  width: 90%;             /* 可根据需要设为固定宽度或百分比 */
  max-width: 600px;
}

/* 自适应缩略图展示 */
.gallery-img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3; /* 保持作品卡片比例 */
  object-fit: cover;
  border-radius: 15px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.gallery-img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
/* 点击查看大图的模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
  box-sizing: border-box;
}

/* 模态大图展示（自适应视窗） */
.modal img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

.modal.open {
  display: flex;
  cursor: zoom-out;
}

/* -----------------------
   图片展示区 - Gallery 部分
------------------------ */
.image-gallery {
  position: relative; /* 保证伪元素可以定位 */
  margin: 60px auto;
  text-align: center;
}

/* 在图库区域添加竖直装饰线 */
.image-gallery::before,
.image-gallery::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  background: linear-gradient(to top, #f9c038, rgba(0, 0, 0, 0));
  z-index: -1;
}

.image-gallery::before {
  left: 10%; /* 左侧渐变 */
}

.image-gallery::after {
  right: 10%; /* 右侧渐变 */
}

/* -----------------------
   音乐播放器固定样式
------------------------ */
.floating-music-player {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background-color: #0b1e2d;
  border: 2px solid #f9c038;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

#music-toggle {
  font-size: 24px;
  width: 40px;
  height: 40px;
  background-color: transparent;
  border: 2px solid #f9c038;
  color: #f9c038;
  border-radius: 50%;
  cursor: pointer;
}

/* -----------------------
   音量控制
------------------------ */
.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-bars {
  display: flex;
  gap: 4px;
}

.volume-bars .bar {
  width: 10px;
  height: 10px;
  background-color: #888;
  transition: background-color 0.3s, height 0.3s;
}

.volume-bars .bar[data-level="2"] { height: 14px; }
.volume-bars .bar[data-level="3"] { height: 18px; }
.volume-bars .bar[data-level="4"] { height: 22px; }
.volume-bars .bar[data-level="5"] { height: 26px; }

.volume-bars .bar.active {
  background-color: #f9c038;
}

.volume-control button {
  background: none;
  border: 2px solid #f9c038;
  color: #f9c038;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
}

/* -----------------------
   播放进度条样式
------------------------ */
.progress-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

#progress-bar {
  width: 150px;
  height: 8px;
  background: #ccc;
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
}

#progress-bar::-webkit-slider-thumb {
  height: 14px;
  width: 10px;
  background: #f9c038;
  border: none;
  border-radius: 3px;
  margin-top: -3px;
  appearance: none;
}

#current-time, #total-time {
  font-size: 12px;
  color: #f9c038;
}

/* ===== 联系表单样式 ===== */
.contact-section {
  max-width: 720px;
  margin: 60px auto;
  padding: 0 20px;
  color: #f0f0f0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-size: 16px;
  color: #f9c038;
}

.form-group input,
.form-group textarea {
  padding: 10px;
  font-size: 16px;
  border: 2px solid #f9c038;
  border-radius: 8px;
  background-color: #081620;
  color: #f0f0f0;
  resize: vertical;
}

.checkbox-group {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 5px;
}

.checkbox-group label {
  font-size: 14px;
  color: #ccc;
}

.submit-btn {
  align-self: flex-start;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #f9c038;
  color: #0b1e2d;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #ffda63;
}

/* ===== 模块分割线样式 ===== */
.section-divider {
  border: none;
  height: 2px;
  width: 80%;
  margin: 60px auto;
  background: linear-gradient(to right, #f9c038, #fff0 50%, #f9c038);
  opacity: 0.6;
}

/* ===== 左侧导航栏 ===== */
.side-nav {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  background-color: #081620;
  border-right: 2px solid #f9c038;
  padding: 20px 10px;
  z-index: 999;
  border-radius: 0 10px 10px 0;
}

.side-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-nav li {
  margin: 20px 0;
  text-align: center;
}

.side-nav a {
  color: #f9c038;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.side-nav a:hover {
  color: #ffffff;
}
