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

:root {
    --apple-red: #FA2D48;
    --apple-red-light: rgba(250, 45, 72, 0.1);
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --background: #ffffff;
    --background-secondary: #f5f5f7;
    --border-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Helvetica Neue', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 420px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 专辑封面 */
.cover-wrapper {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    margin-bottom: 32px;
    animation: fadeIn 0.6s ease;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 20px 40px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.playing .cover-image {
    transform: scale(1.02);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 32px 64px rgba(0, 0, 0, 0.16);
}

/* 歌曲信息 */
.song-info {
    text-align: center;
    margin-bottom: 28px;
    animation: fadeIn 0.6s ease 0.1s both;
}

.song-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.artist-name {
    font-size: 22px;
    font-weight: 600;
    color: var(--apple-red);
    margin-bottom: 4px;
    cursor: pointer;
}

.artist-name:hover {
    text-decoration: underline;
}

.meta-info {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 播放按钮组 */
.button-group {
    width: 100%;
    margin-bottom: 32px;
    animation: fadeIn 0.6s ease 0.2s both;
}

.action-btn {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    border: none;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.play-action {
    background: var(--apple-red-light);
    color: var(--apple-red);
}

.play-action:hover {
    background: rgba(250, 45, 72, 0.15);
}

.play-action:active {
    transform: scale(0.98);
}

.btn-icon {
    width: 22px;
    height: 22px;
}

/* 波形可视化 */
.visualizer-wrapper {
    width: 100%;
    height: 80px;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

body.playing .visualizer-wrapper {
    opacity: 1;
    transform: translateY(0);
}

#visualizer {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: var(--background-secondary);
}

/* 进度条 */
.progress-section {
    width: 100%;
    margin-bottom: 20px;
    animation: fadeIn 0.6s ease 0.3s both;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: var(--background-secondary);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: var(--text-primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-knob {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--text-primary);
    border-radius: 50%;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.progress-container:hover .progress-knob {
    opacity: 1;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* 音量控制 */
.volume-section {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.6s ease 0.4s both;
}

.volume-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    flex-shrink: 0;
}

.volume-slider-container {
    flex: 1;
}

.volume-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--background-secondary);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式 */
@media (max-width: 480px) {
    .container {
        padding: 40px 20px 32px;
    }

    .cover-wrapper {
        max-width: 280px;
    }

    .song-title,
    .artist-name {
        font-size: 20px;
    }

    .action-btn {
        height: 48px;
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    .container {
        padding-top: 80px;
    }

    .cover-wrapper {
        max-width: 360px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f5f5f7;
        --text-secondary: #86868b;
        --background: #000000;
        --background-secondary: #1c1c1e;
        --border-color: rgba(255, 255, 255, 0.1);
    }

    .volume-slider {
        background: var(--background-secondary);
    }

    .volume-slider::-webkit-slider-thumb {
        background: var(--text-primary);
    }

    .progress-bar,
    .progress-knob {
        background: var(--text-primary);
    }
}
