/* 苹果设计规范样式 - 横屏16:9优化 */

:root {
    --system-blue: #007AFF;
    --system-background: #F2F2F7;
    --system-background-secondary: #FFFFFF;
    --system-background-tertiary: #F9F9F9;
    --system-label: #000000;
    --system-label-secondary: #3C3C43;
    --system-label-tertiary: #787880;
    --system-separator: #C6C6C8;
    --system-shadow: rgba(0, 0, 0, 0.1);
    --system-corner-radius: 12px;
    --system-corner-radius-large: 16px;
    --system-spacing-xs: 4px;
    --system-spacing-sm: 8px;
    --system-spacing-md: 16px;
    --system-spacing-lg: 24px;
    --system-spacing-xl: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    color: var(--system-label);
    background-color: var(--system-background);
    -webkit-font-smoothing: antialiased;
    overflow: hidden; /* 移除滚动条 */
}

.app-container {
    width: 100vw;
    height: 100vh;
    background: transparent; /* 改为透明，让背景层显示 */
    position: relative;
    overflow: hidden; /* 确保没有滚动条 */
}

/* 风光背景层 */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; /* 改为正数，确保在最底层 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8; /* 恢复半透明效果 */
    transition: opacity 0.5s ease;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.3) 0%,
        rgba(118, 75, 162, 0.3) 50%,
        rgba(255, 107, 107, 0.3) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.status-bar {
    height: 44px;
    padding: 0 var(--system-spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000; /* 提高层级，确保在背景之上 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-bar-left .time {
    font-weight: 600;
    font-size: 15px;
    color: white;
}

.status-bar-right {
    display: flex;
    align-items: center;
    gap: var(--system-spacing-xs);
}

.signal, .wifi, .battery {
    width: 20px;
    height: 12px;
    background: white;
    border-radius: 2px;
}

.signal {
    clip-path: polygon(0 100%, 20% 100%, 40% 60%, 60% 80%, 80% 40%, 100% 60%, 100% 100%);
}

.wifi {
    clip-path: polygon(50% 0%, 0% 100%, 20% 100%, 50% 30%, 80% 100%, 100% 100%);
}

.battery {
    position: relative;
}

.battery::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 6px;
    background: white;
    border-radius: 0 1px 1px 0;
}

.main-content {
    padding: 0 var(--system-spacing-md) var(--system-spacing-xl);
    height: calc(100vh - 44px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 100; /* 确保在背景之上 */
}

.app-header {
    text-align: center;
    padding: var(--system-spacing-sm) 0;
    flex-shrink: 0;
}

.app-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: var(--system-spacing-sm);
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.app-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* 主内容区域布局 - 横屏16:9优化 */
.main-content-area {
    display: flex;
    gap: var(--system-spacing-xl);
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

/* 左侧媒体信息面板 */
.left-panel {
    flex: 0 0 360px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 让内容垂直居中 */
    gap: var(--system-spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--system-corner-radius-large);
    padding: var(--system-spacing-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 媒体信息样式 */
.media-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--system-spacing-md);
    margin-bottom: var(--system-spacing-lg);
}

.cover-container {
    width: 180px;
    height: 180px;
    border-radius: var(--system-corner-radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--system-spacing-sm);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.cover-placeholder svg {
    width: 40px;
    height: 40px;
    stroke: currentColor;
    stroke-width: 1.5;
    opacity: 0.8;
}

.cover-placeholder span {
    font-size: 14px;
    font-weight: 500;
}

.cover-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audio-info {
    text-align: center;
}

.audio-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: var(--system-spacing-lg) 0 0 0; /* 增加与封面的间距 */
    line-height: 1.3;
    word-break: break-word;
    max-width: 320px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 迷你歌词容器样式 */
.mini-lyrics-container {
    background: transparent;
    overflow: hidden;
    margin: var(--system-spacing-md) 0;
}

.mini-lyrics-content {
    height: 144px; /* 6行歌词的高度：6 * 24px */
    overflow-y: auto;
    padding: var(--system-spacing-xs);
}

.mini-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    gap: var(--system-spacing-sm);
}

.mini-empty-state svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 1.5;
    opacity: 0.7;
}

.mini-empty-state span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.mini-lyrics-line {
    padding: var(--system-spacing-xs) var(--system-spacing-sm);
    margin: 0;
    border-radius: var(--system-corner-radius);
    font-size: 15px;
    line-height: 1.2; /* 调整行高以适应双语 */
    min-height: 24px; /* 最小高度，允许双语扩展 */
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    text-align: center;
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mini-lyrics-line:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.mini-lyrics-line.active {
    background: transparent;
    color: white;
    font-weight: 600;
    font-size: 18px;
    transform: scale(1.05);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 迷你双语歌词样式 */
.mini-lyrics-original {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.mini-lyrics-translation {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-style: italic;
}

.mini-lyrics-line.active .mini-lyrics-original {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.mini-lyrics-line.active .mini-lyrics-translation {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.audio-player-container {
    margin-top: var(--system-spacing-lg);
}

audio {
    width: 100%;
    height: 40px;
    border-radius: var(--system-corner-radius);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 右侧当前歌词显示面板 */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--system-corner-radius-large);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: var(--system-spacing-lg);
    position: relative;
}

/* 当前歌词容器样式 */
.current-lyrics-container {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start; /* 左上角对齐 */
    justify-content: flex-start;
    padding: var(--system-spacing-xs) var(--system-spacing-lg) 0 var(--system-spacing-lg); /* 顶部更靠上 */
    margin-bottom: var(--system-spacing-md);
}

.current-lyrics-content {
    width: 100%;
    text-align: left; /* 左对齐 */
}

.current-lyrics-line {
    margin: 0;
    border-radius: var(--system-corner-radius);
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 4px 16px rgba(0, 255, 255, 0.4);
    max-width: 100%;
    word-wrap: break-word;
}

.current-lyrics-line.active {
    color: white;
    font-weight: 700;
    transform: scale(1.02);
    text-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* 当前歌词原文样式 */
.current-lyrics-original {
    font-size: 32px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--system-spacing-md);
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    line-height: 1.3;
}

/* 当前歌词翻译样式 */
.current-lyrics-translation {
    font-size: 26px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    font-style: italic;
    line-height: 1.3;
}

.current-lyrics-line.active .current-lyrics-original {
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.current-lyrics-line.active .current-lyrics-translation {
    font-size: 26px;
    color: rgba(255, 255, 255, 0.9);
}

/* 当前歌词空状态样式 */
.current-empty-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* 左上角对齐 */
    justify-content: flex-start;
    height: 100%;
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    padding: var(--system-spacing-md);
}

.current-empty-icon {
    width: 48px;
    height: 48px;
    stroke: currentColor;
    stroke-width: 1.5;
    margin-bottom: var(--system-spacing-md);
    opacity: 0.8;
}

.current-empty-state p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* 注释歌词容器（右侧栏中央） */
.annotated-lyrics-container {
    flex: 1; /* 占据剩余空间 */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 0 var(--system-spacing-lg) var(--system-spacing-md) var(--system-spacing-lg);
}

.annotated-lyrics-content {
    width: 100%;
    max-width: 980px;
    text-align: center;
    font-size: 20px; /* 注释字体整体放大约4px */
    height: 100%;
    overflow: hidden; /* 由脚本进行平滑滚动 */
}

.annotated-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    gap: var(--system-spacing-md);
}

.annotated-empty-icon {
    width: 40px;
    height: 40px;
    stroke: currentColor;
    opacity: 0.8;
}

.annotated-line {
    margin: var(--system-spacing-sm) 0;
    padding: var(--system-spacing-md) var(--system-spacing-lg);
    border-radius: var(--system-corner-radius);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.annotated-line .line-text {
    display: none;
}

.annotated-line .annotation {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(140px, 1.2fr) minmax(160px, 1.5fr);
    column-gap: var(--system-spacing-md);
    row-gap: var(--system-spacing-sm);
    justify-items: start;
    align-items: center; /* 同行内内容竖直方向居中对齐 */
}

.token-unit {
    display: contents; /* 让子项参与父级grid以实现纵向对齐 */
}

.token-original,
.token-roma,
.token-zh,
.token-note {
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: 100%;
}

/* 注释各部分的相对字号微调 */
.token-original { font-size: 1.15em; font-weight: 700; }
.token-zh { font-size: 1.05em; }
.token-roma { font-size: 1em; font-style: italic; }
.token-note { font-size: 0.95em; }

.token-original {
    font-weight: 700;
}
.token-original ruby {
    ruby-position: over;
}

.token-original rt {
    font-size: 0.7em; /* 片假名更小四号 */
    line-height: 1;
    opacity: 0.9;
}


.token-roma {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.token-zh {
    color: rgba(255, 255, 255, 0.9);
}

.token-note {
    color: rgba(255, 255, 255, 0.7);
}



.lyrics-container {
    flex: 1;
    overflow-y: auto;
    background: transparent;
    padding: 0;
}

.lyrics-content {
    padding: 0;
    min-height: 100%;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: var(--system-spacing-xl);
}

.empty-icon {
    width: 64px;
    height: 64px;
    stroke: currentColor;
    stroke-width: 1.5;
    margin-bottom: var(--system-spacing-md);
    opacity: 0.8;
}

.empty-state p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lyrics-line {
    padding: var(--system-spacing-md);
    margin: var(--system-spacing-xs) 0;
    border-radius: var(--system-corner-radius);
    font-size: 18px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    cursor: pointer;
    user-select: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lyrics-line:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.lyrics-line.active {
    background: transparent;
    color: white;
    font-weight: 600;
    font-size: 22px;
    transform: scale(1.05);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* 双语歌词样式 */
.lyrics-original {
    font-size: 18px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--system-spacing-xs);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lyrics-translation {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    font-style: italic;
}

.lyrics-line.active .lyrics-original {
    font-size: 22px;
    font-weight: 600;
    color: white;
}

.lyrics-line.active .lyrics-translation {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

.safe-area-bottom {
    height: env(safe-area-inset-bottom);
    background: transparent;
}

/* 滚动条样式 */
.lyrics-container::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.lyrics-container::-webkit-scrollbar-track {
    background: transparent;
}

.lyrics-container::-webkit-scrollbar-thumb {
    background: transparent;
}

.mini-lyrics-content::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.mini-lyrics-content::-webkit-scrollbar-track {
    background: transparent;
}

.mini-lyrics-content::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 2px;
}

.mini-lyrics-content::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

/* 横屏16:9优化 */
@media (min-aspect-ratio: 16/9) {
    .main-content-area {
        gap: var(--system-spacing-xl);
        padding: 0 var(--system-spacing-lg);
    }
    
    .left-panel {
        flex: 0 0 400px;
        justify-content: center; /* 确保横屏下也居中 */
    }
    
    .cover-container {
        width: 220px;
        height: 220px;
    }
    
    .audio-title {
        font-size: 20px;
        max-width: 400px;
        margin: var(--system-spacing-xl) 0 0 0; /* 横屏下增加更多间距 */
    }
    
    .lyrics-title {
        font-size: 28px;
    }
    
    .lyrics-line {
        font-size: 20px;
        padding: var(--system-spacing-lg);
    }
    
    
    .current-lyrics-original {
        font-size: 38px;
    }
    
    .current-lyrics-translation {
        font-size: 32px;
    }
    
    .current-lyrics-line.active {
        font-size: 38px;
    }
    
    .current-lyrics-line.active .current-lyrics-original {
        font-size: 38px;
    }
    
    .current-lyrics-line.active .current-lyrics-translation {
        font-size: 32px;
    }
    
    /* 横屏模式下的自定义播放器优化 */
    .custom-player {
        padding: var(--system-spacing-lg);
    }
    
    .play-pause-btn {
        width: 56px;
        height: 56px;
    }
    
    .play-icon, .pause-icon {
        width: 24px;
        height: 24px;
    }
    
    .progress-bar {
        height: 6px;
    }
    
    .progress-handle {
        width: 16px;
        height: 16px;
    }
    
    .time-display {
        font-size: 14px;
    }
}

/* 竖屏适配 */
@media (max-aspect-ratio: 16/9) {
    .main-content-area {
        flex-direction: column;
        gap: var(--system-spacing-lg);
    }
    
    .left-panel {
        flex: none;
        width: 100%;
        max-width: 450px;
        margin: 0 auto;
        justify-content: center; /* 确保竖屏下也居中 */
    }
    
    .right-panel {
        flex: 1;
        min-height: 300px;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .main-content {
        padding: 0 var(--system-spacing-sm) var(--system-spacing-lg);
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .app-subtitle {
        font-size: 14px;
    }
    
    .left-panel {
        padding: var(--system-spacing-md);
        justify-content: center; /* 确保移动端也居中 */
    }
    
    .cover-container {
        width: 160px;
        height: 160px;
    }
    
    .audio-title {
        font-size: 16px;
        max-width: 300px;
        margin: var(--system-spacing-md) 0 0 0; /* 移动端适当减少间距 */
    }
    
    .lyrics-header {
        padding: var(--system-spacing-md);
    }
    
    .lyrics-title {
        font-size: 20px;
    }
    
    .lyrics-line {
        font-size: 16px;
        padding: var(--system-spacing-md);
    }
}

@media (max-width: 480px) {
    .status-bar {
        padding: 0 var(--system-spacing-sm);
    }
    
    .main-content {
        padding: 0 var(--system-spacing-xs) var(--system-spacing-md);
    }
    
    .app-header {
        padding: var(--system-spacing-md) 0;
    }
    
    .app-title {
        font-size: 20px;
    }
    
    .left-panel {
        padding: var(--system-spacing-sm);
        justify-content: center; /* 确保小屏幕也居中 */
    }
    
    .audio-title {
        font-size: 15px;
        max-width: 280px;
        margin: var(--system-spacing-sm) 0 0 0; /* 小屏幕下减少间距 */
    }
    
    .lyrics-line {
        font-size: 15px;
        padding: var(--system-spacing-sm);
    }
}

/* 深色主题优化 */
@media (prefers-color-scheme: dark) {
    :root {
        --system-background: #000000;
        --system-background-secondary: #1C1C1E;
        --system-background-tertiary: #2C2C2E;
        --system-label: #FFFFFF;
        --system-label-secondary: #EBEBF5;
        --system-label-tertiary: #EBEBF599;
        --system-separator: #38383A;
        --system-shadow: rgba(0, 0, 0, 0.3);
    }
    
    .background-overlay {
        background: linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(0, 0, 0, 0.4) 100%
        );
    }
}

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

@keyframes backgroundShift {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.05) rotate(1deg);
    }
}

.left-panel,
.right-panel {
    animation: fadeIn 0.6s ease-out;
}

.background-image {
    animation: backgroundShift 20s ease-in-out infinite;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .lyrics-line:active {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.98);
    }
}

/* 侧边菜单样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000; /* 提高层级，确保在最上层 */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(320px);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--system-spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.sidebar-close {
    background: none;
    border: none;
    padding: var(--system-spacing-sm);
    border-radius: var(--system-corner-radius);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-close svg {
    width: 20px;
    height: 20px;
}

.sidebar-nav {
    padding: var(--system-spacing-lg);
}

.nav-section {
    margin-bottom: var(--system-spacing-xl);
}

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-section-title {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--system-spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    margin-bottom: var(--system-spacing-md);
}

.nav-item:last-child {
    margin-bottom: 0;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: var(--system-spacing-md);
    padding: var(--system-spacing-md) var(--system-spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--system-corner-radius);
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.nav-button:hover {
    background: var(--system-blue);
    color: white;
    border-color: var(--system-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.nav-button.secondary:hover {
    background: #FF3B30;
    border-color: #FF3B30;
    box-shadow: 0 4px 20px rgba(255, 59, 48, 0.3);
}

.nav-button:active {
    transform: translateY(0);
}

.nav-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    flex-shrink: 0;
}

.nav-button span {
    flex: 1;
}

/* 菜单切换按钮 */
.menu-toggle {
    background: none;
    border: none;
    padding: var(--system-spacing-sm);
    border-radius: var(--system-corner-radius);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1500; /* 提高层级，确保在背景之上但在菜单之下 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 移动端侧边菜单优化 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        left: -100%;
    }
    
    .sidebar.open {
        transform: translateX(100%);
    }
}

@media (max-width: 480px) {
    .sidebar-nav {
        padding: var(--system-spacing-md);
    }
    
    .nav-button {
        padding: var(--system-spacing-sm) var(--system-spacing-md);
        font-size: 15px;
    }
}

/* 文件项样式 */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--system-spacing-md);
    margin: var(--system-spacing-xs) 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--system-corner-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    min-height: 48px;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.file-details {
    flex: 1;
    min-width: 0;
    margin-right: var(--system-spacing-sm);
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.file-type {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.file-size {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    flex-shrink: 0;
    text-align: right;
}

/* 文件信息样式 */
.file-info {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: var(--system-spacing-sm) 0;
    text-align: center;
    transition: all 0.3s ease;
}

.file-info.success {
    color: #34C759;
    font-weight: 500;
}

/* 文件选择器样式 */
#file-selector {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* 自定义播放器样式 */
.custom-player {
    display: flex;
    flex-direction: column;
    gap: var(--system-spacing-md);
    padding: var(--system-spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--system-corner-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-controls {
    display: flex;
    justify-content: center;
}

.play-pause-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9);
}

.play-pause-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
    color: white;
}

.play-pause-btn:active {
    transform: scale(0.95);
}

.play-icon, .pause-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.player-progress {
    display: flex;
    flex-direction: column;
    gap: var(--system-spacing-sm);
}

.progress-bar {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--system-blue), #34C759);
    border-radius: 2px;
    transition: width 0.1s ease;
    width: 0%;
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    opacity: 0;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.progress-bar:hover .progress-fill {
    background: linear-gradient(90deg, #34C759, var(--system-blue));
}

.time-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--system-spacing-xs);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.current-time {
    color: rgba(255, 255, 255, 0.9);
}

.time-separator {
    color: rgba(255, 255, 255, 0.5);
}

.total-time {
    color: rgba(255, 255, 255, 0.7);
}

/* 已选择文件列表样式 */
.selected-files-list {
    margin-top: var(--system-spacing-sm);
    max-height: 200px;
    overflow-y: auto;
}

.selected-files-list::-webkit-scrollbar {
    width: 4px;
}

.selected-files-list::-webkit-scrollbar-track {
    background: transparent;
}

.selected-files-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.selected-files-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
