:root {
    --font-main: 'Noto Sans SC', 'Segoe UI', Arial, sans-serif;
    --bg-gradient: linear-gradient(140deg, #e0f5e9 0%, #c6f0e0 35%, #a3e4d7 100%);
    --bg-gradient-next: var(--bg-gradient);
    --container-bg: rgba(255, 255, 255, 0.6);
    --container-shadow: rgba(0, 0, 0, 0.1);
    --backdrop-blur: 12px;
    --text-color: #2c3e50;
    --text-secondary-color: #7f8c8d;
    --primary-color: #1abc9c;
    --primary-color-dark: #12836d;
    --warning-color: #e74c3c;
    --success-color: #2ecc71;
    --item-hover-bg: rgba(26, 188, 156, 0.1);
    --item-current-bg: transparent;
    --item-current-text: var(--primary-color);
    --border-color: rgba(0, 0, 0, 0.1);
    --lyrics-highlight-bg: transparent !important;
    --lyrics-highlight-text: #00ffcc;
    --lyrics-highlight-shadow: transparent !important;
    --component-bg: rgba(255, 255, 255, 0.5);
    --scrollbar-thumb-bg: rgba(0, 0, 0, 0.2);
    --scrollbar-track-bg: transparent;
    --body-bg: #f5f5f7;
}

.dark-mode {
    --bg-gradient: linear-gradient(135deg, #0b1d1b 0%, #0f2f2c 45%, #123c36 100%);
    --container-bg: rgba(30, 30, 30, 0.6);
    --container-shadow: rgba(0, 0, 0, 0.3);
    --text-color: #ecf0f1;
    --text-secondary-color: #95a5a6;
    --primary-color: #1abc9c;
    --primary-color-dark: #17a589;
    --item-hover-bg: rgba(26, 188, 156, 0.1);
    --item-current-bg: transparent;
    --border-color: rgba(255, 255, 255, 0.15);
    --lyrics-highlight-shadow: transparent !important;
    --lyrics-highlight-text: #34d1b6;
    --component-bg: rgba(44, 44, 44, 0.5);
    --scrollbar-thumb-bg: rgba(255, 255, 255, 0.2);
    --body-bg: #0f0f0f;
}

.dark-mode .quality-menu {
    background: rgba(44, 44, 44, 0.95);
    border: 2px solid var(--primary-color);
}

.dark-mode .quality-option {
    background: rgba(44, 44, 44, 0.8);
    color: #ecf0f1;
    border-bottom: 1px solid rgba(26, 188, 156, 0.25);
}

.dark-mode .player-quality-menu {
    background: rgba(44, 44, 44, 0.95);
    border-color: var(--primary-color);
}

.dark-mode .player-quality-option {
    color: #ecf0f1;
}

.dark-mode .player-quality-option:hover,
.dark-mode .player-quality-option.active {
    color: #ffffff;
}

.dark-mode .source-menu {
    background: rgba(44, 44, 44, 0.95);
    border-color: var(--primary-color);
}

.dark-mode .source-option {
    color: #ecf0f1;
}

.dark-mode .source-option:hover,
.dark-mode .source-option.active {
    color: #ffffff;
}

::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track-bg); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb-bg); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

body {
    font-family: var(--font-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    color: var(--text-color);
    transition: color 0.5s;
    overflow: hidden !important; 
    height: 100dvh !important;
    body { background-color: var(--body-bg) !important;  }
}

.background-stage {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.background-stage__layer {
    position: absolute;
    inset: 0;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    filter: saturate(105%);
}

.background-stage__layer--base {
    background-image: var(--bg-gradient);
}

.background-stage__layer--transition {
    background-image: var(--bg-gradient-next);
    opacity: 0;
    transition: opacity 0.85s ease;
}

body.background-transitioning .background-stage__layer--transition {
    opacity: 1;
}
.container {
    
    aspect-ratio: auto !important; 

    width: 90% !important; 
    max-width: 1200px !important; 
    margin: 15px auto !important;
    
    height: 90vh !important; 
    max-height: 800px !important; 
    
    border-radius: 28px !important; 

    display: grid;
    align-content: start !important; 
    grid-template-areas:
        "header header header"
        "search search search"
        "cover playlist lyrics"
        "controls controls controls";
    grid-template-rows: auto auto 1fr 100px;
    grid-template-columns: 320px 1fr 1fr;
    gap: 20px;
    
    background: var(--container-bg);
    border-radius: 24px;
    padding: 30px;
    overflow: hidden; 
    position: relative;
    transition: all 0.4s ease;
}

.container.search-mode {
    grid-template-areas: 
        "header header header"
        "search search search"
        "search search search"
        "controls controls controls";
}

.header { 
    grid-area: header;
    text-align: center; 
    position: relative; 
}
.header h1 { 
    margin: 0; 
    font-size: 2.2em; 
    font-weight: 700; 
    color: var(--primary-color); 
    letter-spacing: 1px; 
}
.header .warning { 
    color: var(--text-secondary-color); 
    font-size: 0.9em; 
    margin-top: 10px; 
    font-style: italic; 
}

.search-area {
    grid-area: search;
    background: var(--component-bg);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.search-area *,
.search-area *::before,
.search-area *::after {
    box-sizing: border-box;
}

.container.search-mode .search-area {
    background: var(--component-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--primary-color);
}

.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--component-bg);
    color: var(--text-color);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.source-select-wrapper {
    position: relative;
    flex-shrink: 0;
}

.source-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 18px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--component-bg);
    color: var(--text-color);
    font-size: 16px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 150px;
    position: relative;
    box-shadow: none;
}

.source-select-btn:hover,
.source-select-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--component-bg);
}

.source-select-btn:focus-visible {
    outline: none
}

.source-select-btn .caret-icon {
    font-size: 0.8em;
    transition: transform 0.25s ease;
}

.source-select-btn.active .caret-icon {
    transform: rotate(-180deg);
}

.source-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: auto;
    bottom: auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    min-width: 100%;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000;
    pointer-events: none;
}

.source-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.source-menu.open-upwards {
    top: auto;
    bottom: calc(100% + 10px);
    transform-origin: bottom center;
}

.source-menu.open-downwards {
    top: calc(100% + 10px);
    bottom: auto;
    transform-origin: top center;
}

.source-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    font-size: 0.95em;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.source-option:hover,
.source-option.active {
    background: var(--primary-color);
    color: #ffffff;
}

.source-option i {
    font-size: 0.85em;
    opacity: 0.6;
}

.source-option.active i {
    opacity: 1;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: var(--primary-color-dark);
    transform: translateY(-1px);
}

.search-btn:disabled {
    background: var(--text-secondary-color);
    cursor: not-allowed;
    transform: none;
}

.search-results {
    max-height: 0;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    margin-top: 15px;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: -20px;
    padding-top: 0;
    padding-left: 20px;
    padding-right: 20px;
    position: relative;
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    border-radius: 0 0 14px 14px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-results-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: none;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.container.search-mode .search-results {
    max-height: none;
    height: 100%;
    padding-top: 15px;
    padding-bottom: 20px;
    opacity: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(20px);
    opacity: 0;
    animation: slideInUp 0.4s ease forwards;
    gap: 14px;
}

.search-result-item:nth-child(1) { animation-delay: 0.1s; }
.search-result-item:nth-child(2) { animation-delay: 0.15s; }
.search-result-item:nth-child(3) { animation-delay: 0.2s; }
.search-result-item:nth-child(4) { animation-delay: 0.25s; }
.search-result-item:nth-child(5) { animation-delay: 0.3s; }

@keyframes slideInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-result-item:hover:not(.selected) {
    background: var(--item-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.search-result-item.selected {

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    
    color: var(--primary-color) !important;
    transform: translateX(10px) !important; /* 向右微移，产生逻辑选中感 */
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.search-result-item.selected .search-result-select {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.search-result-item.selected .search-result-title {
    color: var(--primary-color);
}

.search-result-item.selected .search-result-select {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #ffffff;
}

.search-result-item.selected .search-result-select i {
    opacity: 1;
    transform: scale(1);
}

.search-result-select {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.65);
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-result-select i {
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s ease;
    pointer-events: none;
}

.search-result-select:focus-visible {
    outline: none;
}

.search-result-item .search-result-select:hover {
    border-color: var(--primary-color);
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    margin-bottom: 4px;
}

.search-result-artist {
    font-size: 13px;
    color: var(--text-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-actions {
    display: flex;
    gap: 8px;
    margin-left: 15px;
}

.import-selected-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.import-selected-btn:disabled {
    cursor: not-allowed;
    background: rgba(127, 140, 141, 0.5);
    box-shadow: none;
    filter: none;
}

.import-selected-btn:not(:disabled):hover,
.import-selected-btn:not(:disabled):focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.import-selected-btn:focus-visible {
    outline: none;
}

.import-selected-count {
    font-weight: 500;
}

.action-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 10000;
    font-weight: 500;
}

.action-btn:hover {
    background: var(--primary-color-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.3);
}

.action-btn.download {
    background: var(--success-color);
    padding: 4px 8px;
    font-size: 10px;
}

.action-btn.download:hover {
    background: #27ae60;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.main-content {
    display: contents;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.container.search-mode .main-content {
    display: none;
}

.cover-area {
    grid-area: cover;
    background: var(--component-bg);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.album-cover {
    width: 200px;
    height: auto;
    min-height: 200px;
    flex-grow: 0;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(45deg, var(--primary-color), var(--success-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    overflow: hidden;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.album-cover.loading {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.album-cover .placeholder {
    font-size: 48px;
    color: white;
    opacity: 0.8;
}

.current-song-info {
    width: 100%;
}

.current-song-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-song-artist {
    font-size: 14px;
    color: var(--text-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist, .lyrics {
    background: var(--component-bg);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
    height: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.playlist {
    grid-area: playlist;
    background: var(--component-bg);
    border-radius: 16px;
    padding: 72px 20px 24px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100%;
    box-sizing: border-box;
}


.playlist-header {
    position: absolute;
    top: 16px;
    left: 20px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    pointer-events: none;
    z-index: 5;
}

.playlist-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--text-secondary-color);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.2;
    pointer-events: none;
    text-transform: none;
    white-space: nowrap;
}

html.desktop-view body.dark-mode .playlist-label {
    color: var(--text-color);
}

html.mobile-view .playlist-label {
    display: none;
}

.playlist-actions-tray {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

body.dark-mode .playlist-actions-tray {
    background: transparent;
    border: none;
    box-shadow: none;
}

.playlist-action-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-secondary-color);
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

body.dark-mode .playlist-action-btn {
    background: rgba(24, 30, 40, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
    color: var(--text-secondary-color);
}

.playlist-action-btn i {
    pointer-events: none;
}

.playlist-action-btn:hover:not(:disabled),
.playlist-action-btn:focus-visible:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(26, 188, 156, 0.25);
    filter: brightness(1.06);
    border-color: rgba(26, 188, 156, 0.4);
    color: var(--primary-color);
}

.playlist-action-btn:focus-visible {
    outline: none;
}

.playlist-action-btn--export:hover:not(:disabled),
.playlist-action-btn--export:focus-visible:not(:disabled) {
    color: var(--primary-color-dark);
}

.playlist-action-btn--clear {
    color: rgba(231, 76, 60, 0.85);
    border-color: rgba(231, 76, 60, 0.28);
}

.playlist-action-btn--clear:hover:not(:disabled),
.playlist-action-btn--clear:focus-visible:not(:disabled) {
    filter: brightness(1.05);
    box-shadow: 0 16px 32px rgba(231, 76, 60, 0.28);
    color: var(--warning-color);
}

.playlist-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: none;
}

.playlist-action-btn:disabled:hover {
    background: transparent;
}

.playlist-import-input {
    display: none;
}

html.mobile-view .playlist-header {
    display: none;
}

.playlist:not(.empty) {
    align-items: stretch;
    justify-content: flex-start;
}

.playlist.empty::before {
    content: "点击\"探索雷达\"加载在线音乐";
    color: var(--text-secondary-color);
    font-style: italic;
    opacity: 0.7;
    font-size: 0.9em;
}

.playlist-scroll {
    flex: 1;
    width: 100%;
    overflow-y: scroll !important; 
    padding-right: 4px;
    margin-right: 0; 
    overscroll-behavior: contain;
    transform: translateZ(0);
}

.playlist-scroll::-webkit-scrollbar {
    width: 4px; 
}
.playlist-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.playlist-items .playlist-item {
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    font-size: 14px;
    margin-bottom: 2px;
    border-left: 4px solid transparent;
}

.playlist-items .playlist-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--primary-color) !important; 
    padding-left: 25px !important; 
    transform: none !important; 
    font-weight: 700;
}

.playlist-items .playlist-item.current {
    background-color: transparent !important; 
    color: var(--primary-color) !important; 
    font-weight: 700;
    border-left: 4px solid var(--primary-color) !important; 
    padding-left: 20px !important;
    transform: none !important;
    box-shadow: none !important;
}

.playlist-item-download {
    position: absolute;
    right: 35px; 
    top: 50%;
    transform: translateY(-50%);
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1000;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-items .playlist-item:hover .playlist-item-download {
    opacity: 1;
}

.playlist-item-download:hover {
    background: var(--success-color-hover);
    transform: translateY(-50%) scale(1.05);
}

.playlist-item-remove {
    position: absolute;
    right: 8px; /* Adjusted position */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 59, 48, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1000;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-items .playlist-item:hover .playlist-item-remove {
    opacity: 1;
}

.playlist-item-remove:hover {
    background: rgba(255, 59, 48, 1);
    transform: translateY(-50%) scale(1.05);
}

.dynamic-quality-menu {
    background: var(--component-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 150px;
    animation: fadeIn 0.2s ease;
}

.dynamic-quality-menu .quality-option {
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: var(--text-color);
}

.dynamic-quality-menu .quality-option:hover {
    background: var(--primary-color);
    color: white;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.lyrics {
    grid-area: lyrics;
    text-align: center;
    font-size: 1em;
    line-height: 2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

.lyrics-scroll {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-right: 8px;
    margin-right: -8px;
    overscroll-behavior: contain;
}

.lyrics:not(.empty) .lyrics-scroll {
    align-items: flex-start;
    justify-content: flex-start;
}

.lyrics-content {
    width: 100%;
}

.lyrics-content > div {
    white-space: pre-wrap;
    padding: 5px;
    margin-bottom: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.lyrics.empty[data-placeholder="default"] .lyrics-content {
    display: none;
}

.lyrics.empty[data-placeholder="default"] .lyrics-scroll::before {
    content: "歌词将在此处同步显示";
    color: var(--text-secondary-color);
    font-style: italic;
    opacity: 0.7;
    font-size: 0.9em;
}

.lyrics.empty[data-placeholder="message"] .lyrics-scroll::before {
    content: none !important;
}

.controls {
    grid-area: controls;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.controls button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em; 
    width: 50px; 
    height: 50px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: all 0.2s ease; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}
.controls button:hover { 
    background: var(--primary-color-dark); 
    transform: translateY(-2px); 
    box-shadow: 0 6px 15px rgba(0,0,0,0.15); 
}
.controls button:active { 
    transform: translateY(0); 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}
.controls button#loadOnlineBtn { 
    width: auto; 
    border-radius: 25px; 
    padding: 0 25px; 
    gap: 10px; 
}
.controls button:disabled { 
    background: var(--text-secondary-color); 
    cursor: not-allowed; 
    transform: none; 
    box-shadow: none; 
}
.transport-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

html:not(.mobile-view) #playModeBtn {
    margin-right: 8px;
}

#mobileQueueToggle {
    display: none;
}

#playPauseBtn {
    width: 60px;
    height: 60px;
    font-size: 1.4em;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 320px;
    min-width: 260px;
}

.progress-container span {
    font-variant-numeric: tabular-nums;
    font-size: 0.85em;
    color: var(--text-secondary-color);
}

.progress-container input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--primary-color) 0%, var(--primary-color) var(--progress, 0%), rgba(255, 255, 255, 0.5) var(--progress, 0%), rgba(255, 255, 255, 0.2) 100%);
    cursor: pointer;
    transition: background 0.2s ease;
}

.audio-tools {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
}

.volume-container input[type="range"] {
    width: 120px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--primary-color) 0%, var(--primary-color) var(--volume-progress, 100%), rgba(255, 255, 255, 0.2) var(--volume-progress, 100%), rgba(255, 255, 255, 0.1) 100%);
    cursor: pointer;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

input[type="range"]:active::-webkit-slider-thumb,
input[type="range"]:active::-moz-range-thumb {
    transform: scale(1.1);
}

.player-quality {
    position: relative;
}

.controls .player-quality-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--component-bg);
    color: var(--text-color);
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    height: auto;
    box-shadow: none;
}

.controls .player-quality-btn:hover,
.controls .player-quality-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 6px 16px rgba(26, 188, 156, 0.25);
    background: var(--component-bg);
}

.player-quality-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    min-width: 180px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000;
    pointer-events: none;
}

.player-quality-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.player-quality-menu.floating {
    position: fixed;
    right: auto;
    left: 0;
    top: 0;
    will-change: opacity, transform;
}

.player-quality-menu.floating:not(.show) {
    opacity: 0;
    visibility: hidden;
}

.player-quality-menu.open-upwards {
    transform-origin: bottom center;
}

.player-quality-menu.open-downwards {
    transform-origin: top center;
}

.player-quality-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 0.9em;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-quality-option:hover,
.player-quality-option.active {
    background: var(--primary-color);
    color: white;
}

.player-quality-option small {
    opacity: 0.7;
}

#audioPlayer {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.play-mode-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.play-mode-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.play-mode-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.play-mode-btn.active {
    background: var(--primary-color);
    color: white;
}

.quality-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    z-index: 999999;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
}

.search-result-item {
    position: relative;
    z-index: 1;
}

.search-result-item:has(.quality-menu.show) {
    z-index: 1000000;
}

.search-result-item.menu-active {
    z-index: 1000000;
}

.quality-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.quality-option {
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(26, 188, 156, 0.18);
}

.quality-option:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(2px);
}

.quality-option:first-child {
    border-radius: 6px 6px 0 0;
}

.quality-option:last-child {
    border-radius: 0 0 6px 6px;
    border-bottom: none;
}

.load-more-btn {
    width: 100%;
    background: var(--component-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.load-more-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.load-more-btn:disabled {
    background: var(--text-secondary-color);
    border-color: var(--text-secondary-color);
    color: white;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.debug-info {
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 10000;
    max-width: 300px;
    display: none;
}

.debug-info.show {
    display: block;
}

.loader { 
    width: 20px; 
    height: 20px; 
    border: 3px solid var(--primary-color); 
    border-bottom-color: transparent; 
    border-radius: 50%; 
    display: inline-block; 
    box-sizing: border-box; 
    animation: rotation 1s linear infinite; 
}
@keyframes rotation { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

.theme-switch-wrapper {
    position: absolute;
    top: 0px;
    right: 0px;
    display: flex;
    justify-content: flex-end;
}

.theme-toggle-button {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.4));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
    color: var(--primary-color);
}

.theme-toggle-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 188, 156, 0.25);
}

.theme-toggle-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.theme-toggle-button.is-dark {
    background: linear-gradient(160deg, rgba(36, 42, 54, 0.9), rgba(24, 30, 42, 0.7));
    border-color: rgba(26, 188, 156, 0.45);
}

.theme-toggle-button .theme-icon {
    position: absolute;
    font-size: 18px;
    transition: opacity 0.35s ease, transform 0.45s ease;
    opacity: 0;
    transform: scale(0.6) rotate(-20deg);
}

.theme-toggle-button .theme-icon--sun {
    color: #f5a623;
    text-shadow: 0 0 10px rgba(245, 166, 35, 0.4);
}

.theme-toggle-button .theme-icon--moon {
    color: #a29bfe;
    text-shadow: 0 0 10px rgba(162, 155, 254, 0.4);
    transform: scale(0.6) rotate(20deg);
}

.theme-toggle-button:not(.is-dark) .theme-icon--sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.theme-toggle-button.is-dark .theme-icon--moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: var(--warning-color);
}

.notification.warning {
    background: #f39c12;
}

.view-toggle {
    display: none;
}

.mobile-panel {
    display: contents;
}

.mobile-turntable {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 15px;
}

.mobile-turntable__platter {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 220px;
}

.action-btn.favorite.active i, 
.action-btn.favorite.active {
    color: #ff4d4d !important; 
    filter: drop-shadow(0 0 5px rgba(255, 77, 77, 0.3));
}

.action-btn.favorite.active, 
.action-btn.active i,
.playlist-item .fa-heart.active,
#favoriteBtn.active {
    color: #ff4d4d !important;
    transform: scale(1.2);
    transition: all 0.2s ease;
}

.action-btn.favorite {
    background: transparent !important;
    box-shadow: none !important;
}

@keyframes album-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.is-playing .album-cover img {
    animation: album-rotate 20s linear infinite;
    border-radius: 50% !important; 
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(255, 255, 255, 0.1);
}

body:not(.is-playing) .album-cover img {
    animation-play-state: paused;
}

.album-cover {
    border-radius: 50% !important; 
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-auth-btn {
    height: 100%; 
    background: #000; 
    color: var(--primary-color); 
    border: 1px solid rgba(0,170,255,0.3);
    border-radius: 8px;
    padding: 0 18px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex; 
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-auth-btn:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 15px rgba(0,170,255,0.4);
}


.auth-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 99999; 
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(8px);
}
.auth-overlay.open { opacity: 1; visibility: visible; }


.auth-modal {
    background: #0a0a0a;
    width: min(360px, 90%);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid rgba(0,170,255,0.4);
    position: relative;
    text-align: center;
    box-shadow: 0 0 50px rgba(0,170,255,0.25);
}

.close-auth { position: absolute; top: 15px; right: 15px; color: #555; cursor: pointer; }
.close-auth:hover { color: var(--primary-color); }
.auth-logo { width: 50px; height: 50px; margin-bottom: 20px; }
.auth-header h2 { color: #fff; margin-bottom: 8px; font-weight: 300; letter-spacing: 2px; }
.auth-header p { color: #888; font-size: 0.85rem; margin-bottom: 25px; }
.input-group { position: relative; margin-bottom: 12px; }
.input-group i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #444; }
.input-group input { width: 100%; padding: 12px 12px 12px 38px; background: #111; border: 1px solid #222; border-radius: 8px; color: #fff; font-size: 0.9rem; }
.input-group input:focus { border-color: var(--primary-color); outline: none; }
.auth-submit-btn { width: 100%; padding: 12px; background: var(--primary-color); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-size: 1rem; margin-top: 15px; transition: background 0.3s; }
.auth-submit-btn:hover { background: #0099ff; }

@media (max-width: 768px) {
    .search-auth-btn span { display: none; }
    .search-auth-btn { padding: 0 12px; height: 40px; }
    .search-container { gap: 10px; } 
}

.search-auth-btn .auth-text {
    display: inline-block !important; 
    margin-left: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.search-auth-btn.logged-in {
    background: rgba(40, 167, 69, 0.15) !important;
    border: 1px solid #28a745 !important;
    color: #28a745 !important;
}

@media (max-width: 768px) {
    .search-container {
        gap: 8px; 
    }
    .search-auth-btn {
        padding: 0 10px;
        min-width: 85px;
    }
}

.search-auth-btn.logged-in {
    position: relative;
    overflow: hidden;
    background: rgba(40, 167, 69, 0.1) !important;
    border: 1px solid #28a745 !important;
    color: #28a745 !important;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.2);
    animation: auth-pulse 3s infinite ease-in-out;
}

.search-auth-btn.logged-in {
    background: linear-gradient(135deg, #1e7e34, #28a745) !important;
    border: 1px solid #fff !important;
    color: #fff !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.4);
    animation: auth-glow 3s infinite alternate; 
}

.search-auth-btn.logged-in::after {
    content: '';
    position: absolute;
    top: -50%; left: -150%;
    width: 100%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(25deg);
    animation: auth-scan 4s infinite linear;
}

@keyframes auth-glow {
    from { box-shadow: 0 0 5px rgba(40, 167, 69, 0.3); transform: scale(1); }
    to { box-shadow: 0 0 20px rgba(40, 167, 69, 0.6); transform: scale(1.02); }
}

@keyframes auth-scan {
    0% { left: -150%; }
    100% { left: 150%; }
}

#pwa-splash {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: #0d1b3e; /* 星空蓝 */
    z-index: 9999999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

@media (display-mode: browser) {
    #pwa-splash { display: none; }
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-20px);
}

.logo-container {
    position: relative;
    width: 120px; height: 120px;
    margin-bottom: 30px;
}

.splash-img {
    width: 100%; height: 100%;
    border-radius: 22%;
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.3);
    z-index: 5; position: relative;
}

.pulse-wave, .pulse-wave-delayed {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    border: 2px solid #00f2fe; border-radius: 22%;
    z-index: 1; opacity: 0;
    animation: wavePulse 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
}
.pulse-wave-delayed { animation-delay: 1.2s; }

@keyframes wavePulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

.splash-title {
    color: #fff; font-size: 48px; margin: 0;
    letter-spacing: 12px; font-weight: 700;
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.5);
}

.splash-subtitle {
    color: rgba(0, 242, 254, 0.5); font-size: 12px;
    margin-top: 15px; letter-spacing: 4px; font-weight: 300;
}

.loading-bar-container {
    width: 160px; height: 2px;
    background: rgba(255,255,255,0.1);
    margin-top: 10px; border-radius: 2px; overflow: hidden;
}
.loading-bar-fill {
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, #00f2fe, transparent);
    animation: loadingSlide 2s infinite linear;
}
@keyframes loadingSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

:root {
    --text-color: #2c3e50; /* 默认：浅色模式深灰字 */
    --body-bg: #f5f5f7;    /* 默认：浅色模式苹果白 */
}

/* 统帅，请确保您的 JS 切换的是 .dark-mode 类 */
.dark-mode {
    --text-color: #ecf0f1; /* 深色模式：亮白字 */
    --body-bg: #0f0f0f;    /* 深色模式：极客黑 */
}

/* 🛠️ 关键并网：让底色跟随变量（必须修改这一行！） */
body {
    background-color: var(--body-bg) !important;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* 2. 基础歌词：PC/移动通用物理对焦 */
.lyrics-content div, 
.mobile-inline-lyrics__content div {
    color: var(--text-color) !important; 
    opacity: 0.35; /* 降低背景噪音 */
    
    /* 🛠️ 取自 Snippet 1：黄金呼吸阻尼 */
    transition: 
        opacity 0.45s ease, 
        color 0.4s ease, 
        transform 0.45s cubic-bezier(0.4, 0, 0.2, 1) !important;
        
    transform: scale(1);
    filter: none !important;
    text-shadow: none !important; /* 🚫 绝杀阴影 */
}

/* 3. PC 正常模式专用：1% 精度间距限制 */
@media (min-width: 821px) {
    body:not(.desktop-immersive) #lyrics .lyrics-content div {
        /* 字号物理锁定：消除跳动感 */
        font-size: 1.15rem !important; 
        line-height: 1.8 !important;
        margin-bottom: 12px !important;
    }
}
/* 🛠️ 关键修复：补齐了逗号，并联 PC/移动端所有选择器 */
.lyrics .current,
.lyrics-content div.current, 
.mobile-inline-lyrics__content div.current {
    color: #00ffcc89 !important; /* 锁定统帅专属绿 */
    opacity: 1 !important;
    
    /* 🛠️ 取自 Snippet 2：统帅认证的 1.3x 霸气缩放 */
    transform: scale(1) translateZ(0) !important; 
    
    font-weight: bold !important;
    text-shadow: none !important; /* 再次确认 0 阴影 */
    background-color: transparent !important;
}

    @media (min-width: 821px) {
    
    body.desktop-immersive .header,
    body.desktop-immersive .search-area,
    body.desktop-immersive .playlist {
        display: none !important;
    }

    body.desktop-immersive .container {
        position: fixed;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        padding: 40px 8vw !important; 
        box-sizing: border-box;
        z-index: 200000 !important;
        
        grid-template-areas:
            "cover lyrics"
            "controls controls";
        grid-template-columns: 1fr 1.2fr;
        grid-template-rows: 1fr 120px;
        gap: 60px;
        
        background: var(--container-bg) !important;
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
    }
     body.desktop-immersive .cover-area {
        background: transparent !important;
        border: none !important;
        padding: 0;
        justify-content: center;
    }
    
    body.desktop-immersive .album-cover {
        width: 35vh !important; 
        height: 35vh !important;
        max-width: 350px;
        max-height: 350px;
    }

    body.desktop-immersive #lyrics {
        background: transparent !important;
        border: none !important;
        height: 100% !important;
    }
    
    body.desktop-immersive .current-song-title {
        font-size: 2.2rem !important;
        font-weight: 700;
        color: #fff !important;
        margin-bottom: 10px;
        text-shadow: 0 4px 15px rgba(0,0,0,0.3); 
    }

    body.desktop-immersive .current-song-artist {
        font-size: 1.3rem !important; 
        color: rgba(255, 255, 255, 0.7) !important;
    }

    body.desktop-immersive #lyrics::-webkit-scrollbar {
    width: 2px !important; 
    }
    body.desktop-immersive #lyrics::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05) !important; 
    }

    body.desktop-immersive .lyrics-scroll {
        flex: 1 !important;
        overflow-y: auto !important; /* 开启内部滚动 */
        overflow-x: hidden !important;
        padding: 50vh 0 !important; /* 保持当前行在中间 */
        box-sizing: border-box !important;
        scroll-behavior: smooth;
        
        /* 遮罩优化：首尾淡入淡出，中间信号清晰 */
        mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    }

    body.desktop-immersive .lyrics-content div {
        /* 初始状态：缓缓的去 */
        opacity: 0.6; /* 降低非当前行透明度，营造隐匿感 */
        font-size: 1.8rem;
        line-height: 2;
        margin-bottom: 20px;
        white-space: normal !important;
        word-break: break-word !important;
        
        /* 过渡曲线：采用与移动端一致的缓动效果 */
        transition: 
            opacity 0.6s ease-in-out, 
            transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
            color 0.6s ease !important;
        
        transform: scale(0.95); /* 默认微缩，增加高亮时的弹出感 */
        will-change: opacity, transform;
    }
    /* 5. 当前高亮：缓缓的来 */
    body.desktop-immersive .lyrics-content div.current {
        opacity: 1 !important;
        color: #00ffcc89 !important; /* 锁定高亮主题色 */
        transform: scale(1.1) translateZ(0) !important; /* 桌面端缩放不宜过大，保持清晰 */
        font-weight: 700;
    }
}

@media (max-width: 820px) {
    
    body.mobile-inline-lyrics-open .mobile-turntable,
    body.mobile-inline-lyrics-open .current-song-info,
    body.mobile-inline-lyrics-open .header,
    body.mobile-inline-lyrics-open .mobile-toolbar,
    body.mobile-inline-lyrics-open .progress-container,
    body.mobile-inline-lyrics-open .controls {  
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease;
        height: 88dvh !important;
        display: flex !important; 
        flex-direction: column !important;
        border-radius: 28px !important; 
        margin: 10px auto !important;
        padding: 20px !important;
    }

#lyrics {
    flex: 1 !important;
    
    min-height: 0 !important;
    overflow-y: auto !important;
    will-change: scroll-position;
    transform: translateZ(0); 
    }

    .mobile-inline-lyrics {
        display: none; 
        position: fixed;
        inset: 0 !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 100000 !important;
        flex-direction: column;
        border: none !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        background: rgba(0, 0, 0, 0.2) !important; 
        backdrop-filter: blur(45px) saturate(160%) brightness(0.6) !important;
        -webkit-backdrop-filter: blur(45px) saturate(160%) brightness(0.6) !important;
        will-change: transform;
        transform: translateZ(0); 
    }
    .mobile-inline-lyrics.active { display: flex !important; }
    .mobile-inline-lyrics__hint { 
        display: flex !important; 
        justify-content: flex-start !important; 
        width: 100% !important;
        padding-left: 20px !important;
    }
    .mobile-inline-lyrics__hint span {
        font-size: 0.9rem;
        opacity: 0.7;
        color: rgba(255, 255, 255, 0.75) !important;
    }

    .mobile-inline-lyrics__scroll {
        flex: 1;
        width: 100% !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 50vh 0 50vh !important; 
        box-sizing: border-box;
    }

    .mobile-inline-lyrics__content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        
        margin-left: 1% !important;
        width: 90% !important;
        
        box-sizing: border-box;
        text-align: center !important;
        -webkit-transform-style: preserve-3d !important;
        transform-style: preserve-3d !important;
    }

    .mobile-inline-lyrics__content div {
    opacity: 0.6;
    color: rgba(255, 255, 255, 0.6) !important;
    line-height: 1.6 !important;
    padding: 10px 10px !important;
    font-size: 1.3rem !important; 
    transition: 
        opacity 0.45s ease-in-out,
        transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.45s ease !important;
        
    will-change: opacity, transform;
    transform: scale(0.92); /* 默认轻微缩小，增加高亮时的弹出感 */
    }

    .mobile-inline-lyrics__content div.current {
    opacity: 1 !important;
    color: #00ffcc89 !important;
    
    /* 🛠️ 瞬时对焦：缩放从 1.1 调整为更紧致的 1.08，减少渲染位移 */
    transform: scale(1.1) translateZ(0) !important; 
    font-weight: 700;
    }
}

.about-dashboard { text-align: center; color: #fff; }
.dashboard-title { color: #00ffcc; font-size: 1.4rem; font-weight: 800; letter-spacing: 4px; }
.dashboard-subtitle { font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-bottom: 25px; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    text-align: left;
}

.about-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,255,204,0.1);
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.about-card:hover { border-color: #00ffcc; background: rgba(0,255,204,0.05); }

.card-header { display: flex; align-items: center; gap: 8px; color: #00ffcc; margin-bottom: 8px; font-weight: bold; font-size: 0.9rem; }
.card-body { font-size: 0.8rem; line-height: 1.6; color: #ccc; }
/* === [V2026.0415：右舷 HUD 阵列 · 精简全息版] === */
.lkm-toast-container {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 20px);
    right: 15px; /* 🛠️ 靠右悬浮 */
    z-index: 10000000; /* 确保在所有 Modal 之上 */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.lkm-toast {
    pointer-events: auto;
    min-width: 150px;
    max-width: 240px;
    /* 🛠️ 水晶质感：与您的 Mothership 面板视觉对齐 */
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.05) 100%) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    /* 🛠️ 变色灵魂：动态同步当前主题色 */
    border-left: 3px solid var(--theme-color, #00ffcc) !important;
    border-radius: 6px; /* 🛠️ 对应 db-card 的硬朗感 */
    color: #ffffff;
    padding: 10px 16px;
    font-size: 1.2rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    /* 滑入动画 */
    transform: translateX(130%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lkm-toast.show { transform: translateX(0); opacity: 1; }
.lkm-toast.hide { transform: translateX(130%); opacity: 0; }
.lkm-toast.error { border-left-color: #ff4d4d !important; }
/* === [V2026.0415：LKM 无影全息视窗协议 · 最终精修版] === */

/* 1. 统一遮罩层 */
.lkm-modal-overlay {
    display: none; 
    position: fixed; inset: 0; 
    background: rgba(0, 0, 0, 0.5); /* 🛠️ 轻微加深背景，增加沉浸感 */
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    z-index: 9999999; 
    justify-content: center; align-items: center;
}

/* 2. 统一水晶盒：无影禁区 */
.lkm-crystal-box {
    /* 🛠️ 匹配播放列表：烟熏透明感 */
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.03) 100%) !important;
    backdrop-filter: blur(45px) saturate(220%) brightness(1.1);
    -webkit-backdrop-filter: blur(45px) saturate(220%) brightness(1.1);
    
    padding: 35px 25px; border-radius: 30px; 
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    
    width: 90%; max-width: 400px; 
    box-shadow: none !important; /* 🛠️ 禁影令：永久物理剥离盒子阴影 👉👈 */
    animation: lkm-panel-appear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* 3. 动态变色与无影文字 */
.db-title, .db-label, .db-sub {
    color: var(--theme-color, #00ffcc) !important;
    text-shadow: none !important; /* 🛠️ 禁影令：剥离文字阴影 */
    font-weight: 800;
}
.db-sub { color: rgba(255,255,255,0.4) !important; }

/* 🛠️ 关于 UI 里的图标同步剥离阴影 */
.db-card i {
    color: var(--theme-color, #00ffcc) !important;
    text-shadow: none !important;
}

/* 4. 确认按钮：禁影高能脉冲 */
.lkm-btn-primary {
    background: var(--theme-color, #00ffcc) !important;
    color: #000 !important; font-weight: 800; border: none;
    padding: 15px; border-radius: 14px; width: 100%; cursor: pointer;
    box-shadow: none !important; /* 🛠️ 禁影令：剥离按钮阴影 👉👈 */
    font-size: 1.4rem; transition: all 0.2s;
}
.lkm-btn-primary:active { transform: scale(0.96); filter: brightness(1.2); }

/* === [V2026.0415：LKM 1%精度模块化无影水晶协议] === */

/* 1. 统一遮罩与水晶盒：物理压缩居中对焦 👉👈 */
.lkm-modal-overlay, #authOverlay {
    display: none; position: fixed; inset: 0; 
    background: rgba(0, 0, 0, 0.45) !important; 
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    z-index: 10000000 !important; 
    justify-content: center; align-items: center;
}

.lkm-crystal-box, .auth-content-box {
    /* 🛠️ 烟熏水晶质感：随音变色色彩流山 */
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.05) 100%) !important;
    backdrop-filter: blur(50px) saturate(220%) brightness(1.1) !important;
    -webkit-backdrop-filter: blur(50px) saturate(220%) brightness(1.1) !important;
    
    padding: 30px 20px !important; border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.35) !important;
    
    /* 🛠️ 统帅指令：保持旧 UI 精致尺寸 (310px) */
    width: 82% !important; max-width: 310px !important;
    
    box-shadow: none !important; /* 🛠️ 禁影令：物理湮灭所有阴影 👉👈 */
    display: flex; flex-direction: column; align-items: center; text-align: center;
    animation: lkm-panel-appear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* 2. 核心头部：耳机图标绝对中轴对焦 */
.auth-header, .db-header {
    width: 100% !important; display: flex; flex-direction: column; 
    align-items: center !important; justify-content: center !important;
}

.db-icon-main {
    color: var(--theme-color, #00ffcc) !important; /* 🛠️ 色彩并网同步 */
    font-size: 2.8rem !important; margin-bottom: 12px !important;
    text-shadow: none !important; /* 🛠️ 禁影令 👉👈 */
    display: block !important; margin-inline: auto !important;
}

.db-title { 
    color: var(--theme-color, #00ffcc) !important;
    font-size: 1.4rem !important; font-weight: 800; letter-spacing: 3px; 
    text-shadow: none !important; /* 🛠️ 禁影令 👉👈 */
}

.db-sub { 
    font-size: 0.75rem !important; color: rgba(255,255,255,0.4) !important;
    margin-bottom: 20px !important; letter-spacing: 1px;
}

/* 3. 关于面板专用：卡片阵列 */
.db-grid { 
    display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; 
    /* 🛠️ 核心修复：增加底部边距，防止与按钮“合一块” */
    margin-bottom: 25px !important; 
    max-height: 350px;
    overflow-y: auto;
}

.db-card { 
    background: rgba(255, 255, 255, 0.04) !important; padding: 12px; 
    border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08) !important;
    text-align: left;
}
.db-label { color: var(--theme-color, #00ffcc) !important; font-weight: 800; font-size: 0.9rem; margin-bottom: 4px; display: block; }
.db-body { color: rgba(255, 255, 255, 0.7) !important; font-size: 0.95rem; line-height: 1.5; }

/* 4. 确认按钮：独立模块化对焦 */
.lkm-btn-primary {
    background: var(--theme-color, #00ffcc) !important;
    color: #000 !important; font-weight: 800; border: none;
    padding: 14px; border-radius: 12px; width: 100%; 
    font-size: 1.3rem; cursor: pointer;
    box-shadow: none !important; /* 🛠️ 禁影令 👉👈 */
    
    /* 🛠️ 增加顶部微量间距，确保 100MHz 频段的独立性 */
    margin-top: 5px !important; 
    transition: all 0.2s;
}
.lkm-btn-primary:active { transform: scale(0.96); filter: brightness(1.2); }

/* 5. 登录表单：微缩图标与物理对齐 */
.lkm-form { width: 100% !important; display: flex; flex-direction: column; gap: 12px; }
.lkm-form .input-group { position: relative; display: flex; align-items: center; width: 100%; }

.lkm-form .input-group i { 
    position: absolute; left: 15px; 
    font-size: 1.0rem !important; 
    color: var(--theme-color, #00ffcc) !important; 
    z-index: 10; text-shadow: none !important; /* 🛠️ 禁影令 👉👈 */
}

.lkm-form input {
    width: 100% !important; padding: 12px 12px 12px 42px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important; color: #fff; font-size: 1.2rem;
    outline: none; box-shadow: none !important; /* 🛠️ 禁影令 👉👈 */
    box-sizing: border-box; transition: all 0.3s;
}

/* 动画：入场 */
@keyframes lkm-panel-appear {
    from { opacity: 0; transform: translateY(15px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}