* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f9f9fb;
}

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

/* 头部 */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

header h1 {
  font-size: 3.2rem;
  margin-bottom: 0.3rem;
}

.slogan {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  padding: 0.6rem 0;
  position: relative;
  transition: all 0.3s;
}

nav a:hover,
nav a.active {
  color: #ffe066;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: #ffe066;
  transition: all 0.3s;
  transform: translateX(-50%);
}

nav a:hover::after,
nav a.active::after {
  width: 80%;
}

/* 英雄区 */
.hero {
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.5)), url('images/class-group.jpg') center/cover no-repeat;
  color: white;
  padding: 8rem 0;
  text-align: center;
}

.hero h2 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  background: #ffe066;
  color: #333;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
}

.btn:hover {
  background: #ffdb4d;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* 卡片区 */
.highlights {
  padding: 4rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-8px);
}

.card h3 {
  color: #667eea;
  margin-bottom: 1rem;
}

/* 页脚 */
footer {
  background: #2d2d44;
  color: #ccc;
  text-align: center;
  padding: 2.5rem 0;
  margin-top: 3rem;
}

footer .small {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 0.8rem;
}

/* 响应式 */
@media (max-width: 768px) {
  header h1 { font-size: 2.6rem; }
  .hero h2  { font-size: 2.8rem; }
  nav ul    { flex-direction: column; gap: 1rem; }
}

.music-player {
  margin-top: 1rem;
  padding: 0.8rem;
  background: #f8f9ff;
  border-radius: 10px;
  border: 1px solid #e0e7ff;
}

.music-player audio {
  margin: 0 auto;
  display: block;
}

/* 手机上更友好 */
@media (max-width: 600px) {
  .music-player audio {
    width: 100%;
  }
}

.music-player-container {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9ff;
  border-radius: 10px;
  border: 1px solid #e0e7ff;
}

.player-title {
  text-align: center;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.player-controls button {
  padding: 0.5rem 1rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.player-controls button:hover {
  background: #5a5fd9;
}

.current-song {
  font-weight: 500;
  min-width: 120px;
  text-align: center;
}

.main-audio {
  width: 100%;
  max-width: 320px;
  display: block;
  margin: 0.8rem auto;
}

.song-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  max-height: 180px;
  overflow-y: auto;
}

.song-list li {
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}

.song-list li:hover {
  background: #eef2ff;
}

.song-list li.active {
  background: #d1e0ff;
  font-weight: 600;
  color: #2d2d44;
}

/* 折叠容器 */
.music-player-fold {
  margin-top: 1rem;
}

/* 标题/按钮 */
.fold-header {
  display: block;
  padding: 0.8rem 1rem;
  background: #667eea;
  color: white;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: 
    background 0.3s ease,
    border-radius 0.4s ease;
  user-select: none;
  position: relative;
}

.fold-header:hover {
  background: #5a5fd9;
}

/* 内容区域 - 关键过渡属性 */
.fold-content {
  /* 初始状态 */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-12px);          /* 轻微向上偏移，展开时更自然 */
  
  /* 过渡属性 - 同时作用多个属性 */
  transition: 
    max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.45s ease-out 0.1s,           /* 延迟一点出现 */
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.45s ease;
  
  background: #f8f9ff;
  border: 1px solid #e0e7ff;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* 展开状态 */
.fold-toggle:checked ~ .fold-content {
  max-height: 800px;          /* 根据你的实际内容设置一个足够大的值（比最大内容高即可） */
  opacity: 1;
  transform: translateY(0);
  padding: 1rem;
}

/* 箭头动画 */
.fold-header::after {
  content: '▼';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fold-toggle:checked + .fold-header::after {
  transform: translateY(-50%) rotate(180deg);
}