/* === 基础重置 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overscroll-behavior-y: contain;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  color: #fff;
  min-height: 100vh;
  line-height: 1.6;
}

/* === 导航栏 === */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: #d4a855;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #888;
  text-decoration: none;
  transition: color 0.3s;
  padding: 0.5rem 1rem;
}

.nav-link:hover, .nav-link.active {
  color: #d4a855;
}

/* === 广告位 === */
.ad-container {
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.ad-placeholder {
  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.2);
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.ad-top .ad-placeholder,
.ad-bottom .ad-placeholder {
  width: 728px;
  height: 90px;
  max-width: 100%;
}

.ad-sidebar {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
}

.ad-vertical {
  width: 160px;
  height: 600px;
}

/* === 主内容 === */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  padding-right: 180px;
}

.section {
  display: none;
}

.section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
}

/* === 分类标签 === */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 20px;
  color: #aaa;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-tab:hover, .filter-tab.active {
  background: #d4a855;
  color: #000;
}

/* === 壁纸网格 === */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.wallpaper-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16/9;
  background: rgba(255,255,255,0.05);
}

.wallpaper-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.wallpaper-card:hover img {
  transform: scale(1.05);
}

.wallpaper-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  opacity: 0;
  transition: opacity 0.3s;
}

.wallpaper-card:hover .card-overlay {
  opacity: 1;
}

.card-title {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.card-tags {
  font-size: 0.8rem;
  color: #aaa;
}

/* === 音乐列表 === */
.music-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 120px;
}

.music-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

.music-item:hover, .music-item.playing {
  background: rgba(212,168,85,0.2);
}

.music-cover {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255,255,255,0.1);
}

.music-info {
  flex: 1;
}

.music-title {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.music-meta {
  font-size: 0.85rem;
  color: #888;
}

.music-duration {
  color: #666;
  font-size: 0.9rem;
}

/* === 音乐播放器 === */
.music-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(20,20,30,0.95);
  backdrop-filter: blur(20px);
  padding: 1rem 2rem;
  display: none;
  align-items: center;
  gap: 1.5rem;
  z-index: 200;
}

.music-player.visible {
  display: flex;
}

.player-cover {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.1);
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-info {
  min-width: 150px;
}

.player-title {
  font-weight: bold;
  font-size: 0.95rem;
}

.player-artist {
  font-size: 0.8rem;
  color: #888;
}

.player-controls {
  display: flex;
  gap: 0.5rem;
}

.btn-control {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
}

.btn-control:hover {
  background: rgba(255,255,255,0.2);
}

.btn-play {
  width: 50px;
  height: 50px;
  background: #d4a855;
  color: #000;
}

.btn-play:hover {
  background: #e5b966;
}

.player-progress {
  flex: 1;
  max-width: 400px;
}

#progress-bar {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  cursor: pointer;
}

#progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #d4a855;
  border-radius: 50%;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.25rem;
}

/* === 弹窗 === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.modal.visible {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.modal-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.modal-actions {
  text-align: center;
  margin-top: 1rem;
}

.btn-download {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #d4a855;
  color: #000;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-download:hover {
  background: #e5b966;
}

/* === 关于页面 === */
.about-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 2rem;
}

.about-content h1 {
  margin-bottom: 2rem;
  color: #d4a855;
}

.about-content p {
  margin-bottom: 1rem;
  color: #aaa;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.social-link {
  padding: 0.75rem 1.5rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 25px;
  transition: all 0.3s;
}

.social-link:hover {
  background: #d4a855;
  color: #000;
}

/* === 页脚 === */
.footer {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 0.9rem;
}

/* === 响应式 === */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .nav-link {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
  
  .ad-sidebar {
    display: none;
  }
  
  .main-content {
    padding: 1rem;
    padding-right: 1rem;
  }
  
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .music-player {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  
  .player-cover {
    width: 40px;
    height: 40px;
  }
  
  .player-info {
    min-width: 80px;
  }
  
  .player-title {
    font-size: 0.85rem;
  }
  
  .player-progress {
    display: none;
  }
  
  .btn-control {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .btn-play {
    width: 40px;
    height: 40px;
  }
}

/* === 占位内容样式 === */
.placeholder-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2a2a4a, #1a1a3a);
  color: #666;
  font-size: 0.8rem;
}
