/* 主题变量 */
:root {
    /* 深色主题（默认） */
    --bg-primary: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #2a2a2a 100%);
    --bg-secondary: rgba(255, 255, 255, 0.1);
    --bg-tertiary: rgba(255, 255, 255, 0.05);
    --bg-header: rgba(15, 15, 15, 0.95);
    --bg-player: rgba(15, 15, 15, 0.98);
    --bg-modal: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 100%);
    --bg-lyric: #000;
    --bg-button: rgba(255, 255, 255, 0.1);
    
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --text-tertiary: #888888;
    --text-muted: #666666;
    
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(255, 255, 255, 0.2);
    
    --accent-color: #1DB954;
    --accent-hover: #1ed760;
    --accent-shadow: rgba(29, 185, 84, 0.3);
    
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.6);
    --shadow-heavy: rgba(0, 0, 0, 0.8);
}

/* 浅色主题 */
[data-theme="light"] {
    --bg-primary: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    --bg-secondary: rgba(0, 0, 0, 0.08);
    --bg-tertiary: rgba(0, 0, 0, 0.04);
    --bg-header: rgba(248, 249, 250, 0.95);
    --bg-player: rgba(248, 249, 250, 0.98);
    --bg-modal: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    --bg-lyric: #ffffff;
    --bg-button: rgba(0, 0, 0, 0.08);
    
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-tertiary: #6c757d;
    --text-muted: #adb5bd;
    
    --border-primary: rgba(0, 0, 0, 0.1);
    --border-secondary: rgba(0, 0, 0, 0.15);
    
    --accent-color: #1DB954;
    --accent-hover: #198754;
    --accent-shadow: rgba(29, 185, 84, 0.25);
    
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 120px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Header */
.header {
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
    transition: background 0.3s ease;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 120px;
}

.logo i {
    font-size: 24px;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    display: flex;
    gap: 12px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-tertiary);
    font-size: 14px;
    z-index: 1;
}

.search-bar input {
    width: 100%;
    padding: 14px 16px 14px 45px;
    border: none;
    border-radius: 25px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.search-bar input:focus {
    outline: none;
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-shadow);
}

.search-bar input::placeholder {
    color: var(--text-tertiary);
}

.search-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--accent-shadow);
    min-width: 50px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-shadow);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--bg-button);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    transform: scale(1.05);
}

.theme-toggle .theme-icon {
    font-size: 18px;
    transition: all 0.3s ease;
}

.theme-toggle.light .theme-icon {
    transform: rotate(180deg);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 25px;
}

/* Loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 50px;
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--accent-shadow);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 25px;
}

.loading-text {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.loading-tips {
    font-size: 15px;
    color: var(--text-tertiary);
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 50px;
    color: #ff6b6b;
    text-align: center;
}

.error-container i {
    font-size: 60px;
    margin-bottom: 25px;
    opacity: 0.8;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Top Lists Grid */
.top-lists {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.list-item {
    background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-primary);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-shadow) 0%, rgba(29, 185, 84, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.list-item:hover::before {
    opacity: 1;
}

.list-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px var(--shadow-light), 0 0 0 1px var(--accent-shadow);
}

.list-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 18px;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1;
}

.list-item:hover img {
    transform: scale(1.05);
}

.list-item p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.list-item small {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.import-item {
    border: 2px dashed rgba(29, 185, 84, 0.4);
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.import-item:hover {
    border-color: #1DB954;
    background: rgba(29, 185, 84, 0.1) !important;
}

.import-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #1DB954 0%, #1ed760 100%);
    border-radius: 12px;
    color: white;
    padding: 50px;
    width: 100%;
    transition: transform 0.3s ease;
}

.import-item:hover .import-content {
    transform: scale(1.05);
}

.import-content i {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.import-content p {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Playlist Header */
.playlist-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-primary);
}

.back-btn {
    background: var(--bg-button);
    color: var(--text-primary);
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: var(--bg-secondary);
    transform: translateX(-3px);
}

.playlist-header h2 {
    margin: 0;
    color: var(--accent-color);
    font-size: 28px;
    font-weight: 700;
}

/* Playlist */
.playlist {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.song-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
}

.song-item:hover {
    background: var(--accent-shadow);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.song-item.playing {
    background: rgba(29, 185, 84, 0.15);
    border-color: var(--accent-color);
}

.song-number {
    font-size: 15px;
    color: var(--text-muted);
    min-width: 35px;
    text-align: center;
    font-weight: 600;
}

.song-item.playing .song-number {
    color: var(--accent-color);
}

.song-item .artwork {
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 4px 8px var(--shadow-light);
}

.song-item-info {
    flex: 1;
    min-width: 0;
}

.song-title {
    margin: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.3;
}

.song-artist {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.song-item.playing .song-title {
    color: var(--accent-color);
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.action-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.15);
}

/* Player */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-player);
    backdrop-filter: blur(25px);
    border-top: 1px solid var(--border-primary);
    z-index: 1000;
    height: 100px;
    box-shadow: 0 -8px 32px var(--shadow-medium);
    transition: background 0.3s ease;
}

.player-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 25px;
    height: 100%;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 250px;
    flex-shrink: 0;
}

.song-artwork {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-light);
    object-fit: cover;
}

.song-details {
    min-width: 0;
    flex: 1;
}

.song-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.song-artist {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.control-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--bg-button);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: var(--bg-secondary);
    transform: scale(1.1);
}

.control-btn.play-pause {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    width: 56px;
    height: 56px;
    font-size: 20px;
    box-shadow: 0 8px 25px var(--accent-shadow);
    color: white;
}

.control-btn.play-pause:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px var(--accent-shadow);
}

/* 美化的播放进度条 */
.progress-container {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.time-display {
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.progress-wrapper {
    position: relative;
    height: 8px;
    cursor: pointer;
}

.progress-track {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #1DB954 0%, #1ed760 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.5);
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    appearance: none;
    cursor: pointer;
    border-radius: 4px;
}

.progress-bar::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #1DB954;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
    opacity: 0;
}

.progress-wrapper:hover .progress-bar::-webkit-slider-thumb {
    opacity: 1;
    transform: scale(1.2);
}

.progress-bar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #1DB954;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.6);
}

.player-options {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* 音量控制 */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.volume-slider-container {
    width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.volume-control:hover .volume-slider-container {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.volume-slider {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px var(--accent-shadow);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px var(--accent-shadow);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px var(--accent-shadow);
}

.volume-slider::-webkit-slider-track {
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
}

.volume-slider::-moz-range-track {
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    border: none;
}

/* 音量按钮状态 */
.volume-btn-muted {
    color: var(--text-muted) !important;
}

.volume-btn-low {
    color: var(--text-secondary) !important;
}

.volume-btn-high {
    color: var(--text-primary) !important;
}

.quality-select {
    background: var(--bg-button);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    backdrop-filter: blur(10px);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888888' d='M1.41 0L6 4.59L10.59 0L12 1.41L6 7.41L0 1.41L1.41 0Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 80px;
    transition: all 0.3s ease;
}

[data-theme="light"] .quality-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666666' d='M1.41 0L6 4.59L10.59 0L12 1.41L6 7.41L0 1.41L1.41 0Z'/%3E%3C/svg%3E");
}

.quality-select:hover {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

.quality-select:focus {
    outline: none;
    background: var(--bg-secondary);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-shadow);
}

.quality-select option {
    background: var(--bg-modal);
    color: var(--text-primary);
    padding: 8px 12px;
}

/* 深色主题下option的特殊处理 */
:root .quality-select option {
    background: #1a1a1a;
    color: white;
}

/* 浅色主题下option的特殊处理 */
[data-theme="light"] .quality-select option {
    background: #ffffff;
    color: #212529;
}

.option-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--bg-button);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
    backdrop-filter: blur(10px);
}

.option-btn:hover {
    background: var(--bg-secondary);
    transform: scale(1.1);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(15px);
}

.modal-content {
    background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.import-input {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 15px;
    font-family: inherit;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.import-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: #1DB954;
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.2);
}

.modal-tips {
    background: rgba(29, 185, 84, 0.1);
    border: 1px solid rgba(29, 185, 84, 0.3);
    border-radius: 12px;
    padding: 18px;
    color: #aaa;
    font-size: 14px;
}

.modal-tips p {
    margin: 0 0 10px 0;
    color: #1DB954;
    font-weight: 600;
}

.modal-tips ul {
    margin: 0;
    padding-left: 20px;
}

.modal-tips li {
    margin-bottom: 5px;
}

.modal-footer {
    padding: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-cancel, .btn-confirm {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-confirm {
    background: linear-gradient(135deg, #1DB954 0%, #1ed760 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.3);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 185, 84, 0.4);
}

/* Lyric Modal */
.lyric-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(20px);
}

.lyric-modal {
    background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 100%);
    border-radius: 24px;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    animation: lyricModalSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes lyricModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.lyric-modal-header {
    padding: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(29, 185, 84, 0.1);
}

.song-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.modal-artwork {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    object-fit: cover;
}

.song-info h3 {
    margin: 0;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.song-info p {
    margin: 0;
    color: #aaa;
    font-size: 16px;
    margin-top: 4px;
}

.lyric-modal-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    text-align: center;
    scrollbar-width: thin;
    scrollbar-color: rgba(29, 185, 84, 0.5) transparent;
}

.lyric-modal-content::-webkit-scrollbar {
    width: 8px;
}

.lyric-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.lyric-modal-content::-webkit-scrollbar-thumb {
    background: rgba(29, 185, 84, 0.5);
    border-radius: 4px;
}

/* Lyric Lines */
.lyric-line {
    margin: 30px 0;
    font-size: 24px;
    line-height: 1.8;
    color: #666;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 15px 25px;
    border-radius: 15px;
    display: inline-block;
    min-width: 200px;
    font-weight: 500;
}

.lyric-line:hover {
    color: #aaa;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

.lyric-line.active {
    color: #1DB954;
    transform: scale(1.08) translateY(-5px);
    background: rgba(29, 185, 84, 0.15);
    box-shadow: 0 10px 30px rgba(29, 185, 84, 0.3);
    font-weight: 600;
}

/* Old lyric panel (hidden) */
.lyric-panel {
    display: none;
}

/* 全新的歌词页面 - 移动端风格 */
.lyric-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lyric-page.show {
    opacity: 1;
    transform: translateY(0);
}

.lyric-page.hide {
    opacity: 0;
    transform: translateY(100%);
}

.lyric-page.fullscreen {
    width: 100vw;
    height: 100vh;
    z-index: 10000;
}

/* 背景层 */
.lyric-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.lyric-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(40px);
    opacity: 0.4;
    transform: scale(1.2);
}

.lyric-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.85) 0%, 
        rgba(0, 0, 0, 0.3) 25%, 
        rgba(0, 0, 0, 0.3) 75%, 
        rgba(0, 0, 0, 0.9) 100%);
}

/* 顶部栏 */
.lyric-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    user-select: none;
    cursor: grab;
    touch-action: pan-y;
}

.lyric-header:active {
    cursor: grabbing;
}

.lyric-close, .lyric-fullscreen {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
    backdrop-filter: blur(10px);
}

.lyric-close:hover, .lyric-fullscreen:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.lyric-close:active, .lyric-fullscreen:active {
    transform: scale(0.95);
}

.lyric-song-info {
    flex: 1;
    text-align: center;
    margin: 0 20px;
}

.lyric-song-info h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.lyric-song-info p {
    margin: 5px 0 0 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

/* 歌词内容区域 */
.lyric-content {
    position: relative;
    z-index: 10;
    flex: 1;
    overflow-y: auto;
    padding: 60px 30px;
    text-align: center;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lyric-content::-webkit-scrollbar {
    display: none;
}

.lyric-line {
    margin: 35px 0;
    font-size: 26px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 20px 25px;
    border-radius: 16px;
    display: block;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    user-select: none;
}

.lyric-line:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

.lyric-line:active {
    transform: translateY(0);
}

.lyric-line.active {
    color: #fff;
    transform: scale(1.08);
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.3) 0%, rgba(29, 185, 84, 0.15) 100%);
    box-shadow: 0 15px 40px rgba(29, 185, 84, 0.4);
    font-weight: 700;
    text-shadow: 0 3px 15px rgba(29, 185, 84, 0.8);
    border: 1px solid rgba(29, 185, 84, 0.3);
}

.lyric-placeholder {
    margin: 120px 0;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

/* 底部播放器 */
.lyric-player {
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(40px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 30px;
}

.lyric-progress-container {
    margin-bottom: 20px;
}

.lyric-progress-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.lyric-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1DB954 0%, #1ed760 100%);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 15px rgba(29, 185, 84, 0.6);
}

.lyric-time-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.lyric-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
}

.lyric-control-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
    backdrop-filter: blur(10px);
}

.lyric-control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.lyric-control-btn:active {
    transform: scale(0.95);
}

.lyric-play-btn {
    background: linear-gradient(135deg, #1DB954 0%, #1ed760 100%);
    width: 60px;
    height: 60px;
    font-size: 24px;
    box-shadow: 0 8px 25px rgba(29, 185, 84, 0.4);
}

.lyric-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(29, 185, 84, 0.5);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .header-container {
        padding: 15px 20px;
        gap: 20px;
    }
    
    .main-content {
        padding: 30px 20px;
    }
    
    .top-lists {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .player-container {
        padding: 15px 20px;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 180px;
    }
    
    .header-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .logo {
        align-self: flex-start;
    }
    
    .search-bar {
        max-width: none;
        width: 100%;
    }
    
    .top-lists {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .player {
        height: auto;
        min-height: 160px;
    }
    
    .player-container {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .player-info {
        min-width: auto;
        width: 100%;
        justify-content: center;
    }
    
    .player-controls {
        order: -1;
        justify-content: center;
    }
    
    .progress-container {
        max-width: none;
        margin: 0;
        width: 100%;
    }
    
    .player-options {
        min-width: auto;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .volume-control {
        order: -1;
    }
    
    .volume-slider-container {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        width: 60px;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .lyric-modal {
        width: 95%;
        height: 90vh;
    }
    
    .lyric-modal-header {
        padding: 25px;
    }
    
    .lyric-modal-content {
        padding: 25px;
    }
    
    .lyric-line {
        font-size: 20px;
        margin: 25px 0;
    }
    
    .playlist-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    /* 移动端歌词页面优化 */
    .lyric-header {
        padding: 15px 20px;
    }
    
    .lyric-song-title {
        font-size: 18px;
    }
    
    .lyric-song-artist {
        font-size: 14px;
    }
    
    .lyric-scroll-area {
        padding: 40px 20px;
    }
    
    .lyric-scroll-area .lyric-line {
        font-size: 22px;
        margin: 30px 0;
        padding: 15px 20px;
    }
    
    .lyric-mini-player {
        padding: 20px;
    }
    
    .lyric-controls {
        gap: 25px;
    }
    
    .lyric-control-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .lyric-play-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.list-item, .song-item {
    animation: fadeIn 0.6s ease forwards;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(29, 185, 84, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(29, 185, 84, 0.7);
} 
