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

:root {
    --primary-color: #20b2aa; /* Teal/青色，参考设计中的强调色 */
    --primary-dark: #1a9b94;
    --text-primary: #000000; /* 纯黑色文字 */
    --text-secondary: #666666; /* 深灰色 */
    --bg-white: #ffffff; /* 纯白色背景 */
    --bg-light: #f5f5f5; /* 浅灰色背景 */
    --border-color: #e0e0e0; /* 浅灰色边框 */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.15);
    --accent-pink: #ffc0cb; /* 粉色，用于特殊卡片 */
}

body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    background: var(--bg-white);
    color: var(--text-primary);
    min-height: 100vh;
    padding-bottom: 100px; /* 为底部播放器留出空间 */
    line-height: 1.6;
}

/* 顶部播放器控制栏 */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 15px 20px;
}

.player-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.now-playing-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.now-playing-artwork {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.now-playing-artwork svg {
    width: 60%;
    height: 60%;
}

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

.track-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.track-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.control-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: var(--bg-light);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.play-pause {
    width: 48px;
    height: 48px;
    background: var(--text-primary);
    color: white;
    font-size: 1.3rem;
}

.play-pause:hover {
    background: #333333;
}

#audio-player {
    display: none;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 头部 */
.site-header {
    margin-bottom: 50px;
}

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

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.refresh-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.refresh-btn:hover {
    color: var(--text-primary);
    background: var(--bg-light);
}

.refresh-btn:active {
    background: var(--border-color);
}

.refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.site-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 主内容 */
.main-content {
    width: 100%;
}

/* 音乐网格 */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
}

/* 音乐卡片 */
.music-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.music-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: var(--border-color);
}

.music-card.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--text-primary);
}

.music-card-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.music-card-image svg {
    width: 50%;
    height: 50%;
    color: var(--text-secondary);
    opacity: 0.4;
}

.music-card.active .music-card-image {
    background: var(--bg-light);
}

.music-card-content {
    padding: 16px;
}

.music-card-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.music-card-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.music-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.music-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.music-card-rating .star {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.music-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.music-card:hover .music-card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.music-card.active .music-card-play {
    opacity: 1;
    background: var(--text-primary);
    color: white;
}

.music-card-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    padding: 6px 14px;
    border-radius: 0;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
    margin-left: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .music-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .music-card-content {
        padding: 15px;
    }

    .player-bar-content {
        flex-wrap: wrap;
        padding: 12px 15px;
    }

    .now-playing-info {
        width: 100%;
        margin-bottom: 10px;
    }

    .player-controls-bar {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .music-grid {
        grid-template-columns: 1fr;
    }
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

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

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}
