* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 滚动条样式美化 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(135, 206, 235, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(135, 206, 235, 0.8);
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  background: #f0f2f5;
  background-image: url("./images/background.jpg");
  /* 新增 */
  background-size: cover;
  background-attachment: scroll;
  background-position: top;
}

.nav {
  background: linear-gradient(135deg, #87CEEB, #FFB6C1);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  /* 新增固定定位 */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.lnk-jump {
  color: #39ca1f;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.3s;
}

.main-content {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  gap: 2rem;
  margin-top: 7%;
}

.top {
  background: rgba(255, 255, 255, 0.4);
  padding: 4rem 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.card-background {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.card {
  background: rgba(255, 255, 255, 0.4);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
  }
}

/* 音乐播放器样式 */
#music-player {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.player-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 歌词容器样式 */
.lyrics-container {
  height: 120px;
  overflow-y: auto;
  scroll-behavior: smooth;
  position: relative;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.lyrics {
  text-align: center;
  transition: transform 0.3s ease-out;
}

.lyrics p {
  padding: 0.25rem 0;
  margin: 0;
  font-size: 0.9rem;
  color: #333;
  opacity: 0.7;
}

.lyrics p.active {
  font-size: 1.1rem;
  font-weight: bold;
  color: #87CEEB;
  opacity: 1;
  transform: scale(1.05);
}

.song-info {
  text-align: center;
}

#song-title {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

#song-artist {
  font-size: 0.9rem;
  color: #666;
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#progress-bar {
  flex: 1;
  height: 5px;
  accent-color: #87CEEB;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.buttons button {
  background: rgba(135, 206, 235, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.buttons button:hover {
  background: rgba(135, 206, 235, 1);
  transform: scale(1.1);
}

/* 音乐库样式 */
#music-library {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-container {
  display: flex;
  gap: 0.5rem;
}

#search-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
}

#search-btn {
  padding: 0.5rem 1rem;
  background: rgba(135, 206, 235, 0.7);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

#search-btn:hover {
  background: rgba(135, 206, 235, 1);
}

.song-list {
  max-height: 300px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  padding: 0.5rem;
}

.song-item {
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.3s;
}

.song-item:hover {
  background: rgba(135, 206, 235, 0.3);
}

.song-item.active {
  background: rgba(135, 206, 235, 0.5);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

.pagination button {
  padding: 0.25rem 0.5rem;
  background: rgba(135, 206, 235, 0.7);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.pagination button:hover {
  background: rgba(135, 206, 235, 1);
}

.pagination button:disabled {
  background: rgba(200, 200, 200, 0.5);
  cursor: not-allowed;
}

/* 在style标签中修改 */
.iframe-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin-top: 1rem;
}

iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  /* 新增透明背景 */
}