/* static/css/style.css - 专业大厂级音乐网站UI设计（QQ音乐/酷狗风格） */

/* ===== 全局变量 ===== */
:root {
    --primary-color: #31C27C;
    --primary-light: #5FD9A3;
    --primary-dark: #28A96B;
    --secondary-color: #FF6B6B;
    --accent-color: #4ECDC4;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #ff4d4f;
    --dark-bg: #0F0F0F;
    --dark-surface: #1A1A1A;
    --dark-card: #242424;
    --dark-hover: #2D2D2D;
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --text-muted: #666666;
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --gradient-primary: linear-gradient(135deg, #31C27C 0%, #5FD9A3 100%);
    --gradient-banner: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* ===== 重置样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ===== 头部导航（QQ音乐风格）===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(15, 15, 15, 0.99);
    box-shadow: var(--shadow-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-item a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    position: relative;
}

.nav-item a:hover {
    color: var(--text-primary);
    background: var(--dark-hover);
}

.nav-item a.active {
    color: var(--primary-color);
    background: rgba(49, 194, 124, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
    width: 280px;
}

.search-box input {
    width: 100%;
    padding: 8px 36px 8px 14px;
    background: var(--dark-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 13px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--primary-color);
    background: var(--dark-card);
    outline: none;
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
}

.btn {
    padding: 8px 20px;
    border-radius: var(--radius-xl);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(49, 194, 124, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 194, 124, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===== 主内容区 ===== */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    padding: 40px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== Hero区域（QQ音乐风格）===== */
.hero-section {
    background: var(--gradient-banner);
    border-radius: var(--radius-xl);
    padding: 50px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
    color: white;
}

.hero-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 12px;
}

.btn-white {
    background: white;
    color: #667eea;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== 区块标题 ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.view-all {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-all:hover {
    gap: 10px;
}

/* ===== 歌曲卡片网格（QQ音乐风格）===== */
.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.song-card {
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.song-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    background: var(--dark-hover);
}

.song-cover {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.song-card:hover .song-cover img {
    transform: scale(1.08);
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.song-card:hover .play-overlay {
    opacity: 1;
}

.play-btn {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    transform: scale(0.8) translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(49, 194, 124, 0.4);
}

.song-card:hover .play-btn {
    transform: scale(1) translateY(0);
}

.vip-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.song-info {
    padding: 12px;
}

.song-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.song-artist {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== 歌手卡片 ===== */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.artist-card {
    text-align: center;
    padding: 25px;
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.artist-card:hover {
    transform: translateY(-5px);
    background: var(--dark-surface);
}

.artist-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.artist-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.artist-stats {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== 底部播放器（QQ音乐风格）===== */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 12px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    height: 80px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.player-cover {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-details {
    min-width: 0;
}

.player-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.player-artist {
    font-size: 12px;
    color: var(--text-secondary);
}

.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 2;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.control-btn {
    background: none;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.control-btn:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.control-btn.play-pause {
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn.play-pause:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(49, 194, 124, 0.4);
}

.progress-bar {
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-display {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 40px;
    font-family: 'Courier New', monospace;
}

.progress-slider {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    position: relative;
    transition: width 0.1s linear;
}

.progress-handle {
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-slider:hover .progress-handle {
    opacity: 1;
}

.player-extra {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.volume-slider {
    width: 80px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .header {
        padding: 0 20px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .search-box {
        width: 200px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .hero-section {
        padding: 30px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .song-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .player-bar {
        padding: 10px 20px;
    }
    
    .player-extra {
        display: none;
    }
}

/* ===== 动画效果 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}
