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

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f0f1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    --border-color: #2d2d44;
    --player-bg: #1e1e30;
    --sidebar-width: 220px;
    --player-height: 80px;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 主体区域（侧边栏+内容） */
.app-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 侧边栏样式 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.logo {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid var(--border-color);
}

.logo i {
    font-size: 24px;
    color: var(--accent-color);
}

.nav-menu {
    padding: 15px 0;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    margin: 5px 10px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
}

.nav-menu li.active a {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-color);
}

.nav-section {
    margin-top: 20px;
}

.nav-section h4 {
    padding: 10px 25px;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.add-playlist {
    cursor: pointer;
    font-size: 14px;
    opacity: 0.6;
}

.add-playlist:hover {
    opacity: 1;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 顶部栏 */
.top-bar {
    height: 60px;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--accent-color);
    background: rgba(139, 92, 246, 0.1);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vip-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.vip-btn:hover {
    transform: scale(1.05);
}

.upload-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

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

/* 页面内容 */
.page {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.page.active {
    display: block;
}

/* 推荐页面 */
.recommend-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.playing-section {
    display: flex;
    gap: 60px;
    align-items: center;
}

.album-cover {
    width: 300px;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: rotate 20s linear infinite;
    animation-play-state: paused;
}

.album-cover.playing {
    animation-play-state: running;
}

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

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

.song-info {
    margin-bottom: 20px;
}

.song-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

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

.lyrics-container {
    max-width: 400px;
    height: 300px;
    overflow: hidden;
}

.lyric-line {
    padding: 10px 0;
    font-size: 16px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

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

/* 搜索页面 */
.search-header {
    margin-bottom: 30px;
}

.search-header h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.search-keyword {
    color: var(--accent-color);
}

.search-tabs {
    display: flex;
    gap: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.tab-btn.active {
    background: var(--accent-color);
    color: white;
}

.search-results h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.artist-list {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.artist-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.artist-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.artist-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

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

.artist-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

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

/* 歌曲表格 */
.song-table {
    width: 100%;
    border-collapse: collapse;
}

.song-table th,
.song-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.song-table th {
    color: var(--text-secondary);
    font-weight: normal;
    font-size: 12px;
}

.song-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.song-table tr.playing {
    background: rgba(139, 92, 246, 0.1);
}

.song-table .song-number {
    width: 40px;
    color: var(--text-secondary);
}

.song-table .song-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.song-table .song-name i {
    color: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.song-table tr:hover .song-name i {
    opacity: 1;
}

.song-table .song-duration {
    color: var(--text-secondary);
}

/* 歌单页面 */
.playlist-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.playlist-cover {
    width: 200px;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

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

.playlist-info h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.playlist-count {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.playlist-actions {
    display: flex;
    gap: 15px;
}

.play-all-btn,
.add-all-btn {
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.play-all-btn {
    background: var(--accent-color);
    color: white;
}

.play-all-btn:hover {
    background: var(--accent-hover);
}

.add-all-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

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

/* 播放控制栏 */
.player-bar {
    height: var(--player-height);
    background: var(--player-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 250px;
}

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

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

.now-playing-info .now-playing-title {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

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

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

.control-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

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

.control-btn.active {
    color: var(--accent-color);
}

.play-btn {
    width: 48px;
    height: 48px;
    background: var(--accent-color);
    color: white;
    font-size: 18px;
}

.play-btn:hover {
    background: var(--accent-hover);
}

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

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

.progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-handle {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 0%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress:hover .progress-handle {
    opacity: 1;
}

.player-extras {
    display: flex;
    align-items: center;
    gap: 10px;
}

.extra-btn {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.extra-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.quality-tag {
    background: var(--accent-color);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .playing-section {
        gap: 40px;
    }

    .album-cover {
        width: 250px;
        height: 250px;
    }

    .lyrics-container {
        max-width: 300px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 80px;
    }

    .sidebar .nav-menu a span,
    .sidebar .nav-section h4,
    .sidebar .logo span {
        display: none;
    }

    .sidebar .logo {
        justify-content: center;
    }

    .sidebar .nav-menu a {
        justify-content: center;
    }

    .playing-section {
        flex-direction: column;
        text-align: center;
    }
}
