/* 基础样式保持不变 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    overflow: hidden;
    height: 100vh;
    background-color: black;
    
}

.learn-container {
    display: flex;
    height: 100vh;
    background-color: #1a1a1a;
    color: white;
    overflow: hidden;
    position: relative;
}

.video-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: all 0.3s ease;
    width: 100%;
    position: relative; /* 添加相对定位 */

}


.video-container {
    position: relative;
    width: 100%;
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    background-color: #000;
    min-height: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#videoPlayer {
    width: 100%;
    height: 100%;
    outline: none;
    cursor: pointer;
}

/* 自定义控制条 - 优化后 */
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 20;
}

.video-container:hover .custom-controls {
    opacity: 1;
    pointer-events: all;
}

.custom-progress {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    margin-bottom: 10px;
    cursor: pointer;
    position: relative;
}

.custom-progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.custom-controls-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.custom-controls-left, .custom-controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-controls-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s;
}

.custom-controls-btn:hover {
    background: rgba(255,255,255,0.2);
}

.custom-time {
    font-size: 0.9rem;
    color: white;
}

/* 控制按钮组样式 - 移动到控制条中 */
.control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.control-group {
    display: flex;
    gap: 5px;
    align-items: center;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 0.85rem;
}

.checkbox-group input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

/* 新增：小按钮样式 */
.btn-small {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    min-width: 32px;
    height: 28px;
}

.btn-small.active {
    background: #3498db;
    color: white;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.5);
}

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

/* 遮罩按钮和侧边栏切换按钮的active效果 */
#maskToggleBtn.active{
/*            background: #3498db;*/
            color: white;
/*            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.5);*/
            box-shadow: 0 0 0 2px white;
        }    
#sidebarToggleBtn.active {
/*    background: #3498db;*/
    color: white;
/*    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.5);*/
    box-shadow: 0 0 0 2px white;
}
/* 修改：移除复选框样式，使用按钮样式 */
.checkbox-group {
    display: none; /* 隐藏原来的复选框组 */
}
/* 新增：按钮组替代复选框 */
.button-toggle-group {
    display: flex;
    gap: 5px;
}

.repeat-count-group {
    display: none; /* 默认隐藏 */
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 0.85rem;
}

/* 当跟读模式激活时显示 */
.repeat-after-active .repeat-count-group {
    display: flex;
}

.repeat-count-input {
    width: 40px;
    padding: 3px;
    border-radius: 4px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    text-align: center;
    font-size: 0.85rem;
}

.repeat-progress {
    font-size: 0.8rem;
    color: #2ecc71;
    font-weight: bold;
    margin-left: 5px;
    min-width: 50px;
}

.btn {
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    position: relative;
}

.btn * {
    pointer-events: none;
}

.btn-text {
    width: auto;
    padding: 6px 8px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-secondary {
    background: #7f8c8d;
    color: white;
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-warning {
    background: #f39c12;
    color: white;
}
.btn-warning-select {
    background: #2c3e50;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

.btn.active {
    box-shadow: 0 0 0 2px white;
}

.speed-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.1);
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.speed-selector select {
    background: transparent;
    border: none;
    color: white;
    padding: 3px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.speed-selector select option {
    background: #2c3e50;
    color: white;
}

.file-input-container {
    position: relative;
    display: inline-block;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* 漂浮提示窗口样式 - 修改底部提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    line-height: 1.4;
    pointer-events: none;
}

/* 底部提示样式 */
.tooltip.bottom .tooltiptext {
    bottom: auto;
    top: 125%;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

.tooltip.bottom .tooltiptext::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent rgba(0, 0, 0, 0.8) transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 自定义字幕层 - 保持在最上层 */
.custom-subtitles {
    position: absolute;
    bottom: 15%;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 2.8rem;
    text-shadow: 1px 1px 2px black;
    pointer-events: none;
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.custom-subtitle-line {
    margin: 0;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    display: block;
    width: auto;
    max-width: 100%;
    pointer-events: auto;
    line-height: 1.4;
    min-height: 60px;
    display: block;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.custom-subtitle-line.empty {
    background: transparent;
    padding: 0;
    min-height: 0;
}

.custom-subtitle-line .word-break {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.2s;
}

.custom-subtitle-line .word-break:hover {
    background: rgba(255,255,255,0.2);
}

/* 字幕遮罩层 - 深灰色毛玻璃效果 */
.subtitle-mask {
    position: absolute;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    cursor: move;
    overflow: hidden;
    min-width: 200px;
    min-height: 80px;
    display: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.subtitle-mask.active {
    display: block;
}

/* 遮罩层边缘调整区域 */
.mask-resize-handle {
    position: absolute;
    background: transparent;
    z-index: 11;
}

/* 顶部边缘 */
.mask-resize-handle.top {
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    cursor: n-resize;
}

/* 底部边缘 */
.mask-resize-handle.bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    cursor: s-resize;
}

/* 左侧边缘 */
.mask-resize-handle.left {
    top: 0;
    left: 0;
    width: 10px;
    height: 100%;
    cursor: w-resize;
}

/* 右侧边缘 */
.mask-resize-handle.right {
    top: 0;
    right: 0;
    width: 10px;
    height: 100%;
    cursor: e-resize;
}

/* 左上角 */
.mask-resize-handle.top-left {
    top: 0;
    left: 0;
    width: 15px;
    height: 15px;
    cursor: nw-resize;
}

/* 右上角 */
.mask-resize-handle.top-right {
    top: 0;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: ne-resize;
}

/* 左下角 */
.mask-resize-handle.bottom-left {
    bottom: 0;
    left: 0;
    width: 15px;
    height: 15px;
    cursor: sw-resize;
}

/* 右下角 */
.mask-resize-handle.bottom-right {
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: se-resize;
}

/* 单词释义容器 */
.word-explanations-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 800px;
    overflow-y: auto;
    padding-right: 5px;
}

.word-explanation {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    min-height: 120px;
    flex-shrink: 0;
    max-height: 600px;
    overflow-y: auto;
    flex: 0 0 auto;
    position: relative;
    border-left: 4px solid #3498db;
}

.word-explanation .close-btns {
    position: absolute;
    top: 2px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.word-explanation .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.word-explanation .close-btn.small {
    font-size: 0.9rem;
}

.word-explanation .close-btn.large {
    font-size: 1.2rem;
    font-weight: bold;
}

.word-explanation .close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.word-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    padding-right: 60px;
}

.word-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
}

.phonetics {
    display: flex;
    gap: 10px;
    align-items: center;
}

.phonetic {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pronunciation-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.word-meaning {
    margin-bottom: 15px;
    line-height: 1.5;
}

.mnemonic-method {
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-style: italic;
    border-left: 2px solid #2ecc71;
}

/* 修改例句容器样式 */
.example-sentence {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    margin-bottom: 8px;
}

.sentence-content {
    flex: 1;
}

.english-sentence {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;

    flex-wrap: wrap; /* 允许内容换行 */
}

.sentence-buttons {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.pronunciation-btn, .loop-btn {
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pronunciation-btn:hover, .loop-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #3498db;
}

.loop-btn.looping {
    color: #e74c3c;
}

.loop-btn.looping svg path {
    fill: #e74c3c;
}

.example-translation {
    color: #95a5a6;
    font-size: 0.9rem;
    margin-left: 0;
}

.controls-section {
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0;
    min-height: 0;
    flex: 0 0 auto;
   
}

/* 侧边栏样式 - 默认显示 */
.subtitles-section {
    width: 400px;
    display: flex;
    flex-direction: column;
    background: #2c3e50;
    overflow: hidden;
    position: relative;
    z-index: 25;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

/* 当侧边栏隐藏时 */
.learn-container:not(.with-sidebar) .subtitles-section {
    display: none;
}

.subtitles-header {
    padding: 15px;
    background: #34495e;
    border-bottom: 1px solid #4a6278;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.subtitles-header.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 保存字幕对话框样式 */
.save-subtitle-dialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2c3e50;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    min-width: 400px;
    max-width: 500px;
}

.save-subtitle-dialog.active {
    display: block;
}

.dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}

.dialog-overlay.active {
    display: block;
}

.dialog-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #4a6278;
}

.dialog-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.options-group {
    margin-bottom: 20px;
}

.option-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.option-row label {
    flex: 1;
    margin-left: 10px;
}

.format-group {
    margin-bottom: 20px;
}

.format-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.format-options {
    display: flex;
    gap: 15px;
}

.format-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.subtitles-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.repeat-count-container {
    display: none; /* 默认隐藏 */
    align-items: center;
    gap: 5px;
}

/* 当有多个字幕勾选时显示 */
.repeat-count-container.multiple-selected {
    display: flex;
}

.subtitles-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    scroll-behavior: smooth;
    transition: scroll-behavior 0.3s;
}

.subtitle-item {
    position: relative; /* 为显示ID做准备 */
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    opacity: 0.7;
    transform: scale(0.95);
}
/* 字幕ID显示样式 */
.subtitle-id {
    position: absolute;
    top: 2px;
    left: 5px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: normal;
    pointer-events: none;
}

/* 复制按钮样式 */
.copy-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 4px;
    margin-left: 5px;
    border-radius: 3px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #3498db;
}


.subtitle-item:hover {
    background: rgba(255,255,255,0.1);
}

.subtitle-item.current {
    background: rgba(52, 152, 219, 0.3);
    font-weight: bold;
    border-bottom: 2px solid #3498db;
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.subtitle-item.upcoming {
    opacity: 0.9;
    transform: scale(0.98);
}

.subtitle-item.selected {
    background: rgba(46, 204, 113, 0.3);
}

.subtitle-checkbox {
    width: 18px;
    height: 18px;
}

.subtitle-content {
    flex: 1;
    font-size: 1.1rem;
}

.subtitle-time {
    font-size: 0.8rem;
    color: #bdc3c7;
    margin-top: 3px;
}

.favorite-icon {
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.favorite-icon.active {
    color: #f1c40f;
}

.favorite-icon.inactive {
    color: #7f8c8d;
}

.vocabulary-icon {
    color: #7f8c8d;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 10px;
}

.vocabulary-icon.active {
    color: #f1c40f;
}

/* 右侧触发区域 - 修正版 */
.sidebar-trigger {
    position: absolute;
    right: 0px; /* 修改：移动到视频区域右侧外部 */
    top: 20px;
    width: 20px;
    height: calc(100% - 40px); /* 修改：使用百分比高度 */
    background: #1a1a1a !important; /* 添加 !important 确保优先级 */
    z-index: 26;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px 0 0 4px;
    opacity: 0.7;
}

.sidebar-trigger:hover {
    background: #1a1a1a !important;
    opacity: 1;
}

.sidebar-trigger::after {
    content: "‹";
    color: #666;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.3s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a1a !important;
}

/* 当侧边栏显示时，箭头方向改变 */
.learn-container.with-sidebar .sidebar-trigger::after {
    content: "›";
    color: #666;
    background: #1a1a1a !important;
}

/* 当侧边栏显示时，触发区域位置调整 */
.learn-container.with-sidebar .sidebar-trigger {
    right: 0px; /* 保持在视频区域右侧外部 */
    background: #1a1a1a !important;
}


.sidebar-trigger:hover::after {
    color: #666;
    transform: translateY(-50%) scale(1.2);
    background: #1a1a1a !important;
}

/* 当侧边栏显示时，调整视频区域宽度 */
.learn-container.with-sidebar .video-section {
    width: calc(100% - 400px);
    transition: width 0.3s ease;
}

/* 当侧边栏隐藏时，视频区域宽度为100% */
.learn-container:not(.with-sidebar) .video-section {
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .subtitles-section {
        width: 350px;
    }
    
    .learn-container.with-sidebar .video-section {
        width: calc(100% - 350px);
    }
    
    .learn-container.with-sidebar .sidebar-trigger {
        right: 350px;
        background: #1a1a1a !important;
    }
}

/* 手机端竖屏 */
@media (max-width: 768px) and (orientation: portrait) {
    .learn-container {
        flex-direction: column;
    }
    
    .subtitles-section {
        width: 100%;
        height: 40vh;
        position: relative;
        flex-shrink: 0;
        order: 2; /* 确保字幕区域在下面 */
    }
    
    .subtitles-section.hide {
        display: none;
    }
    
    .subtitles-section.show {
        display: flex;
    }
    
    .video-section {
        height: 60vh;
        width: 100% !important;
        flex-shrink: 0;
        order: 1; /* 确保视频区域在上面 */
    }
    
    /* 手机竖屏隐藏触发区域 */
    .sidebar-trigger {
        display: none !important;
    }
    
    .learn-container.with-sidebar .video-section {
        width: 100% !important;
    }
    
    .custom-controls-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .control-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* 调整字幕层在手机端的位置 */
    .custom-subtitles {
        bottom: 25%;
        font-size: 1.8rem;
    }
    
    .custom-subtitle-line {
        min-height: 45px;
        padding: 6px 12px;
    }
    
    /* 调整单词释义容器在手机端 */
    .word-explanations-container {
        max-height: 200px;
    }
    
    /* 调整视频容器在手机端 */
    .video-container {
        min-height: 300px;
    }
}

/* 手机横屏调整 - 使用与桌面端相同的逻辑 */
@media (max-width: 768px) and (orientation: landscape) {
    .subtitles-section {
        width: 300px;
        height: 100%;
    }
    
    .learn-container.with-sidebar .video-section {
        width: calc(100% - 300px);
    }
    
    .learn-container:not(.with-sidebar) .video-section {
        width: 100%;
    }
    
    /* 触发器使用桌面端相同的逻辑 */
    .sidebar-trigger {
        right: 0px;
        display: flex !important;
        background: #1a1a1a !important;
    }
    
    .learn-container.with-sidebar .sidebar-trigger {
        right: 0px;
        background: #1a1a1a !important;
    }
}

/* 手机竖屏调整 - 隐藏触发器 */
@media (max-width: 768px) and (orientation: portrait) {
    .learn-container {
        flex-direction: column;
    }
    
    .subtitles-section {
        width: 100%;
        height: 40vh;
        order: 2;
    }
    
    .video-section {
        height: 60vh;
        width: 100% !important;
        order: 1;
    }
    
    /* 手机竖屏隐藏触发器 */
    .sidebar-trigger {
        display: none !important;
    }
}



/* 全屏样式 */
.learn-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

.learn-container.fullscreen .subtitles-section {
    width: 400px;
}

/* 防止布局抖动 */
.video-section > * {
    flex-shrink: 0;
}

.video-container:focus {
    outline: none;
}

.video-container {
    cursor: pointer;
}

/* 字幕列表按钮组 */
.subtitles-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* 隐藏默认控制条 */
video::-webkit-media-controls {
    display: none !important;
}

video::-webkit-media-controls-enclosure {
    display: none !important;
}

video::-webkit-media-controls-panel {
    display: none !important;
}

video::-webkit-media-controls-play-button {
    display: none !important;
}

video::-webkit-media-controls-timeline {
    display: none !important;
}

video::-webkit-media-controls-current-time-display {
    display: none !important;
}

video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

video::-webkit-media-controls-timeline-container {
    display: none !important;
}

video::-webkit-media-controls-volume-slider-container {
    display: none !important;
}

video::-webkit-media-controls-volume-slider {
    display: none !important;
}

video::-webkit-media-controls-seek-back-button {
    display: none !important;
}

video::-webkit-media-controls-seek-forward-button {
    display: none !important;
}

video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

video::-webkit-media-controls-rewind-button {
    display: none !important;
}

video::-webkit-media-controls-return-to-realtime-button {
    display: none !important;
}

video::-webkit-media-controls-toggle-closed-captions-button {
    display: none !important;
}

/* 跟读状态指示器 */
.repeat-status {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1.2rem;
    z-index: 10;
    display: none;
}

.repeat-status.active {
    display: block;
}

.repeat-status.normal {
    border-left: 4px solid #3498db;
}

.repeat-status.mute {
    border-left: 4px solid #e74c3c;
}


/* 桌面端调整 */

/* 桌面端和横屏通用逻辑 */
@media (min-width: 769px), (orientation: landscape) {
    .sidebar-trigger {
        display: flex !important;
        right: 0px;
        height: calc(100% - 40px);
        background: #1a1a1a !important;
    }
    
    .learn-container.with-sidebar .sidebar-trigger {
        right: 0px;
        background: #1a1a1a !important;
    }
    
    .learn-container:not(.with-sidebar) .sidebar-trigger {
        right: 0px;
        background: #1a1a1a !important;
    }
}


