/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 全局变量 */
:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  --background-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  --card-background: rgba(255, 255, 255, 0.95);
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-radius: 16px;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition: all 0.3s ease;
}

/* 基础样式 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--background-gradient);
  color: var(--text-primary);
  min-height: 100vh;
}

/* 主应用容器 */
#root {
  min-height: 100vh;
}

/* 布局容器 */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 导航栏 */
.navbar {
  background: var(--card-background);
  box-shadow: var(--box-shadow);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}

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

/* 认证按钮 */
.auth-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 主内容区域 */
.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* 页面标题 */
.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

/* 卡片样式 */
.card {
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 歌单卡片 */
.playlist-card {
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.playlist-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  transition: var(--transition);
}

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

.playlist-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.playlist-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* 歌单网格 */
.playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

/* 表单样式 */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 歌曲列表 */
.song-list {
  list-style: none;
}

.song-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  transition: var(--transition);
}

.song-item:hover {
  background: rgba(99, 102, 241, 0.05);
}

.song-item:last-child {
  border-bottom: none;
}

.song-info {
  flex: 1;
}

.song-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.song-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.song-actions {
  display: flex;
  gap: 1rem;
}

/* 播放控制 */
.player {
  background: var(--card-background);
  padding: 1rem 2rem;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.now-playing img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.now-playing-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.now-playing-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.playback-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition);
}

.play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

/* 搜索栏 */
.search-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-bar input {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: 2px solid #e5e7eb;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 歌曲详情页样式 */
.song-detail-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background-gradient);
}

.song-detail-header {
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.back-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.5);
}

.song-detail-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.album-cover-container {
  margin-bottom: 3rem;
}

.album-cover {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

.song-info {
  margin-bottom: 3rem;
}

.song-info h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.song-info p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.lyrics-container {
  max-width: 800px;
  width: 100%;
  margin-bottom: 3rem;
  height: 200px;
  overflow: hidden;
}

.lyrics-scroll {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.3s ease;
}

.lyric-line {
  font-size: 1.1rem;
  line-height: 2;
  color: var(--text-secondary);
  transition: var(--transition);
}

.lyric-line.active {
  font-size: 1.3rem;
  color: var(--primary-color);
  font-weight: 600;
}

.playback-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.control-btn {
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.control-btn:hover {
  color: var(--primary-color);
  transform: scale(1.2);
}

.play-btn-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: var(--transition);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.play-btn-large:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

.player-actions {
  display: flex;
  gap: 2rem;
}

.action-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  color: var(--primary-color);
  transform: scale(1.2);
}

/* 热门歌曲列表样式 */
.hot-songs-section {
  margin-bottom: 3rem;
}

.songs-list {
  list-style: none;
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.songs-list .song-item {
  display: flex;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
  transition: var(--transition);
  cursor: pointer;
}

.songs-list .song-item:hover {
  background: rgba(99, 102, 241, 0.05);
  transform: translateX(4px);
}

.songs-list .song-item:last-child {
  border-bottom: none;
}

.song-rank {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 40px;
  text-align: center;
  margin-right: 2rem;
}

.songs-list .song-info {
  flex: 1;
  margin-bottom: 0;
}

.songs-list .song-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.songs-list .song-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.song-duration {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .playlists-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .player {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .playback-controls {
    gap: 1rem;
  }
  
  /* 歌曲详情页响应式 */
  .album-cover {
    width: 250px;
    height: 250px;
  }
  
  .song-info h1 {
    font-size: 2rem;
  }
  
  .song-info p {
    font-size: 1rem;
  }
  
  .lyric-line {
    font-size: 1rem;
  }
  
  .lyric-line.active {
    font-size: 1.2rem;
  }
  
  .playback-controls {
    gap: 1.5rem;
  }
  
  .play-btn-large {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
  }
}