/* Apple Music 風格基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

@font-face {
    font-family: 'Spotify Mix';
    src: url('font/SpotifyMix-Extrabold.woff2') format('woff2'),
         url('font/SpotifyMix-Extrabold.woff') format('woff'),
         url('font/SpotifyMix-Extrabold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --background-primary: #000000;
    --background-secondary: #1C1C1E;
    --background-tertiary: #2C2C2E;
    --text-primary: #FFFFFF;
    --text-secondary: #AEAEB2;
    --text-tertiary: #8E8E93;
    --blur-background: rgba(28, 28, 30, 0.8);
    --card-background: rgba(44, 44, 46, 0.8);
    --glass-background: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --dynamic-bg-1: #667eea;
    --dynamic-bg-2: #764ba2;
    --dynamic-bg-3: #f093fb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: var(--background-primary);
    position: relative;
    overflow-x: hidden;
    background-size: 120% 120%;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-image 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1318px;
    margin: 0 auto;
    /* padding: 19px; */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* 旧的动态背景已被新系统替换 - 注释掉避免冲突 */
/*
.dynamic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: radial-gradient(circle at var(--bg-x, 50%) var(--bg-y, 50%), var(--album-color-1, #667eea) 0%, var(--album-color-2, #764ba2) 50%, transparent 100%);
}
*/

/* Apple Music 風格認證區域 */
.auth-section {
    text-align: center;
    width: 100%;
}

.auth-card {
    background: var(--glass-background);
    border-radius: 8px;
    padding: 80px 50px;
    border: 1px solid var(--glass-border);
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.auth-card h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.auth-card p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 50px;
    line-height: 1.6;
    font-weight: 400;
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-primary);
    border: none;
    padding: 18px 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.login-btn:hover::before {
    left: 100%;
}

/* 移除按鈕懸停效果 */

.login-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* 播放器區域 */
.player-section {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 113px;
    align-items: start;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Apple Music 風格音樂卡片 */
.music-card {
    /* background: var(--glass-background); */
    /* backdrop-filter: blur(40px); */
    /* border-radius: 32px; */
    padding: 20px 30px 30px 30px;
    /* box-shadow: 
        0 32px 64px var(--shadow-color),
        inset 0 1px 0 var(--glass-border); */
    /* border: 1px solid var(--glass-border); */
    position: sticky;
    top: -19px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-width: 90%;
    width: 100%;
    box-sizing: border-box;
    margin-top: -19px;
}

.music-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    /* background: linear-gradient(90deg, transparent, var(--glass-border), transparent); */
}

/* .music-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 40px 80px var(--shadow-color),
        inset 0 1px 0 var(--glass-border);
} */

.album-art {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.album-art::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 移除懸停效果 */

.album-art:hover img {
    transform: scale(1.05);
}

.play-indicator {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(29, 185, 84, 0.9);
    /* backdrop-filter: blur(10px); */
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wave-animation span {
    display: block;
    width: 3px;
    height: 12px;
    background: white;
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite;
}

.wave-animation span:nth-child(2) { animation-delay: 0.1s; }
.wave-animation span:nth-child(3) { animation-delay: 0.2s; }
.wave-animation span:nth-child(4) { animation-delay: 0.3s; }

@keyframes wave {
    0%, 40%, 100% { transform: scaleY(0.4); }
    20% { transform: scaleY(1); }
}

.track-info {
    text-align: center;
    /* margin-bottom: 32px; */
}

.track-info h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.track-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.progress-container {
    margin-top: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
    /* backdrop-filter: blur(10px);*/
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Apple Music 風格歌詞區域 */
.lyrics-container {
    /* background: var(--glass-background); */
    /* border-radius: 8px; */
    /* padding: 50px; */
    /* border: 1px solid var(--glass-border); */
    max-height: 90vh;
    max-width: 100%;
    overflow-y: hidden;
    overflow-x: hidden;
    position: relative;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.lyrics-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    /* background: linear-gradient(90deg, transparent, var(--glass-border), transparent); */
}

/* .lyrics-container:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 40px 80px var(--shadow-color),
        inset 0 1px 0 var(--glass-border);
} */

.sync-indicator {
    text-align: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 30px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1db954, #1ed760);
    border-radius: 25px;
    border: 1px solid rgba(29, 185, 84, 0.3);
    display: inline-block;
    animation: syncIndicatorPulse 2s infinite;
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
    backdrop-filter: blur(10px);
}

@keyframes syncIndicatorPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(29, 185, 84, 0.5);
        transform: scale(1.02);
    }
}

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

.lyrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.lyrics-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
}

.lyrics-controls {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.lyrics-controls button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    backdrop-filter: blur(10px);
}

.lyrics-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.lyrics-controls button:active {
    transform: scale(0.95);
}

.lyrics-controls button.active {
    background: linear-gradient(135deg, #1db954, #1ed760);
    color: white;
}

/* 歌詞選擇模態框 */
.lyrics-selection-content {
    max-width: 600px;
    width: 90%;
}

.lyrics-source-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.source-info h4 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
    font-size: 16px;
}

.source-info p {
    margin: 0 0 3px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.source-info small {
    color: var(--text-tertiary);
    font-size: 12px;
}

.select-source-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #1db954, #1ed760);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.select-source-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
}

/* 預覽設定部分 */
.preview-settings-section {
    position: relative;
    display: flex;
    align-items: center;
}

.preview-settings-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
    min-width: 140px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: fadeInScale 0.2s ease-out;
    z-index: 1000;
}

.preview-settings-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: rgba(20, 20, 20, 0.95);
    transform: rotate(45deg);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header {
    font-size: 11px;
    color: #b3b3b3;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.radio-group-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.radio-option-compact {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 12px;
}

.radio-option-compact:hover {
    background: rgba(255, 255, 255, 0.1);
}

.radio-option-compact input {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    accent-color: #1db954;
}

.radio-option-compact span {
    color: #ffffff;
    flex: 1;
    font-weight: 500;
}

.radio-option-compact input:checked + span {
    color: #1db954;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 🎵 过渡动画系统 */

/* 歌曲切换过渡动画 - 更柔和 */
@keyframes songTransition {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    30% {
        opacity: 0.7;
        transform: translateY(-5px) scale(0.99);
    }
    70% {
        opacity: 0.8;
        transform: translateY(-3px) scale(0.995);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 专辑封面淡入淡出 - 更平滑 */
@keyframes coverFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95) rotateY(5deg);
        filter: blur(2px) brightness(0.8);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.98) rotateY(2deg);
        filter: blur(1px) brightness(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
        filter: blur(0px) brightness(1);
    }
}

@keyframes coverFadeOut {
    0% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
        filter: blur(0px) brightness(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.98) rotateY(-2deg);
        filter: blur(1px) brightness(0.9);
    }
    100% {
        opacity: 0;
        transform: scale(0.95) rotateY(-5deg);
        filter: blur(2px) brightness(0.8);
    }
}

/* 文字滑入效果 - 更自然 */
@keyframes textSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-15px) translateY(5px);
        filter: blur(1px);
    }
    40% {
        opacity: 0.6;
        transform: translateX(-5px) translateY(2px);
        filter: blur(0.5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0);
        filter: blur(0px);
    }
}

/* 下一首预览动画 */
@keyframes nextSongSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes nextSongSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(-100%) scale(0.9);
    }
}

/* 进度条动画增强 */
@keyframes progressPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(29, 185, 84, 0.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(29, 185, 84, 0);
    }
}

/* 背景渐变动画 */
@keyframes backgroundShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 歌词容器过渡 */
@keyframes lyricsTransition {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 微妙的呼吸动画 */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
}

/* 播放按钮脉冲 */
@keyframes playButtonPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(29, 185, 84, 0.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(29, 185, 84, 0);
    }
}

/* 🎵 动画效果类 */

/* 专辑封面过渡效果 - 调整时间和缓动 */
.album-art.transition-out {
    animation: coverFadeOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.album-art.transition-in {
    animation: coverFadeIn 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* 文字过渡效果 - 更平滑的时间安排 */
.track-title.text-transition,
.track-artist.text-transition {
    animation: textSlideIn 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.track-title.text-transition {
    animation-delay: 0.2s;
}

.track-artist.text-transition {
    animation-delay: 0.35s;
}

/* 播放器容器过渡 - 更柔和的缓动 */
.player-section.song-changing {
    animation: songTransition 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* 下一首预览动画 */
#next-song-preview.slide-in {
    animation: nextSongSlideIn 0.5s ease-out forwards;
}

#next-song-preview.slide-out {
    animation: nextSongSlideOut 0.5s ease-out forwards;
}

/* 播放按钮动画 */
.play-btn.playing {
    animation: playButtonPulse 2s infinite;
}

/* 进度条脉冲效果 */
.progress-fill.progress-pulse::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #1db954;
    border-radius: 50%;
    animation: progressPulse 2s infinite;
}

/* 歌词容器过渡 */
.lyrics-content.lyrics-changing {
    animation: lyricsTransition 0.8s ease-out forwards;
}

/* 通用过渡效果增强 */
.album-art,
.track-title,
.track-artist,
.player-section,
.lyrics-content {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 微妙的呼吸动画 - 用于待机状态 */
.album-art.breathing {
    animation: breathe 4s ease-in-out infinite;
}

.control-btn {
    background: #f5f5f5;
    border: none;
    /* padding: 8px 16px; */
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.control-btn.active,
.control-btn:hover {
    background: linear-gradient(135deg, #1db954, #1ed760);
    color: white;
}

.lyrics-content {
    flex: 1;
    overflow-y: hidden;
    overflow-x: hidden;
    padding: 16px 0;
    line-height: 1.5;
    font-size: 38px;
    font-family: 'Spotify Mix', 'Inter', sans-serif;
    font-weight: bold;
    scroll-behavior: smooth;
    height: calc(9 * 150px); /* 9行歌詞的高度 */
    max-height: calc(9 * 150px);
}

/* 大屏幕设备 (1920px 及以上) */
@media (min-width: 1920px) {
    .lyrics-content {
        font-size: 42px;
    }
    
    .lyrics-line {
        font-size: 42px;
    }
    
    .lyrics-line.current {
        font-size: 42px;
    }
}

/* 中等屏幕设备 (1200px 到 1919px) */
@media (min-width: 1200px) and (max-width: 1919px) {
    .lyrics-content {
        font-size: 38px;
    }
    
    .lyrics-line {
        font-size: 38px;
    }
    
    .lyrics-line.current {
        font-size: 38px;
    }
}

/* 小屏幕设备 (768px 到 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .lyrics-content {
        font-size: 32px;
    }
    
    .lyrics-line {
        font-size: 32px;
        padding: 15px 0;
    }
    
    .lyrics-line.current {
        font-size: 32px;
    }
}

/* 移动设备 (767px 及以下) */
@media (max-width: 767px) {
    .lyrics-content {
        font-size: 26px;
    }
    
    .lyrics-line {
        font-size: 26px;
        padding: 12px 0;
    }
    
    .lyrics-line.current {
        font-size: 26px;
    }
}

.lyrics-line {
    padding: 20px 0;
    font-size: 38px;
    line-height: 1.8;
    color: var(--text-tertiary);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    border-radius: 16px;
    /* margin: 0 -20px; */
    padding-left: 20px;
    padding-right: 20px;
    font-weight: 400;
    letter-spacing: 0.01em;
    min-height: auto;
    display: block;
    scroll-margin: 50vh;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.lyrics-line.current {
    color: var(--text-primary);
    font-weight: 600;
    /* 移除动画和变换效果 */
    /* transform: translateX(8px); */
    /* background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(88, 86, 214, 0.1)); */
    background: rgba(0, 122, 255, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
    /* margin: 4px 0; */
    /* border-left: 3px solid #1ed760; */
    /* 移除动画 */
    /* animation: lyricsHighlight 2s ease infinite; */
}

/*
.lyrics-line.upcoming {
    color: #1ed760;
    font-weight: 500;
    opacity: 0.8;
    background: rgba(30, 215, 96, 0.05);
    border-radius: 6px;
    padding: 6px 10px;
    margin: 2px 0;
    border-left: 3px solid #1ed760;
}
*/

.lyrics-line.past {
    color: #888;
    opacity: 0.4;
    transition: all 0.3s ease;
}

/* 注释掉或删除歌词高亮动画关键帧 */
/*
@keyframes lyricsHighlight {
    0% {
        transform: translateX(8px) scale(1);
        background: linear-gradient(135deg, rgba(0, 122, 255, 0.05), rgba(88, 86, 214, 0.05));
    }
    50% {
        transform: translateX(12px) scale(1.02);
        background: linear-gradient(135deg, rgba(0, 122, 255, 0.25), rgba(88, 86, 214, 0.15));
    }
    100% {
        transform: translateX(8px) scale(1);
        background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(88, 86, 214, 0.1));
    }
}
*/

@keyframes highlight {
    0% { 
        background: transparent;
        color: var(--text-tertiary);
    }
    100% { 
        background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(88, 86, 214, 0.1));
        color: var(--text-primary);
    }
}

.lyrics-placeholder {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px 20px;
}

/* 無音樂播放狀態 */
.no-music-section {
    text-align: center;
}

.no-music-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 60px 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    /* border: 1px solid rgba(255, 255, 255, 0.2); */
}

.no-music-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    opacity: 0.7;
}

.no-music-card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.no-music-card p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.refresh-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* 狀態欄 */
.status-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    /* border: 1px solid rgba(255, 255, 255, 0.2); */
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: background 0.3s ease;
}

.status-dot.connected {
    background: #1db954;
    box-shadow: 0 0 8px rgba(29, 185, 84, 0.5);
}

.status-dot.error {
    background: #ff4757;
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.5);
}

/* 模態框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.sync-modal {
    max-width: 500px;
    width: 90%;
    margin: auto;
}

.modal-content h3 {
    margin-bottom: 24px;
    font-size: 1.3rem;
    font-weight: 600;
}

.font-size-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.font-option {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.font-option:hover,
.font-option.active {
    border-color: #1db954;
    background: rgba(29, 185, 84, 0.1);
    color: #1db954;
}

.close-btn {
    background: #f5f5f5;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #e0e0e0;
}

/* 字體大小變化 - 移除因為現在使用固定100px */
/* .lyrics-content.font-small { font-size: 0.9rem; }
.lyrics-content.font-medium { font-size: 1.1rem; }
.lyrics-content.font-large { font-size: 1.3rem; }
.lyrics-content.font-extra-large { font-size: 1.5rem; } */

/* 移除重複的歌詞高亮效果 - 使用原有的樣式 */

.lyrics-line:not(.current) {
    opacity: 0.6;
    transition: all 0.3s ease;
}

/* 播放指示器已移除 */

/* 下一首預覽樣式 */
.next-track-preview {
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.2), rgba(30, 215, 96, 0.1));
    border: 1px solid rgba(29, 185, 84, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 16px;
    backdrop-filter: blur(10px);
    animation: slideInUp 0.3s ease;
}

.next-track-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.next-label {
    color: #1db954;
    font-weight: 600;
    font-size: 0.9rem;
}

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

/* 設備信息樣式 */
.device-info {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-info::before {
    content: "📱";
    font-size: 1rem;
}

/* 音量控制改進 */
.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.volume-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #1db954, #1ed760);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.5);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #1db954, #1ed760);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3);
}

#volume-value {
    min-width: 40px;
    text-align: right;
    font-weight: 500;
    color: var(--text-secondary);
}

/* 播放控制按鈕改進 */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.control-btn.play-pause {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1db954, #1ed760);
}

.control-btn.play-pause:hover {
    background: linear-gradient(135deg, #1ed760, #1db954);
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(29, 185, 84, 0.4);
}

/* 平板設備優化 (768px 到 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 20px;
        max-width: 100vw;
    }
    
    .player-section {
        grid-template-columns: 1fr;
        gap: 28px;
        max-width: 100%;
    }
    
    .music-card {
        padding: 32px;
        max-width: 100%;
    }
    
    .lyrics-container {
        padding: 32px;
        max-width: 100%;
    }
    
    .track-info h2 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .album-art {
        width: 240px;
        height: 240px;
    }
    
    .player-controls {
        gap: 16px;
        margin: 20px 0;
    }
    
    .control-btn {
        width: 44px;
        height: 44px;
    }
    
    .control-btn.play-pause {
        width: 52px;
        height: 52px;
    }
    
    .extra-controls {
        gap: 14px;
        margin: 18px 0;
    }
    
    .volume-control {
        margin: 20px 0;
    }
    
    .progress-container {
        margin: 24px 0;
    }
    
    .auth-card,
    .no-music-card {
        padding: 48px 32px;
        max-width: 90%;
    }
    
    .auth-card h1,
    .no-music-card h2 {
        font-size: 2.2rem;
    }
    
    .login-btn,
    .refresh-btn {
        padding: 14px 32px;
        font-size: 1.1rem;
    }
}

/* 手機頁面指示器 */
.mobile-page-indicator {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 8px 16px;
    z-index: 999;
    align-items: center;
    gap: 12px;
}

.page-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-dot.active {
    background: #1db954;
    transform: scale(1.2);
}

.swipe-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* 手機版歌詞頁面控制 */
.mobile-lyrics-controls {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-track-info {
    text-align: center;
    margin-bottom: 16px;
}

.mobile-track-info h3 {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-track-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mobile-player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.mobile-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.mobile-control-btn.mobile-play-pause {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1db954, #1ed760);
}

.mobile-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.mobile-control-btn.mobile-play-pause:hover {
    background: linear-gradient(135deg, #1ed760, #1db954);
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(29, 185, 84, 0.4);
}

/* 手機導航按鈕 */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    z-index: 1000;
    gap: 8px;
    justify-content: center;
}

.mobile-nav-btn {
    flex: 1;
    max-width: 150px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 12px;
    color: var(--text-secondary);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-nav-btn svg {
    width: 28px;
    height: 28px;
}

.mobile-nav-btn.active {
    background: linear-gradient(135deg, #1db954, #1ed760);
    color: white;
}

.mobile-nav-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* 歌詞控制按鈕 - 固定右側自動隱藏 */
.lyrics-controls {
    position: fixed;
    right: -200px; /* 初始隱藏 */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px 0 0 12px;
    padding: 16px 12px;
    z-index: 1000;
    transition: right 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
}

.lyrics-controls:hover,
.lyrics-controls.show {
    right: 0;
}

.lyrics-controls::before {
    content: '⚙️';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 8px 0 0 8px;
    padding: 8px 6px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
}

.lyrics-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    justify-content: center;
}

.lyrics-control-btn svg {
    width: 18px;
    height: 18px;
}

.lyrics-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lyrics-control-btn:active {
    transform: translateY(0);
    background: rgba(29, 185, 84, 0.3);
}

.lyrics-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.lyrics-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
}

/* 字體大小即時更新 */
.lyrics-content {
    transition: none !important; /* 移除字體變化的過渡效果 */
}

/* 歌詞當前行即時變色 */
.lyrics-line {
    transition: none !important; /* 移除歌詞行的所有過渡效果 */
}

.lyrics-line.current {
    transition: none !important; /* 移除當前歌詞行的過渡效果 */
}

.lyrics-content.font-small {
    font-size: 18px !important;
}

.lyrics-content.font-medium {
    font-size: 24px !important;
}

.lyrics-content.font-large {
    font-size: 30px !important;
}

.lyrics-content.font-extra-large {
    font-size: 36px !important;
}

/* 手機設備優化 */
@media (max-width: 767px) {
    .container {
        padding: 16px;
        padding-top: 60px; /* 為頂部指示器留空間 */
        max-width: 100vw;
        overflow-x: hidden;
        padding-bottom: 80px; /* 為底部導航留空間 */
    }
    
    .player-section {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .music-card,
    .lyrics-container {
        padding: 24px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .auth-card,
    .no-music-card {
        padding: 40px 24px;
    }
    
    .track-info h2 {
        font-size: 1.8rem;
        max-width: 100%;
        word-wrap: break-word;
        text-align: center; /* 置中歌曲標題 */
    }
    
    .track-info p {
        text-align: center; /* 置中歌手和專輯名稱 */
    }
    
    .lyrics-content {
        text-align: center; /* 手機版歌詞置中 */
        font-size: 22px !important; /* 手機版歌詞放大 */
        line-height: 1.6; /* 增加行高改善閱讀體驗 */
    }
    
    .lyrics-line {
        text-align: center; /* 歌詞行置中 */
        max-width: 80%; /* 限制寬度不超過80% */
        margin: 0 auto; /* 置中顯示 */
        word-wrap: break-word; /* 自動換行 */
        word-break: break-word; /* 強制換行 */
        white-space: normal; /* 允許正常換行 */
        padding: 8px 0; /* 增加上下間距 */
    }
    
    .album-art {
        width: 180px;
        height: 180px;
        margin: 0 auto; /* 置中封面 */
    }
    
    .player-controls {
        gap: 12px;
        margin: 16px 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .control-btn.play-pause {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .extra-controls {
        gap: 10px;
        margin: 14px 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .volume-control {
        margin: 16px 0;
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .volume-slider {
        width: 80%;
        max-width: 200px;
    }
    
    .progress-container {
        margin: 20px 0;
    }
    
    .progress-bar {
        height: 6px;
        margin: 12px 0;
    }
    
    .time-info {
        font-size: 0.9rem;
    }
    
    .lyrics-header {
        justify-content: flex-start;
        gap: 12px;
    }
    
    .lyrics-controls {
        position: fixed;
        right: -160px; /* 預設隱藏 */
        top: 50%; /* 垂直居中 */
        transform: translateY(-50%);
        padding: 12px 8px;
        transition: right 0.3s ease; /* 恢復過渡效果 */
        background: rgba(29, 185, 84, 0.9);
        backdrop-filter: blur(10px);
        border-radius: 12px 0 0 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    /* 手機版顯示狀態 */
    .lyrics-controls.mobile-show {
        right: 0;
    }
    
    /* 手機版歌詞控制觸發按鈕 - 美化版 */
    .lyrics-controls::before {
        content: '🎵';
        position: fixed;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        background: linear-gradient(135deg, #1db954, #1ed760);
        color: white;
        border-radius: 50%;
        font-size: 18px;
        cursor: pointer;
        z-index: 1000;
        box-shadow: 0 6px 20px rgba(29, 185, 84, 0.4);
        backdrop-filter: blur(15px);
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: 2px solid rgba(255, 255, 255, 0.2);
        opacity: 0.85;
    }
    
    /* 懸停效果 */
    .lyrics-controls::before:hover {
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 8px 25px rgba(29, 185, 84, 0.6);
        opacity: 1;
    }
    
    /* 點擊效果 */
    .lyrics-controls::before:active {
        transform: translateY(-50%) scale(0.95);
    }
    
    .lyrics-control-btn {
        font-size: 11px;
        padding: 8px 10px;
        min-width: 70px;
        touch-action: manipulation; /* 改善觸控體驗 */
    }
    
    /* 手機版歌詞特殊樣式 */
    .lyrics-line.current {
        font-size: 24px !important; /* 當前歌詞稍微大一點 */
        font-weight: 600; /* 加粗當前歌詞 */
        padding: 12px 0; /* 當前歌詞更多間距 */
    }
    
    .auth-card,
    .no-music-card {
        padding: 32px 20px;
        max-width: 95%;
        margin: 0 auto;
    }
    
    .auth-card h1,
    .no-music-card h2 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 16px;
    }
    
    .auth-card p,
    .no-music-card p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 24px;
    }
    
    .login-btn,
    .refresh-btn {
        padding: 12px 24px;
        font-size: 1rem;
        min-height: 48px;
        width: 100%;
        max-width: 280px;
    }
    
    /* 歌詞區域手機優化 */
    .lyrics-content {
        font-size: 22px;
        line-height: 1.6;
        padding: 12px 0;
    }
    
    .lyrics-line {
        font-size: 22px;
        padding: 10px 0;
        text-align: center;
    }
    
    .lyrics-line.current {
        font-size: 24px;
        padding: 12px 0;
    }
    
    /* 模態框手機優化 */
    .modal-content {
        max-width: 95%;
        max-height: 85vh;
        margin: 20px auto;
        padding: 20px;
    }
    
    .playlist-content,
    .devices-content {
        max-height: 50vh;
    }
    
    .playlist-item,
    .device-item {
        padding: 16px 12px;
        margin-bottom: 8px;
    }
    
    .playlist-item img {
        width: 40px;
        height: 40px;
    }
    
    .playlist-item-title,
    .device-name {
        font-size: 14px;
        font-weight: 600;
    }
    
    .playlist-item-artist,
    .device-type {
        font-size: 12px;
    }
    
    /* 設備信息優化 */
    .device-info {
        margin-top: 8px;
        font-size: 0.9rem;
    }
    
    /* 下一首預覽優化 */
    .next-track-preview {
        padding: 12px;
        margin-top: 16px;
    }
    
    .next-track-info {
        font-size: 0.9rem;
        text-align: center;
    }
    
    /* 狀態欄優化 */
    .status-bar {
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 8px 12px;
        gap: 16px;
        flex-direction: column;
        align-items: center;
    }
    
    .status-item {
        font-size: 0.8rem;
        gap: 6px;
    }
    
    .status-dot {
        width: 8px;
        height: 8px;
    }
    
    .status-bar {
        bottom: 16px;
        right: 16px;
        left: 16px;
        justify-content: center;
    }
}

/* 下一首歌曲預覽樣式 */
.next-song-preview {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px;
    min-width: 280px;
    max-width: 320px;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideInFromRight 0.5s ease-out;
}

.next-song-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.next-song-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.next-song-label {
    font-size: 12px;
    font-weight: 600;
    color: #1db954;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.next-song-settings-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.next-song-settings-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.next-song-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.next-song-cover {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.next-song-details {
    flex: 1;
    min-width: 0;
}

.next-song-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.next-song-artist {
    font-size: 12px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 下一首歌曲設定樣式 */
.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.radio-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.radio-option span {
    font-size: 14px;
    color: #b3b3b3;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + span {
    color: #1db954;
    font-weight: 500;
}

/* 手機版適配 */
@media (max-width: 767px) {
    .next-song-preview {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* 改进滚动条样式 */
.lyrics-content::-webkit-scrollbar {
    width: 6px;
}

.lyrics-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.lyrics-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.lyrics-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 額外控制按鈕樣式 */
.extra-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
}

.extra-controls .control-btn {
    width: 40px;
    height: 40px;
}

.control-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.4);
}

.control-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 播放清單內容樣式 */
.playlist-content {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.playlist-item:hover {
    background: var(--glass-border);
    transform: translateY(-2px);
}

.playlist-item.current {
    background: var(--primary-color);
    color: white;
}

.playlist-item img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    margin-right: 12px;
}

.playlist-item-info {
    flex: 1;
}

.playlist-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.playlist-item-artist {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 設備列表內容樣式 */
.devices-content {
    max-height: 300px;
    overflow-y: auto;
    margin: 20px 0;
}

.device-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.device-item:hover {
    background: var(--glass-border);
    transform: translateY(-2px);
}

.device-item.active {
    background: var(--primary-color);
    color: white;
}

.device-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    opacity: 0.7;
}

.device-info-modal {
    flex: 1;
}

.device-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.device-type {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 喜歡按鈕增強樣式 */
.control-btn.liked {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52) !important;
    color: white !important;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    transform: scale(1.05);
}

.control-btn.liked:hover {
    background: linear-gradient(135deg, #ee5a52, #ff6b6b) !important;
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.6);
    transform: scale(1.1);
}

/* 心跳動畫 */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.15);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.15);
    }
    70% {
        transform: scale(1);
    }
}

/* 按鈕狀態切換動畫 */
.control-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.control-btn:active::before {
    width: 100px;
    height: 100px;
}

/* 喜歡按鈕特殊效果 */
.control-btn.liked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    animation: likeGlow 0.6s ease-out;
}

@keyframes likeGlow {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(1.3);
    }
}

/* 按鈕懸停時的微妙動畫 */
.control-btn:not(.liked):hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 未喜歡狀態的按鈕樣式改進 */
.control-btn:not(.liked) {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 超小屏幕設備優化 (480px 以下) */
@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    /* .music-card,
    .lyrics-container {
        padding: 16px;
    } */
    
    .track-info h2 {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    .track-info p {
        font-size: 0.9rem;
    }
    
    .album-art {
        width: 150px;
        height: 150px;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .control-btn.play-pause {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .lyrics-content {
        font-size: 16px;
        padding: 8px 0;
    }
    
    .lyrics-line {
        font-size: 18px;
        padding: 8px 0;
    }
    
    .lyrics-line.current {
        font-size: 24px;
        padding: 10px 0;
    }
    
    .auth-card h1,
    .no-music-card h2 {
        font-size: 1.6rem;
    }
    
    .auth-card p,
    .no-music-card p {
        font-size: 0.9rem;
    }
    
    .modal-content {
        max-width: 98%;
        margin: 10px auto;
        padding: 16px;
    }
}

/* 橫屏模式優化 */
@media (max-width: 767px) and (orientation: landscape) {
    .player-section {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        height: 100vh;
        overflow-y: auto;
    }
    
    .music-card {
        padding: 20px;
    }
    
    .lyrics-container {
        padding: 20px;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .album-art {
        width: 120px;
        height: 120px;
    }
    
    .track-info h2 {
        font-size: 1.3rem;
    }
    
    .auth-card,
    .no-music-card {
        padding: 24px 20px;
        max-width: 80%;
    }
}

.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

/* 模態框深色主題 */
.modal-content {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.modal-content h3 {
    color: var(--text-primary);
}

/* 歌詞搜尋模態框特定樣式 */
.lyrics-search-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--background-secondary);
}

.search-form {
    margin-bottom: 20px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--glass-border);
    border-radius: 8px;
    background: var(--background-primary);
    color: var(--text-primary);
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.search-btn:hover {
    background: var(--accent-color-hover);
    transform: translateY(-2px);
}

.current-track-info {
    padding: 15px;
    background: var(--background-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border: 1px solid var(--glass-border);
}

.current-label {
    font-weight: 600;
    color: var(--accent-color);
}

.search-current-btn {
    padding: 6px 12px;
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

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

.search-results h4 {
    margin-bottom: 15px;
    color: var(--accent-color);
    font-size: 1.1rem;
}

.results-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.result-item {
    padding: 15px;
    background: var(--glass-bg);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.result-item:hover {
    background: var(--background-hover);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 185, 84, 0.2);
}

.result-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.result-artist {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.result-preview {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-source {
    display: inline-block;
    padding: 2px 8px;
    background: var(--accent-color);
    color: white;
    border-radius: 12px;
    font-size: 10px;
    margin-top: 8px;
    font-weight: 500;
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 40px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--glass-border);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-actions {
    margin-top: 20px;
    text-align: center;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.no-results svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 搜尋結果滾動條樣式 */
.results-container::-webkit-scrollbar {
    width: 6px;
}

.results-container::-webkit-scrollbar-track {
    background: var(--background-primary);
    border-radius: 3px;
}

.results-container::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.results-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* 移動設備適應 */
@media (max-width: 768px) {
    .lyrics-search-modal {
        max-width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .current-track-info {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .result-item {
        padding: 12px;
    }
    
    .results-container {
        max-height: 300px;
    }
}

/* 动态背景系统已完全移除 */

/* 动态渐变层已移除 */

/* 粒子背景层已移除 */

/* 所有动态背景CSS已完全移除 */

/* �q���W�ǼҺA�ؼ˦� */
.lyrics-upload-modal {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.upload-section {
    margin-bottom: 20px;
}

.upload-methods {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.upload-method {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.upload-method h4 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.upload-method input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-method textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
}

.file-info {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

.upload-actions, .edit-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.apply-btn, .preview-btn, .save-btn, .export-btn, .reset-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apply-btn, .save-btn {
    background: var(--accent-color);
    color: white;
}

.apply-btn:hover, .save-btn:hover {
    background: var(--accent-hover);
}

.preview-btn, .export-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.preview-btn:hover, .export-btn:hover {
    background: var(--hover-bg);
}

.reset-btn {
    background: #dc3545;
    color: white;
}

.reset-btn:hover {
    background: #c82333;
}

/* 美化设置下拉选择器 */
.setting-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.setting-select:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.setting-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.3);
}

/* 美化操作按钮 */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.action-btn.primary {
    background: linear-gradient(135deg, #1db954, #1ed760);
    color: white;
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #1ed760, #1db954);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
}

.action-btn.danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.action-btn.danger:hover {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
    transform: translateY(0);
}

/* 美化复选框 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #1db954, #1ed760);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

input:focus + .slider {
    box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.3);
}

/* 美化歌词文件输入框 */
#lyrics-file-input {
    padding: 12px;
    border-radius: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    width: 100%;
    cursor: pointer;
}

#lyrics-file-input:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

#lyrics-file-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.3);
}

.upload-preview {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.upload-preview h4 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.preview-content {
    max-height: 200px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* �q���s��ҺA�ؼ˦� */
.lyrics-edit-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.edit-section {
    margin-bottom: 20px;
}

.edit-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.mode-toggle-btn, .toolbar-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-toggle-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.toolbar-btn:hover {
    background: var(--hover-bg);
}

.edit-container {
    min-height: 300px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    margin-bottom: 15px;
}

.visual-editor {
    padding: 15px;
    min-height: 280px;
}

.text-editor {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

.text-editor:focus {
    outline: none;
}

.lyric-line-editor {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lyric-line-editor:hover {
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

.lyric-line-editor.active {
    border-color: var(--accent-color);
    background: rgba(29, 185, 84, 0.1);
}

.timestamp-input {
    width: 80px;
    padding: 4px 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 12px;
    text-align: center;
    margin-right: 10px;
}

.lyric-text-input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
}

.line-actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.line-action-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.line-action-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}
