:root {
    --bg-color: #faf8f5;
    --bg-secondary: #f3f0eb;
    --text-color: #1c1914;
    --text-secondary: #7d7870;
    --accent: #b8935a;
    --accent-light: #d4b483;
    --accent-glow: #e8d5b7;
    --accent-soft: rgba(184, 147, 90, 0.12);
    --border-color: #e8e4dd;
    --card-bg: rgba(255, 255, 255, 0.82);
    --glass-bg: rgba(255, 254, 251, 0.7);
    --glass-border: rgba(190, 178, 160, 0.4);
    --player-bg: rgba(250, 248, 244, 0.94);
    --hover-bg: rgba(184, 147, 90, 0.07);
    --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 14px 44px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 4px 20px rgba(184, 147, 90, 0.15);
    --transition-speed: 0.35s;
    --scrollbar-thumb: #d5cec2;
    --scrollbar-track: transparent;
    --toast-bg: #2d2922;
    --toast-text: #f0ebe0;
    --cover-gradient-1: #c9a96e;
    --cover-gradient-2: #e0c894;
}

[data-theme="dark"] {
    --bg-color: #0f0d0a;
    --bg-secondary: #171512;
    --text-color: #e8e4dc;
    --text-secondary: #9d9689;
    --accent: #d4b483;
    --accent-light: #b8935a;
    --accent-glow: #5a3e2b;
    --accent-soft: rgba(212, 180, 131, 0.1);
    --border-color: #2a2520;
    --card-bg: rgba(22, 20, 16, 0.85);
    --glass-bg: rgba(18, 16, 12, 0.7);
    --glass-border: rgba(70, 62, 50, 0.45);
    --player-bg: rgba(14, 12, 9, 0.95);
    --hover-bg: rgba(212, 180, 131, 0.08);
    --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 14px 44px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 4px 22px rgba(212, 180, 131, 0.18);
    --scrollbar-thumb: #3d352c;
    --scrollbar-track: transparent;
    --toast-bg: #e8e4dc;
    --toast-text: #1c1914;
    --cover-gradient-1: #8b6f4e;
    --cover-gradient-2: #b8935a;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed) ease,
        color var(--transition-speed) ease;
    min-height: 100vh;
    padding-bottom: 150px;
    overflow-x: hidden;
    cursor: default;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

#glowCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.top-bar {
    position: fixed;
    top: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 8px 10px 8px 10px;
    border-radius: 44px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed) ease;
}
.top-bar:hover {
    box-shadow: var(--shadow-md);
}

.search-toggle-btn {
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.top-bar.search-expanded .search-toggle-btn {
    width: 0;
    height: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    border: none;
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border-radius: 28px;
    padding: 6px 12px;
    border: 1.5px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
    flex-shrink: 0;
}
.search-wrapper.collapsed {
    max-width: 0;
    opacity: 0;
    padding: 0;
    border: none;
    overflow: hidden;
    pointer-events: none;
    gap: 0;
}
.top-bar.search-expanded .search-wrapper {
    max-width: 300px;
    opacity: 1;
    padding: 6px 12px;
    border: 1.5px solid transparent;
    pointer-events: auto;
    gap: 8px;
}
.top-bar.search-expanded .search-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.search-icon-s {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    flex-shrink: 0;
    transition: stroke 0.3s ease;
}
.search-wrapper:focus-within .search-icon-s {
    stroke: var(--accent);
}
.search-input-top {
    border: none;
    background: transparent;
    font-size: 0.88rem;
    color: var(--text-color);
    outline: none;
    width: 160px;
    font-family: inherit;
    letter-spacing: 0.2px;
    transition: width 0.35s ease;
}
.search-input-top::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}
.search-input-top:focus {
    width: 200px;
}
.search-clear-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.search-clear-btn.visible {
    opacity: 0.6;
    pointer-events: auto;
}
.search-clear-btn:hover {
    opacity: 1;
    background: var(--hover-bg);
    color: var(--accent);
}
.search-clear-btn svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: var(--text-secondary);
    position: relative;
    flex-shrink: 0;
}
.icon-btn:hover {
    background: var(--hover-bg);
    color: var(--accent);
    transform: scale(1.06);
}
.icon-btn:active {
    transform: scale(0.92);
    transition: all 0.1s ease;
}
.icon-btn svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    transition: all 0.25s ease;
}

.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    position: relative;
    z-index: 10;
}

.page-header {
    text-align: center;
    margin-bottom: 24px;
    padding-top: 60px;
}
.page-logo {
    display: inline-block;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--cover-gradient-1) 0%, var(--cover-gradient-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 8px 28px rgba(184, 147, 90, 0.25);
    transition: all 0.4s ease;
    animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}
.page-logo svg {
    width: 28px;
    height: 28px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.6px;
    margin-bottom: 4px;
    transition: color var(--transition-speed) ease;
}
.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.4px;
    transition: color var(--transition-speed) ease;
}

.results-badge {
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-height: 20px;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.now-playing-indicator {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 14px;
    display: none;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    animation: fadeSlideIn 0.4s ease;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}
.now-playing-indicator.active {
    display: flex;
}
.now-playing-indicator:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    transform: translateY(-2px);
}
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.npi-cover {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--cover-gradient-1) 0%, var(--cover-gradient-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(184, 147, 90, 0.2);
    transition: all 0.4s ease;
}
.npi-cover.playing {
    animation: coverPulse 1.8s ease-in-out infinite;
}
@keyframes coverPulse {
    0%,
    100% {
        box-shadow: 0 4px 16px rgba(184, 147, 90, 0.2);
    }
    50% {
        box-shadow: 0 8px 30px rgba(184, 147, 90, 0.4);
    }
}
.npi-cover svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}
.npi-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.npi-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.npi-artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.npi-separator {
    color: var(--text-secondary);
    opacity: 0.4;
    font-size: 0.7rem;
}
.npi-now-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent);
    font-weight: 600;
    flex-shrink: 0;
    background: var(--accent-soft);
    padding: 4px 10px;
    border-radius: 20px;
}
.npi-wave {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 16px;
    flex-shrink: 0;
}
.npi-wave-bar {
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
    transition: height 0.2s ease;
    animation: waveAnim 0.9s ease-in-out infinite;
}
.npi-wave-bar:nth-child(1) {
    animation-delay: 0s;
}
.npi-wave-bar:nth-child(2) {
    animation-delay: 0.15s;
}
.npi-wave-bar:nth-child(3) {
    animation-delay: 0.3s;
}
.npi-wave-bar:nth-child(4) {
    animation-delay: 0.45s;
}
@keyframes waveAnim {
    0%,
    100% {
        height: 5px;
    }
    50% {
        height: 16px;
    }
}

.song-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.song-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid transparent;
}
.song-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--hover-bg) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
    pointer-events: none;
}
.song-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--glass-border);
    border-left-color: var(--accent-light);
}
.song-item:hover::before {
    opacity: 1;
}
.song-item:active {
    transform: scale(0.985);
    transition: all 0.1s ease;
}
.song-item.playing {
    border-color: var(--accent);
    border-left-color: var(--accent);
    background: linear-gradient(135deg,
            rgba(184, 147, 90, 0.09) 0%,
            rgba(212, 180, 131, 0.03) 100%);
    box-shadow: var(--shadow-glow);
}
.song-item.playing .song-number-text {
    color: var(--accent);
    font-weight: 700;
}
.song-number {
    width: 32px;
    text-align: center;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.song-number-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.25s ease;
}
.song-item:hover .song-number-text,
.song-item.playing .song-number-text {
    color: var(--accent);
}
.song-eq {
    display: none;
    gap: 2px;
    align-items: flex-end;
    height: 14px;
}
.song-item.playing .song-eq {
    display: flex;
}
.song-item.playing .song-number-text {
    display: none;
}
.song-eq-bar {
    width: 2.5px;
    background: var(--accent);
    border-radius: 2px;
    animation: eqAnim 0.7s ease-in-out infinite;
}
.song-eq-bar:nth-child(1) {
    animation-delay: 0s;
}
.song-eq-bar:nth-child(2) {
    animation-delay: 0.12s;
}
.song-eq-bar:nth-child(3) {
    animation-delay: 0.24s;
}
@keyframes eqAnim {
    0%,
    100% {
        height: 5px;
    }
    50% {
        height: 14px;
    }
}
.song-cover {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(184, 147, 90, 0.15);
}
.song-item.playing .song-cover {
    box-shadow: 0 6px 20px rgba(184, 147, 90, 0.3);
}
.song-cover svg {
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.85);
    fill: none;
    stroke-width: 2;
}
.song-info {
    flex: 1;
    min-width: 0;
}
.song-title {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    transition: color 0.3s ease;
}
.song-artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}
.song-duration {
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', 'JetBrains Mono', 'Consolas', monospace;
    letter-spacing: 0.5px;
}

.loading-state {
    text-align: center;
    padding: 60px 20px;
}
.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    stroke: var(--text-secondary);
    opacity: 0.4;
}

.fixed-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--player-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-top: 1px solid var(--glass-border);
    padding: 10px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.06);
}
.fixed-player-bar.active {
    transform: translateY(0);
}
.mini-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 150px;
    max-width: 260px;
    flex-shrink: 0;
}
.mini-player-cover {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--cover-gradient-1) 0%, var(--cover-gradient-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(184, 147, 90, 0.2);
    transition: all 0.4s ease;
}
.mini-player-cover.playing {
    animation: coverPulse 1.8s ease-in-out infinite;
}
.mini-player-cover svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}
.mini-player-text {
    min-width: 0;
}
.mini-player-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}
.mini-player-artist {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}
.mini-player-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.mini-control-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: var(--text-color);
}
.mini-control-btn:hover {
    background: var(--hover-bg);
    color: var(--accent);
}
.mini-control-btn:active {
    transform: scale(0.9);
}
.mini-control-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}
.mini-control-btn.primary {
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 16px rgba(184, 147, 90, 0.35);
    transition: all 0.3s ease;
}
.mini-control-btn.primary:hover {
    background: var(--accent-light);
    box-shadow: 0 6px 22px rgba(184, 147, 90, 0.5);
    transform: scale(1.06);
    color: white;
}
.mini-control-btn.primary svg {
    width: 22px;
    height: 22px;
    stroke: white;
}
.mode-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: var(--text-secondary);
    font-size: 0.7rem;
    position: relative;
}
.mode-btn:hover {
    color: var(--accent);
    background: var(--hover-bg);
}
.mode-btn.active {
    color: var(--accent);
    background: var(--accent-soft);
}
.mode-btn svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}
.mode-indicator {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    display: none;
}
.mode-btn.active .mode-indicator {
    display: block;
}
.mini-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.mini-progress-bar {
    flex: 1;
    height: 5px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}
.mini-progress-bar:hover {
    height: 7px;
}
.mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}
.mini-progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(184, 147, 90, 0.4);
}
.mini-progress-bar:hover .mini-progress-fill::after {
    opacity: 1;
}
.mini-time {
    font-size: 0.72rem;
    color: var(--text-secondary);
    min-width: 34px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', 'JetBrains Mono', 'Consolas', monospace;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
.mini-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 110px;
    flex-shrink: 0;
}
.mini-volume svg {
    width: 17px;
    height: 17px;
    stroke: var(--text-secondary);
    flex-shrink: 0;
}
.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}
.volume-slider:hover {
    height: 6px;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}
.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(184, 147, 90, 0.4);
}
.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--toast-bg);
    color: var(--toast-text);
    padding: 11px 24px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    pointer-events: none;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

audio {
    display: none;
}

@media (max-width: 768px) {
    .main-container {
        padding: 10px 12px 120px;
    }
    .page-header {
        padding-top: 50px;
        margin-bottom: 16px;
    }
    .page-title {
        font-size: 1.5rem;
    }
    .page-logo {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }
    .page-logo svg {
        width: 22px;
        height: 22px;
    }
    /* 核心修改：工具栏左置与重排 */
    .top-bar {
        top: 10px;
        left: 10px;
        right: auto;
        padding: 6px 8px 6px 8px;
        gap: 6px;
        border-radius: 36px;
        flex-direction: row;
    }
    #themeToggle { order: 1; }
    #searchToggleBtn { order: 2; }
    #searchWrapper { order: 3; }
    
    .top-bar.search-expanded .search-wrapper {
        max-width: 200px;
    }
    .search-wrapper {
        gap: 5px;
    }
    .top-bar.search-expanded .search-wrapper {
        padding: 5px 10px;
        gap: 5px;
    }
    .search-input-top {
        width: 100px;
        font-size: 0.8rem;
    }
    .search-input-top:focus {
        width: 130px;
    }
    .search-icon-s {
        width: 14px;
        height: 14px;
    }
    .icon-btn {
        width: 30px;
        height: 30px;
    }
    .icon-btn svg {
        width: 16px;
        height: 16px;
    }
    .song-cover {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }
    .song-cover svg {
        width: 16px;
        height: 16px;
    }
    .song-duration {
        display: none;
    }
    .song-item {
        padding: 11px 12px;
        gap: 10px;
        border-radius: 12px;
        border-left-width: 2px;
    }
    .song-title {
        font-size: 0.85rem;
    }
    .song-artist {
        font-size: 0.73rem;
    }
    .fixed-player-bar {
        padding: 8px 12px;
        gap: 8px;
    }
    .mini-player-info {
        max-width: 120px;
        min-width: 0;
        flex: 0 1 auto;
    }
    .mini-player-title {
        max-width: 100px;
        font-size: 0.78rem;
    }
    .mini-player-artist {
        max-width: 100px;
        font-size: 0.7rem;
    }
    .mini-volume {
        display: none;
    }
    /* 核心修改：进度条置顶精简 */
    .mini-progress {
        display: flex;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 3px;
        padding: 0;
        margin: 0;
        gap: 0;
    }
    .mini-progress .mini-time {
        display: none;
    }
    .mini-progress-bar {
        height: 100%;
        border-radius: 0;
        background: rgba(184, 147, 90, 0.2);
    }
    .mini-progress-bar:hover {
        height: 100%;
    }
    .mini-progress-fill {
        border-radius: 0;
    }
    .mini-progress-fill::after {
        display: none;
    }
    .mini-control-btn {
        width: 34px;
        height: 34px;
    }
    .mini-control-btn svg {
        width: 17px;
        height: 17px;
    }
    .mini-control-btn.primary {
        width: 38px;
        height: 38px;
    }
    .mini-control-btn.primary svg {
        width: 19px;
        height: 19px;
    }
    .mini-player-cover {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }
    .mini-player-cover svg {
        width: 16px;
        height: 16px;
    }
    .mode-btn {
        width: 28px;
        height: 28px;
    }
    .mode-btn svg {
        width: 15px;
        height: 15px;
    }
    .npi-wave {
        display: none;
    }
    .npi-now-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    .results-badge {
        font-size: 0.73rem;
    }
    .toast {
        bottom: 100px;
        padding: 10px 20px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .top-bar {
        top: 8px;
        left: 8px;
        right: auto;
        padding: 5px 6px 5px 6px;
        gap: 3px;
        border-radius: 30px;
    }
    .top-bar.search-expanded .search-wrapper {
        max-width: 150px;
    }
    .top-bar.search-expanded .search-wrapper {
        padding: 4px 8px;
        gap: 3px;
        border-radius: 22px;
    }
    .search-input-top {
        width: 70px;
        font-size: 0.75rem;
    }
    .search-input-top:focus {
        width: 90px;
    }
    .search-input-top::placeholder {
        font-size: 0.7rem;
    }
    .search-clear-btn {
        width: 18px;
        height: 18px;
    }
    .search-clear-btn svg {
        width: 11px;
        height: 11px;
    }
    .icon-btn {
        width: 28px;
        height: 28px;
    }
    .icon-btn svg {
        width: 14px;
        height: 14px;
    }
    .page-header {
        padding-top: 40px;
    }
    .page-title {
        font-size: 1.3rem;
    }
    .fixed-player-bar {
        padding: 6px 8px;
        gap: 3px;
    }
    .mini-player-info {
        max-width: 70px;
    }
    .mini-player-title {
        max-width: 65px;
        font-size: 0.7rem;
    }
    .mini-player-artist {
        max-width: 65px;
        font-size: 0.63rem;
    }
    .mini-player-cover {
        width: 30px;
        height: 30px;
        border-radius: 6px;
    }
    .mini-control-btn {
        width: 30px;
        height: 30px;
    }
    .mini-control-btn.primary {
        width: 34px;
        height: 34px;
    }
    .mode-btn {
        width: 26px;
        height: 26px;
    }
    .song-number {
        width: 22px;
    }
    .song-item {
        padding: 10px 10px;
        gap: 8px;
        border-radius: 10px;
    }
    .main-container {
        padding: 6px 8px 110px;
    }
}
