/* 加运音乐 - 深色华丽主题样式 */
:root {
  --primary: #9b59b6;
  --primary-light: #8e44ad;
  --primary-dark: #7d3c98;
  --accent: #e74c3c;
  --accent2: #f39c12;
  --bg-dark: #0a0a0f;
  --bg-card: #151520;
  --bg-card-hover: #1e1e2a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --border: #2a2a3a;
  --shadow: rgba(0, 0, 0, 0.5);
  --gradient-primary: linear-gradient(135deg, #9b59b6, #e74c3c);
  --gradient-bg: linear-gradient(180deg, #0a0a0f 0%, #151525 100%);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

#app { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  width: 240px;
  background: rgba(15, 15, 25, 0.95);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.logo {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.nav-item:hover, .nav-item.active {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(155, 89, 182, 0.2), transparent);
  border-left: 3px solid var(--primary);
}

.nav-icon { font-size: 18px; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.copyright {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-level {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-login, .btn-logout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.btn-logout { padding: 4px 8px; font-size: 11px; }

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 24px 32px;
  padding-bottom: 100px;
  min-height: 100vh;
}

/* 播放栏 */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 240px;
  right: 0;
  height: 80px;
  background: rgba(10, 10, 20, 0.98);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 240px;
}

.album-cover {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

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

.album-cover.playing img {
  animation: rotate 20s linear infinite;
}

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

.cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.album-cover:hover .cover-overlay { opacity: 1; }

.btn-play-mini {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.song-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-artist {
  font-size: 12px;
  color: var(--text-secondary);
}

.player-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-control {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-primary);
  transition: transform 0.2s;
}

.btn-control:hover { transform: scale(1.1); }

.btn-play {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.progress-section {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 600px;
}

.time-current, .time-total {
  font-size: 11px;
  color: var(--text-muted);
  width: 40px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.progress-played {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  position: relative;
  width: 0%;
  transition: width 0.1s;
}

.progress-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--text-primary);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.progress-bar:hover .progress-thumb { opacity: 1; }

.player-extra {
  display: flex;
  align-items: center;
  gap: 16px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-volume {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.volume-bar {
  width: 80px;
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  cursor: pointer;
}

.volume-level {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  width: 80%;
}

.btn-mode, .btn-lyric, .btn-queue {
  background: var(--bg-card);
  border: none;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.btn-mode:hover, .btn-lyric:hover, .btn-queue:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* 面板 */
.lyric-panel, .queue-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: calc(100vh - 80px);
  background: rgba(15, 15, 25, 0.98);
  border-left: 1px solid var(--border);
  z-index: 999;
  transition: right 0.3s;
  display: flex;
  flex-direction: column;
}

.lyric-panel.show, .queue-panel.show { right: 0; }

.lyric-header, .queue-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
}

.lyric-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  text-align: center;
}

.lyric-line {
  padding: 12px 0;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.lyric-line.active {
  color: var(--primary);
  font-size: 18px;
  font-weight: 500;
}

.queue-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.queue-item:hover { background: var(--bg-card); }
.queue-item.active { background: var(--bg-card-hover); }

.queue-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-artist {
  font-size: 11px;
  color: var(--text-muted);
}

.queue-remove {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
}

.queue-item:hover .queue-remove { opacity: 1; }

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal.show { display: flex; }

.modal-content {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  position: relative;
  animation: modalIn 0.3s;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo img {
  width: 80px;
  height: 80px;
  border-radius: 16px;
}

.auth-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.form-group {
  margin-bottom: 16px;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-primary:hover { transform: scale(1.02); }

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-secondary.liked {
  background: rgba(231, 76, 60, 0.2);
  border-color: var(--accent);
}

.hidden { display: none; }

/* Toast */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 20px var(--shadow);
  opacity: 0;
  transition: all 0.3s;
  z-index: 3000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success { border-left: 3px solid #2ecc71; }
.toast.error { border-left: 3px solid var(--accent); }

/* 页面样式 */
.page { animation: fadeIn 0.3s; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading {
  text-align: center;
  padding: 60px;
  color: var(--text-secondary);
}

.error {
  text-align: center;
  padding: 60px;
  color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 60px;
  color: var(--text-secondary);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 600;
}

/* Hero区 */
.hero-section {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.2), rgba(231, 76, 60, 0.2));
  border-radius: 16px;
  padding: 48px;
  margin-bottom: 32px;
  text-align: center;
}

.hero-content h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

.hero-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.search-box-large {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
}

.search-box-large input {
  flex: 1;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text-primary);
  font-size: 15px;
}

.search-box-large button {
  padding: 14px 28px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 24px;
  color: white;
  cursor: pointer;
}

/* 区块 */
.section { margin-bottom: 40px; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 22px;
}

.more-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
}

.more-link:hover { color: var(--primary); }

/* 歌曲卡片 */
.song-grid, .playlist-grid, .mv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.song-card, .playlist-card, .mv-card {
  cursor: pointer;
  transition: transform 0.2s;
}

.song-card:hover, .playlist-card:hover, .mv-card:hover {
  transform: translateY(-4px);
}

.song-cover, .playlist-cover, .mv-cover {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.song-cover img, .playlist-cover img, .mv-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-overlay, .playlist-overlay, .mv-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.song-card:hover .song-overlay,
.playlist-card:hover .playlist-overlay,
.mv-card:hover .mv-overlay {
  opacity: 1;
}

.btn-play-song {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-count, .playlist-count {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.mv-play {
  font-size: 32px;
}

.mv-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.song-card h4, .playlist-card h4, .mv-card h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-card p, .playlist-card p, .mv-card p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 分类标签 */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-tag {
  padding: 10px 20px;
  background: var(--bg-card);
  border-radius: 20px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.category-tag:hover {
  background: var(--primary);
}

/* MV卡片 */
.mv-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.mv-cover {
  aspect-ratio: 16/9;
}

/* 歌手卡片 */
.singer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}

.singer-card {
  text-align: center;
  cursor: pointer;
}

.singer-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid var(--border);
  transition: border-color 0.2s;
}

.singer-card:hover img {
  border-color: var(--primary);
}

/* 歌曲列表 */
.song-list {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
}

.song-row {
  display: grid;
  grid-template-columns: 50px 1fr 100px 100px 60px;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.song-row:hover { background: var(--bg-card-hover); }

.song-row img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

.row-num { color: var(--text-muted); font-size: 14px; }
.row-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-artist, .row-album { font-size: 12px; color: var(--text-secondary); }
.row-duration { font-size: 12px; color: var(--text-muted); text-align: right; }

/* 排行榜 */
.ranking-list .song-row {
  grid-template-columns: 60px 50px 1fr 100px 100px 60px;
}

.row-rank {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
}

.row-rank.top1 { color: #e74c3c; }
.row-rank.top2 { color: #f39c12; }
.row-rank.top3 { color: #3498db; }

/* 详情页 */
.detail-header {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.detail-cover {
  width: 240px;
  height: 240px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 32px var(--shadow);
}

.detail-info h1 {
  font-size: 32px;
  margin-bottom: 12px;
}

.detail-info p {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

.detail-stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* 评论 */
.comment-input {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.comment-input img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.comment-input textarea {
  flex: 1;
  padding: 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  resize: none;
}

.comment-input button {
  padding: 8px 20px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-item {
  display: flex;
  gap: 12px;
}

.comment-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.comment-user {
  font-size: 13px;
  margin-bottom: 4px;
}

.comment-user span {
  color: var(--text-muted);
  font-size: 11px;
}

.comment-text {
  font-size: 14px;
  line-height: 1.5;
}

/* MV播放页 */
.mv-detail .mv-player {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.mv-video {
  width: 100%;
  height: 100%;
}

/* 歌手详情 */
.singer-header {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 32px;
}

.singer-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--border);
}

/* 个人中心 */
.profile-header {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 32px;
}

.profile-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-stats {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.btn-edit {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
}

.profile-notice {
  background: rgba(243, 156, 18, 0.1);
  border: 1px solid rgba(243, 156, 18, 0.3);
  padding: 16px;
  border-radius: 8px;
  color: var(--accent2);
}

/* 认证徽章 */
.verify-badge {
  font-size: 14px;
  margin-left: 4px;
}

/* 播放按钮 */
.btn-play-all {
  background: var(--gradient-primary) !important;
  margin-bottom: 16px;
}

.like-actions {
  margin-bottom: 20px;
}

/* 专辑网格 */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.album-card {
  text-align: center;
}

.album-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 8px;
}

.album-card h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.album-card p {
  font-size: 12px;
  color: var(--text-muted);
}

/* 复选框 */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  cursor: pointer;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
}

/* 响应式 */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .player-bar { left: 0; }
  .hero-section { padding: 24px; }
  .hero-content h1 { font-size: 24px; }
  .song-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-header { flex-direction: column; align-items: center; text-align: center; }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .lyric-panel, .queue-panel { width: 100%; right: -100%; }
}
