        :root {
            --primary-color: #1a1a1a;
            --accent-color: #007aff;
            --background-color: #f0f2f5;
            --card-background: #ffffff;
            --text-color-light: #8e8e93;
            --border-color: #e5e5ea;
            --shadow-color: rgba(0, 0, 0, 0.08);
        }
        .favorite-item button {
            font-size: 14px;
            padding: 2px 8px;
            border-radius: 6px;
            transition: background-color 0.2s ease;
        }
        .favorite-item button:hover {
            background-color: rgba(255, 59, 48, 0.1);
        }
        *, *::before, *::after { box-sizing: border-box; }
        body { font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; background-color: var(--background-color); color: var(--primary-color); display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
        .main-card { width: 100%; max-width: 420px; background: var(--card-background); border-radius: 24px; padding: 28px; box-shadow: 0 8px 30px var(--shadow-color); }
        .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
        .header-title { font-size: 24px; font-weight: 700; margin: 0; flex-shrink: 0; margin-right: auto; }
        .header-actions { display: flex; align-items: center; gap: 8px; }
        .search-container { position: relative; height: 44px; z-index: 10; }
        .search-form-inner { position: relative; display: flex; align-items: center; justify-content: flex-end; width: 44px; height: 44px; background-color: transparent; border: 2px solid transparent; border-radius: 22px; transition: all 0.4s ease; }
        .search-container.search-active .search-form-inner { width: 180px; background-color: var(--background-color); border-color: var(--border-color); }
        .search-input { width: 100%; height: 100%; padding: 0 45px 0 15px; border: none; background-color: transparent; outline: none; font-size: 16px; opacity: 0; transition: opacity 0.4s ease; }
        .search-container.search-active .search-input { opacity: 1; }
        .search-submit-btn { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 44px; height: 100%; padding: 0; background-color: transparent; border: none; border-radius: 22px; cursor: pointer; outline: none; }
        .search-icon-wrapper { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background-color 0.3s ease; }
        .search-submit-btn:hover .search-icon-wrapper { background-color: rgba(0,0,0,0.05); }
        .search-icon { width: 24px; height: 24px; color: var(--primary-color); }
        .favorites-btn { padding: 0; border: none; background: none; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
        .favorites-btn .icon-wrapper { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background-color 0.3s ease; }
        .favorites-btn:hover .icon-wrapper { background-color: rgba(0,0,0,0.05); }
        .favorites-btn svg { width: 24px; height: 24px; color: var(--primary-color); }
        .player-content { display: flex; flex-direction: column; align-items: center; text-align: center; }
        .artwork-container { position: relative; width: 200px; height: 200px; margin-bottom: 20px; }
        .default-player-icon, .song-info-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.4s ease, transform 0.4s ease; }
        .default-player-icon { opacity: 1; transform: scale(1); }
        .default-player-icon.hidden { opacity: 0; transform: scale(0.8); pointer-events: none; }
        .song-info-wrapper { opacity: 0; transform: scale(0.8); pointer-events: none; }
        .song-info-wrapper.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
        .album-art { width: 200px; height: 200px; border-radius: 18px; overflow: hidden; box-shadow: 0 6px 20px var(--shadow-color); }
        .album-art img { width: 100%; height: 100%; object-fit: cover; }
        .song-title, .song-artist, .search-result-item, .lyrics-wrapper p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block; }
        .song-title { font-size: 28px; font-weight: 700; margin: 0 0 8px; }
        .song-artist { font-size: 18px; color: var(--text-color-light); margin: 0; }
        .song-text-wrapper { width: 100%; opacity: 0; transition: opacity 0.4s ease 0.2s; }
        .song-text-wrapper.visible { opacity: 1; }
        .controls-wrapper { width: 100%; }
        .custom-controls { display: flex; align-items: center; gap: 16px; width: 100%; }
        #playPauseBtn { width: 50px; height: 50px; border-radius: 50%; border: none; background-color: transparent; color: var(--primary-color); display: flex; justify-content: center; align-items: center; cursor: pointer; transition: background-color 0.2s ease; flex-shrink: 0; margin-bottom: 20px; }
        #playPauseBtn .icon { font-size: 24px; line-height: 1; }
        #playPauseBtn:hover { background-color: rgba(0, 0, 0, 0.05); }
        .progress-area { flex-grow: 1; display: flex; flex-direction: column; }
        .progress-bar-container { width: 100%; height: 6px; background-color: #e5e5ea; border-radius: 3px; cursor: pointer; }
        .progress-bar { width: 0%; height: 100%; background-color: var(--primary-color); border-radius: 3px; position: relative; }
        .progress-bar .thumb { position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; background-color: var(--primary-color); border-radius: 50%; transform: translateY(-50%); opacity: 0; transition: opacity 0.2s; }
        .progress-bar-container:hover .thumb { opacity: 1; }
        .time-display { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-color-light); margin-top: 8px; }
        #favoriteBtn { padding: 0; border: none; background: none; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; margin-left: 8px; margin-bottom: 20px; transition: background-color 0.2s ease; }
        #favoriteBtn:hover { background-color: rgba(0,0,0,0.05); }
        #favoriteBtn svg { width: 22px; height: 22px; transition: all 0.2s ease; }
        #favoriteBtn .icon-heart-empty { display: block; }
        #favoriteBtn .icon-heart-filled { display: none; color: #ff3b30; }
        #favoriteBtn.is-favorite .icon-heart-empty { display: none; }
        #favoriteBtn.is-favorite .icon-heart-filled { display: block; transform: scale(1.1); }
        .dynamic-content-area { margin-top: 24px; display: none; }
        .lyrics-display { height: 150px; overflow: hidden; position: relative; }
        .lyrics-wrapper { position: absolute; top: 0; left: 0; width: 100%; text-align: center; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
        .lyrics-wrapper p { margin: 0; padding: 4px 0; font-size: 16px; color: var(--text-color-light); line-height: 1.6; opacity: 0.7; transition: all 0.6s ease; }
        .lyrics-wrapper p.active-lyric { font-size: 22px; font-weight: 500; color: var(--primary-color); opacity: 1; transform: scale(1.05); }
        .initial-message { color: var(--text-color-light); font-size: 16px; text-align: center; line-height: 150px; }
        #searchResults, #favoritesList { max-height: 300px; overflow-y: auto; }
        .search-result-item, .favorite-item { padding: 12px 18px; cursor: pointer; border-radius: 8px; transition: background-color 0.2s; border-bottom: 1px solid var(--border-color); text-align: left; }
        .search-result-item:last-child, .favorite-item:last-child { border-bottom: none; }
        .search-result-item:hover, .favorite-item:hover { background-color: #f0f2f5; }
        .loader { display: none; text-align: center; padding: 20px; }
        /* 新增：彩色方块加载动画 - 带渐入渐出效果 */
.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.loader.active {
    display: flex;
    animation: fadeIn 0.4s ease-in-out forwards;
}

.loader.fade-out {
    animation: fadeOut 0.4s ease-in-out forwards;
}

/* 渐入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 渐出动画 */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.loader-spinner {
    position: relative;
    width: 2.5em;
    height: 2.5em;
    transform: rotate(165deg);
    opacity: 0;
    transition: opacity 0.3s ease-in-out 0.15s; /* 延迟一点，让背景先出现 */
}

.loader.active .loader-spinner {
    opacity: 1;
}

.loader-spinner:before,
.loader-spinner:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 0.5em;
    height: 0.5em;
    border-radius: 0.25em;
    transform: translate(-50%, -50%);
}

.loader-spinner:before {
    animation: before8 2s infinite;
}

.loader-spinner:after {
    animation: after6 2s infinite;
}

@keyframes before8 {
    0% {
        width: 0.5em;
        box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
    }
    35% {
        width: 2.5em;
        box-shadow: 0 -0.5em rgba(225, 20, 98, 0.75), 0 0.5em rgba(111, 202, 220, 0.75);
    }
    70% {
        width: 0.5em;
        box-shadow: -1em -0.5em rgba(225, 20, 98, 0.75), 1em 0.5em rgba(111, 202, 220, 0.75);
    }
    100% {
        box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
    }
}

@keyframes after6 {
    0% {
        height: 0.5em;
        box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
    }
    35% {
        height: 2.5em;
        box-shadow: 0.5em 0 rgba(61, 184, 143, 0.75), -0.5em 0 rgba(233, 169, 32, 0.75);
    }
    70% {
        height: 0.5em;
        box-shadow: 0.5em -1em rgba(61, 184, 143, 0.75), -0.5em 1em rgba(233, 169, 32, 0.75);
    }
    100% {
        box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
    }
}
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        .lyrics-toggle-container { margin-top: 15px; }
        #toggleLyricsBtn { display: none; width: 100%; padding: 12px 20px; font-size: 16px; font-weight: 500; color: var(--accent-color); background-color: transparent; border: 2px solid var(--border-color); border-radius: 12px; cursor: pointer; transition: all 0.2s ease; text-align: center; }
        #toggleLyricsBtn:hover { background-color: var(--background-color); border-color: var(--accent-color); }
        footer { margin-top: 20px; font-size: 12px; color: var(--text-color-light); text-align: center; }