* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", sans-serif;
    background: #0d0d1a;
    color: #e0e0e0;
}

.app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   阶段一：选择视频
   ========================================== */
.phase-select {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-y: auto;
}

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 24px;
    color: #e94560;
    margin-bottom: 30px;
}

.header-lang {
    margin-bottom: 30px;
}

.lang-switcher {
    display: flex;
    gap: 2px;
}

.lang-switcher-select {
    background: rgba(255,255,255,0.08);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 5px 8px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 6px;
}

/* 视频列表 */
.video-list-panel {
    width: 100%;
    max-width: 500px;
}

.provider-select {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #aaa;
}

.provider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-row label {
    flex-shrink: 0;
    min-width: 70px;
}

.provider-select select {
    padding: 5px 8px;
    font-size: 13px;
    flex: 1;
}

/* 网络视频下载 */
/* 主操作区：粘贴链接 */
.hero-add-section {
    margin-bottom: 24px;
}

.hero-url-row {
    display: flex;
    gap: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #e94560;
    background: #16213e;
}

.hero-url-input {
    flex: 1;
    padding: 14px 16px;
    font-size: 15px;
    background: transparent;
    border: none;
    color: #e0e0e0;
    outline: none;
}

.hero-url-input::placeholder {
    color: #777;
}

.hero-url-btn {
    flex-shrink: 0;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    background: #e94560;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-url-btn:hover {
    background: #d13b54;
}

.url-status {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    min-height: 16px;
}

.url-status.error { color: #e94560; }
.url-status.success { color: #4caf50; }

.more-options-toggle {
    display: inline-block;
    margin-top: 8px;
    padding: 0;
    font-size: 13px;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.more-options-toggle:hover {
    color: #e94560;
}

.more-options-content {
    margin-top: 12px;
    padding: 16px;
    background: rgba(22, 33, 62, 0.5);
    border-radius: 10px;
    border: 1px solid #1a1a4e;
}

.upload-panel {
    margin-bottom: 16px;
}

.btn-upload {
    display: inline-block;
    padding: 10px 20px;
    background: #16213e;
    border: 1px dashed #1a1a4e;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-align: center;
}

.btn-upload:hover {
    background: #1a1a4e;
    border-color: #e94560;
}

.upload-status {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    min-height: 16px;
}

.upload-status.error { color: #e94560; }
.upload-status.success { color: #4caf50; }

/* 本地播放入口 */
.local-play-section {
    text-align: center;
    margin-bottom: 20px;
}

.btn-local-play {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.btn-local-play:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

.local-play-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

/* 粘贴文本生成朗读课程 */
.tts-section {
    margin-bottom: 20px;
}

.tts-content {
    margin-top: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tts-content textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #eee;
    font-size: 14px;
    line-height: 1.6;
    padding: 10px 12px;
    resize: vertical;
    font-family: inherit;
}

.tts-content .provider-row {
    font-size: 13px;
    color: #aaa;
}

/* 图片粘贴预览（OCR） */
.tts-img-preview {
    position: relative;
    align-self: flex-start;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.3);
}

.tts-img-preview img {
    display: block;
    max-height: 110px;
    max-width: 200px;
    object-fit: cover;
}

/* 识别中：半透明遮罩 + 转圈 */
.tts-img-spinner {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

.tts-img-preview.loading .tts-img-spinner {
    display: flex;
}

.tts-img-spinner::after {
    content: "";
    width: 26px;
    height: 26px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #e94560;
    border-radius: 50%;
    animation: tts-spin 0.8s linear infinite;
}

@keyframes tts-spin {
    to { transform: rotate(360deg); }
}

.tts-img-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tts-img-preview.loading .tts-img-close {
    display: none; /* 识别中不可关闭 */
}

.btn-tts-generate {
    padding: 11px;
    font-size: 14px;
    font-weight: 600;
    background: #e94560;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
}

.btn-tts-generate:disabled {
    opacity: 0.5;
}

/* 我的视频区域 */
.my-videos-section {
    margin-bottom: 20px;
}

.section-heading {
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 12px;
}

.add-label {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 8px;
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
}

.video-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #16213e;
    border-radius: 10px;
    border: 1px solid #1a1a4e;
    transition: border-color 0.2s, background 0.2s;
}

.video-item.ready {
    border-color: #2a4a3e;
}

.video-item.ready:hover,
.video-item.ready:active {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.08);
}

.video-item:hover {
    border-color: #e94560;
}

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

.video-name {
    font-size: 14px;
    word-break: break-all;
    line-height: 1.4;
}

.video-status {
    font-size: 12px;
    margin-top: 4px;
    color: #666;
}

.video-item.ready .video-status {
    color: #4caf50;
}

.video-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-play {
    background: #e94560 !important;
    color: #fff !important;
}

.btn-redo {
    background: transparent !important;
    border-color: #444 !important;
    color: #888 !important;
    font-size: 11px !important;
}

.btn-redo:hover {
    color: #e0e0e0 !important;
    border-color: #e94560 !important;
    background: transparent !important;
}

.btn-new {
    background: #0f3460 !important;
}

/* ==========================================
   阶段二：播放（含加载遮罩）
   ========================================== */
.phase-play {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    background: #000;
    position: relative;
}

/* 视频容器 */
.video-container {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
    background: #000;
    cursor: pointer;
}

video {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* 加载进度遮罩 — 半透明叠在视频首帧上 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.loading-box {
    background: rgba(22, 33, 62, 0.9);
    border-radius: 12px;
    padding: 28px 32px;
    width: 380px;
    max-width: 90%;
    box-sizing: border-box;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #555;
    margin-bottom: 14px;
    transition: color 0.3s;
}

.step:last-of-type {
    margin-bottom: 0;
}

.step.active {
    color: #e0e0e0;
}

.step.active .step-icon {
    animation: spin 1s linear infinite;
}

.step.done {
    color: #4caf50;
}

.step.error {
    color: #e94560;
}

.step-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

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

.loading-tip {
    margin-top: 16px;
    font-size: 12px;
    color: #888;
    text-align: center;
}

/* 导出进度条 */
.export-title {
    font-size: 15px;
    color: #e0e0e0;
    margin-bottom: 16px;
    text-align: center;
}

.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: #1a1a3e;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #e94560;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.export-pct {
    margin-top: 8px;
    font-size: 13px;
    color: #e94560;
    text-align: center;
    font-weight: bold;
}

/* 导出设置弹窗 */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-box {
    background: #16213e;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 460px;
}

.modal-box h3 {
    font-size: 16px;
    color: #e94560;
    margin-bottom: 18px;
}

.modal-field {
    margin-bottom: 14px;
}

.modal-field label {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 5px;
}

.modal-field input {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    background: #0d0d1a;
    border: 1px solid #1a1a4e;
    border-radius: 6px;
    color: #e0e0e0;
    outline: none;
}

.modal-field input:focus {
    border-color: #e94560;
}

.dir-input-row {
    display: flex;
    gap: 6px;
}

.dir-input-row input {
    flex: 1;
}

.btn-browse {
    flex-shrink: 0;
    padding: 8px 12px !important;
    font-size: 12px !important;
}

.dir-browser {
    background: #0d0d1a;
    border: 1px solid #1a1a4e;
    border-radius: 6px;
    margin-bottom: 14px;
    overflow: hidden;
}

.dir-browser-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #1a1a4e;
    background: rgba(15, 52, 96, 0.3);
}

.dir-browser-header button {
    padding: 2px 8px;
    font-size: 14px;
}

.dir-current {
    font-size: 12px;
    color: #aaa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.dir-list {
    max-height: 180px;
    overflow-y: auto;
    padding: 4px 0;
}

.dir-item {
    padding: 6px 12px;
    font-size: 13px;
    color: #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dir-item:hover {
    background: rgba(233, 69, 96, 0.1);
}

.dir-item-icon {
    color: #e94560;
    font-size: 14px;
}

.dir-browser-actions {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    border-top: 1px solid #1a1a4e;
    justify-content: flex-end;
}

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

.dir-list::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 2px;
}

.modal-hint {
    font-size: 12px;
    color: #666;
    margin-bottom: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-primary {
    background: #e94560 !important;
    color: #fff !important;
}

/* 暂停指示器 */
.pause-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 60px;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    z-index: 30;
    transition: transform 0.15s ease-out, opacity 0.3s;
    opacity: 0;
}

.pause-indicator.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.pause-indicator.fade {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
}

/* 朗读课程封面（音频无画面时显示） */
.lesson-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 5;
    pointer-events: none;
}

/* ==========================================
   朗读课程模式：字幕是主角（纯音频时自动启用）
   ========================================== */
/* 封面压暗，退为氛围背景 */
.video-container.lesson-mode .lesson-cover {
    filter: brightness(0.55);
}

/* 字幕移到画面中部，像绘本/歌词卡 */
.video-container.lesson-mode .subtitle-overlay {
    bottom: auto;
    top: 45%;
    transform: translate(-50%, -50%);
}

.video-container.lesson-mode .subtitle-original {
    font-size: 32px;
    line-height: 1.7;
    padding: 10px 24px;
    border-radius: 10px;
}

.video-container.lesson-mode .subtitle-translation {
    font-size: 20px;
    line-height: 1.6;
    padding: 8px 20px;
    margin-top: 10px;
    border-radius: 8px;
}

/* 字幕覆盖层 — 宽度由 JS 动态设置为视频实际宽度 */
.subtitle-overlay {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 20;
    /* 默认值，JS 会覆盖 */
    width: 92%;
}

.subtitle-original,
.subtitle-translation {
    background: rgba(0, 0, 0, 0.8);
    padding: 6px 18px;
    border-radius: 6px;
    display: inline-block;
    max-width: 100%;
    line-height: 1.4;
    word-break: break-word;
    white-space: pre-wrap;
}

.subtitle-original {
    color: #ffd700;
    font-size: 22px;
    font-weight: 500;
}

.subtitle-translation {
    color: #fff;
    font-size: 17px;
}

.subtitle-original:empty,
.subtitle-translation:empty {
    display: none;
}

/* 卡拉OK逐词高亮（仅原文） */
.subtitle-original .kw {
    border-radius: 4px;
    padding: 0 2px;
    margin: 0 -2px;
    transition: color 0.12s, background 0.12s;
}

.subtitle-original .kw-active {
    color: #fff;
    background: rgba(233, 69, 96, 0.6);
}

/* ==========================================
   桌面控制栏：键盘优先，控件带键帽标注
   ========================================== */
.controls {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 16px;
    background: rgba(16, 16, 32, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    flex-shrink: 0;
    /* 60% 屏宽悬浮栏（略宽于跟读弹窗 620px） */
    width: 60%;
    min-width: 520px;
    max-width: 900px;
    margin: 0 auto 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

/* 双模式入口（与手机版 mode tabs 逻辑一致） */
.d-mode-tabs {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 3px;
}

.d-mode-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.controls .d-mode-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ddd;
}

.controls .d-mode-tab.active {
    background: #e94560;
    color: #fff;
}

.controls .d-mode-tab.active kbd {
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.4);
}

.ctrl-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ctrl-group-left { flex: 1; }
.ctrl-group-center { flex-shrink: 0; gap: 4px; }
.ctrl-group-right { flex: 1; justify-content: flex-end; }

/* 键帽标注：物理键帽风格 */
.controls kbd {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 9px;
    line-height: 1;
    padding: 2px 5px;
    color: #777;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom-width: 2px;
    border-radius: 4px;
    white-space: nowrap;
}

/* 控制按钮：图标 + 键帽 垂直排列 */
.ctrl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 9px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #ccc;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

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

.controls .ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.ctrl-btn:focus-visible {
    outline: 2px solid #e94560;
    outline-offset: 1px;
}

/* 按下真实按键时的联动闪光 */
.controls .ctrl-btn.kbd-flash {
    background: rgba(233, 69, 96, 0.35);
    color: #fff;
}

.controls .ctrl-btn.kbd-flash kbd {
    color: #ffb3c0;
    border-color: #e94560;
}

/* 下拉字段：标签 + select (+键帽) */
.ctrl-field {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
}

.ctrl-field select {
    padding: 4px 6px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #ddd;
    cursor: pointer;
}

/* 轻量提示条 */
.app-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    z-index: 500;
    background: rgba(16, 16, 32, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    color: #ddd;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.app-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 时间进度：视频右上角（避让全屏按钮） */
.time-display {
    position: absolute;
    top: 18px;
    right: 58px;
    z-index: 55;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    font-family: ui-monospace, Menlo, monospace;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 5px 10px;
    pointer-events: none;
}

.repeat-info {
    color: #e94560;
    font-weight: bold;
    font-size: 13px;
    margin-left: auto;
}

/* 句子列表抽屉 */
.sentence-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 46px; /* 锚定到播放器底部控制栏上方 */
    width: 380px;
    background: rgba(13, 13, 26, 0.95);
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-left: 1px solid #1a1a3e;
}

.sentence-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    margin-bottom: 8px;
}

.sentence-panel-header h2 {
    font-size: 14px;
    color: #e94560;
}

.sentence-panel-header div {
    display: flex;
    gap: 6px;
}

.sentence-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* 单个句子 */
.sentence-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background 0.15s;
    border-left: 3px solid transparent;
}

.sentence-content {
    display: flex;
    gap: 8px;
    padding: 8px 8px;
    align-items: baseline;
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
    background: #0d0d1a;
    border-radius: 6px;
}

.sentence-item:hover .sentence-content {
    background: #16162a;
}

.sentence-item.active .sentence-content {
    background: #241624;
}

/* 左滑显示的删除按钮 */
.sentence-delete-btn {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80px;
    background: #c0392b;
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    z-index: 0;
    visibility: hidden;
    -webkit-tap-highlight-color: transparent;
}

.sentence-item.swiping .sentence-delete-btn,
.sentence-item.swiped .sentence-delete-btn {
    visibility: visible;
}

.sentence-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    align-self: center;
}

.sentence-merge-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.6;
    -webkit-tap-highlight-color: transparent;
}

.sentence-merge-btn svg {
    width: 15px;
    height: 15px;
}

.sentence-merge-btn:hover,
.sentence-merge-btn:active {
    color: #e94560;
    opacity: 1;
    background: rgba(233, 69, 96, 0.1);
}

.sentence-wave-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.6;
    -webkit-tap-highlight-color: transparent;
}

.sentence-wave-btn svg {
    width: 15px;
    height: 15px;
}

.sentence-wave-btn:hover,
.sentence-wave-btn:active {
    color: #e94560;
    opacity: 1;
    background: rgba(233, 69, 96, 0.1);
}

.sentence-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sentence-item.active {
    background: rgba(233, 69, 96, 0.1);
    border-left-color: #e94560;
}

.sentence-item .seq {
    font-size: 11px;
    color: #555;
    flex-shrink: 0;
    width: 20px;
    text-align: right;
}

.sentence-item .text-group {
    flex: 1;
    min-width: 0;
}

.sentence-item .time {
    font-size: 11px;
    color: #555;
    margin-bottom: 2px;
}

.sentence-item .original {
    font-size: 14px;
    color: #ffd700;
    margin-bottom: 2px;
    word-break: break-word;
}

.sentence-item .translation {
    font-size: 12px;
    color: #aaa;
    word-break: break-word;
}

/* 句子编辑 */
.sentence-edit-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.6;
    -webkit-tap-highlight-color: transparent;
}

.sentence-edit-btn:hover,
.sentence-edit-btn:active {
    color: #e94560;
    opacity: 1;
    background: rgba(233, 69, 96, 0.1);
}

.sentence-item.editing {
    background: rgba(233, 69, 96, 0.06);
    cursor: default;
}

.sentence-item .edit-original,
.sentence-item .edit-translation {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #ffd700;
    font-size: 14px;
    padding: 6px 8px;
    margin-bottom: 4px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.sentence-item .edit-translation {
    color: #ccc;
    font-size: 13px;
}

.sentence-item .edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.sentence-item .edit-actions button {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.sentence-item .edit-save {
    background: #e94560;
    color: #fff;
}

.sentence-item .edit-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

/* ==========================================
   按钮和表单
   ========================================== */
button, select {
    background: #0f3460;
    color: #e0e0e0;
    border: 1px solid #1a1a4e;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

button:hover:not(:disabled) {
    background: #e94560;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

select {
    padding: 4px 6px;
}

label {
    font-size: 12px;
    white-space: nowrap;
}

/* 滚动条 */
.sentence-list::-webkit-scrollbar {
    width: 5px;
}

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

.sentence-list::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 3px;
}

/* ==========================================
   跟读面板
   ========================================== */
/* 视频遮罩层：评分时半透明 */
.fr-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 140;
    transition: opacity 0.3s;
}

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

.follow-read-panel {
    position: absolute;
    bottom: 58px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 620px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.5);
}

/* 固定区：标题 + 参考文本 + 按钮，永不移动 */
.fr-fixed {
    background: rgba(13, 13, 26, 0.96);
    padding: 14px 20px 12px;
    border-top: 1px solid #1a1a3e;
}

/* 上方扩展区：波形、进度、评分，向上增长 */
.fr-expand {
    background: rgba(13, 13, 26, 0.94);
    padding: 8px 20px 0;
    max-height: 50vh;
    overflow-y: auto;
}

.fr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.fr-header h3 {
    font-size: 15px;
    color: #e94560;
}

.fr-reference {
    font-size: 18px;
    color: #ffd700;
    line-height: 1.5;
    margin-bottom: 4px;
    word-break: break-word;
}

.fr-translation {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.fr-controls {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* 跟读按钮：图标 + 小文字，统一颜色逻辑
   灰暗 = 不可用；深色底 = 可点击；红色 = 正在进行中 */
.fr-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 10px;
    color: #ddd;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.fr-btn svg {
    width: 22px;
    height: 22px;
}

.fr-btn-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.fr-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* 录音按钮的键盘提示（桌面：按住 Enter 录音） */
.fr-kbd {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 9px;
    line-height: 1;
    padding: 2px 5px;
    color: #777;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom-width: 2px;
    border-radius: 4px;
    white-space: nowrap;
}

.fr-btn:not(:disabled):active {
    background: rgba(255, 255, 255, 0.15);
}

/* 正在进行中：统一红色 */
.fr-btn.on {
    background: #e94560;
    color: #fff;
}

/* 录音中 / 跟读中：脉冲动画 */
#btnFrRecord.on,
#btnFrPlayOriginal.on {
    animation: pulse-red 1.2s ease-in-out infinite;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(233, 69, 96, 0); }
}

.fr-waveform {
    display: none;
    width: 100%;
    height: 44px;
    border-radius: 6px;
    background: rgba(233, 69, 96, 0.08);
    margin-bottom: 6px;
}

.fr-waveform.active {
    display: block;
}

.fr-timer {
    font-size: 13px;
    color: #aaa;
    min-height: 18px;
}

/* 评分结果 */
.fr-result {
    padding-bottom: 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.fr-scores {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 12px;
}

.fr-score-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fr-score-num {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
}

.fr-score-label {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.fr-score-details {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #aaa;
}

.fr-score-details span {
    font-weight: bold;
    margin-left: 4px;
}

/* 逐词标注 */
.fr-words {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    line-height: 1.8;
}

.fr-word {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 16px;
}

.fr-word.good {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.fr-word.fair {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
}

.fr-word.poor {
    color: #e94560;
    background: rgba(233, 69, 96, 0.15);
    text-decoration: underline wavy #e94560;
}

.fr-word.missed {
    color: #666;
    background: rgba(100, 100, 100, 0.1);
    text-decoration: line-through;
}

/* 分数颜色 */
.score-high { color: #4caf50; }
.score-mid { color: #ff9800; }
.score-low { color: #e94560; }

/* ==========================================
   波形音轨编辑器
   ========================================== */
.wave-editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 170;
}

.wave-editor {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 180;
    background: #12122a;
    border-radius: 16px 16px 0 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
}

.we-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.we-header h3 {
    font-size: 15px;
    color: #e94560;
}

.we-seq {
    color: #888;
    font-size: 13px;
    font-weight: normal;
}

#weBtnClose {
    background: none;
    border: none;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

.we-time-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.we-time-block {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.we-time-label {
    font-size: 11px;
    color: #888;
}

.we-time-value {
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
    font-variant-numeric: tabular-nums;
}

.we-canvas {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    touch-action: none;
    display: block;
}

.we-hint {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin: 6px 0 10px;
}

.we-controls {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.we-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 10px;
    color: #ddd;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.we-btn svg { width: 18px; height: 18px; }
.we-btn-label { font-size: 11px; font-weight: 500; }
.we-btn:disabled { opacity: 0.3; cursor: default; }
.we-btn.on { background: #e94560; color: #fff; }
.we-btn-primary { background: rgba(233, 69, 96, 0.25); }

.we-engine {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ddd;
    font-size: 13px;
    padding: 0 8px;
}

.we-status {
    font-size: 12px;
    color: #aaa;
    min-height: 16px;
    margin-top: 8px;
    text-align: center;
}

/* ==========================================
   顶部按钮（返回=左上 / 全屏=右上），桌面与手机通用
   ========================================== */
.m-top-btn {
    display: flex;
    position: absolute;
    top: 12px;
    z-index: 60;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.m-top-btn svg { width: 18px; height: 18px; }
.m-top-btn:active { background: rgba(0, 0, 0, 0.7); }

.m-btn-back { left: 12px; }
.m-btn-fullscreen { right: 12px; }

/* 全屏图标切换 */
.m-btn-fullscreen .fs-exit { display: none; }
.m-btn-fullscreen.is-fullscreen .fs-enter { display: none; }
.m-btn-fullscreen.is-fullscreen .fs-exit { display: block; }

/* 全屏时顶部按钮和状态栏下移，避开刘海/摄像头 */
:fullscreen .m-top-btn,
:-webkit-full-screen .m-top-btn {
    top: max(40px, calc(env(safe-area-inset-top) + 8px));
}

:fullscreen .m-top-status,
:-webkit-full-screen .m-top-status {
    top: max(40px, calc(env(safe-area-inset-top) + 8px));
}

/* ==========================================
   移动端顶部状态栏
   ========================================== */
/* 顶部状态栏：桌面和手机统一显示（当前第几句/第几遍，两行居中） */
.m-top-status {
    display: block;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 55;
    text-align: center;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 4px 12px;
}

.m-top-status-line {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    font-weight: 500;
}

.m-top-status-line:last-child {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
}

/* ==========================================
   移动端浮动控制层
   ========================================== */
.m-overlay-controls {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    align-items: center;
    justify-content: center;
    gap: 40px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.m-overlay-controls.visible {
    display: flex;
    opacity: 1;
}

.m-overlay-controls.fading {
    opacity: 0;
}

.m-ov-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s;
}

.m-ov-btn:active {
    transform: scale(0.88);
}

/* 中央播放/暂停 — 大圆环 */
.m-ov-play {
    width: 80px;
    height: 80px;
    border: 2.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.m-ov-play svg {
    width: 40px;
    height: 40px;
}

.m-ov-play .m-ov-icon-pause { display: none; }

.m-ov-play.paused .m-ov-icon-play { display: block; }
.m-ov-play.paused .m-ov-icon-pause { display: none; }
.m-ov-play.playing .m-ov-icon-play { display: none; }
.m-ov-play.playing .m-ov-icon-pause { display: block; }

/* 上一句 / 下一句 */
.m-ov-prev,
.m-ov-next {
    opacity: 0;
}

.m-ov-prev svg,
.m-ov-next svg {
    width: 44px;
    height: 44px;
}

.m-ov-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

/* 入场动画 */
@keyframes ovSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.m-overlay-controls.visible .m-ov-play {
    animation: ovScaleIn 0.35s ease both;
}

@keyframes ovScaleIn {
    from { opacity: 0; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1); }
}

.m-overlay-controls.visible .m-ov-prev {
    animation: ovSlideIn 0.4s 0.1s ease both;
}

.m-overlay-controls.visible .m-ov-next {
    animation: ovSlideIn 0.4s 0.2s ease both;
}

/* ==========================================
   移动端控制栏
   ========================================== */
.mobile-controls {
    display: none;
    flex-direction: column;
    background: rgba(10, 10, 22, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 6px 10px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 160;
}

/* 单行精简栏 */
.m-slim-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.m-slim-btn {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.m-slim-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.m-speed-compact {
    min-width: 36px;
    text-align: center;
}

.m-repeat-compact {
    min-width: 36px;
    text-align: center;
}

.m-list-btn {
    margin-left: auto;
    padding: 6px 14px;
    font-size: 16px;
    background: rgba(233, 69, 96, 0.15);
    border-color: rgba(233, 69, 96, 0.3);
    color: #e94560;
}

.m-list-btn:active {
    background: rgba(233, 69, 96, 0.3);
}

/* 精简模式切换 */
.m-mode-tabs-slim {
    display: flex;
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 2px;
    flex: 1;
    min-width: 0;
}

.m-mode-bg-slim {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: #e94560;
    border-radius: 5px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    z-index: 0;
}

.m-mode-bg-slim[data-pos=""] { opacity: 0; }
.m-mode-bg-slim[data-pos="0"] { opacity: 1; transform: translateX(0); }
.m-mode-bg-slim[data-pos="1"] { opacity: 1; transform: translateX(100%); }

.m-mode-tab-slim {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 5px 0;
    font-size: 12px;
    font-weight: 600;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 0.25s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-mode-tab-slim.active {
    color: #fff;
}

/* 弹出选择器 */
.m-picker {
    position: absolute;
    bottom: 100%;
    left: 10px;
    margin-bottom: 6px;
    background: rgba(16, 16, 32, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 70px;
}

.m-picker-opt {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.15s;
}

.m-picker-opt:active,
.m-picker-opt.active {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
}

.m-picker-opt.active {
    font-weight: 700;
}

/* ==========================================
   响应式
   ========================================== */
.hide-mobile { }

@media (max-width: 1024px), (pointer: coarse) {
    .header h1 {
        font-size: 18px;
    }

    .subtitle-original {
        font-size: 22px;
    }

    .subtitle-translation {
        font-size: 16px;
    }

    /* 朗读课程模式：手机端字号 */
    .video-container.lesson-mode .subtitle-original {
        font-size: 26px;
        padding: 8px 16px;
    }

    .video-container.lesson-mode .subtitle-translation {
        font-size: 18px;
        padding: 6px 14px;
    }

    /* 隐藏桌面控件，显示移动端控件 */
    .controls {
        display: none !important;
    }

    .mobile-controls {
        display: flex !important;
    }

    .hide-mobile {
        display: none !important;
    }

    .sentence-drawer {
        width: 100%;
        border-left: none;
        bottom: 48px; /* 移动端底部菜单栏高度 */
    }

    .sentence-list {
        padding-bottom: 20px;
    }

    .repeat-info {
        font-size: 11px;
    }

    .loading-box {
        width: 85%;
        padding: 20px;
    }

    .pause-indicator {
        font-size: 48px;
    }

    .follow-read-panel {
        bottom: 48px; /* 不覆盖底部菜单栏 */
        max-width: none;
        border-radius: 0;
        box-shadow: none;
    }

    .fr-fixed {
        padding: 14px 18px 12px;
    }

    .fr-header h3 {
        font-size: 18px;
    }

    .fr-reference {
        font-size: 22px;
        line-height: 1.6;
        margin-bottom: 6px;
    }

    .fr-translation {
        font-size: 16px;
        margin-bottom: 14px;
    }

    .fr-btn svg {
        width: 24px;
        height: 24px;
    }

    .fr-btn-label {
        font-size: 12px;
    }

    /* 手机端无键盘，隐藏键盘提示 */
    .fr-kbd {
        display: none;
    }

    .fr-timer {
        font-size: 14px;
    }

    .fr-waveform {
        height: 48px;
    }

    .fr-scores {
        gap: 14px;
    }

    .fr-score-num {
        font-size: 28px;
    }

    .fr-score-details {
        flex-direction: column;
        gap: 4px;
    }

    /* 移动端显示顶部按钮和状态 */
    .m-top-btn {
        display: flex;
    }

    /* 移动端隐藏右上角时间（与全屏按钮位置冲突） */
    .time-display {
        display: none;
    }

    .m-top-status {
        display: block;
    }
}

@media (max-width: 480px) {
    .subtitle-original {
        font-size: 22px;
        padding: 4px 10px;
    }

    .subtitle-translation {
        font-size: 16px;
        padding: 3px 10px;
    }

    .step {
        font-size: 13px;
    }
}

/* CSS 模拟全屏（HTTP 下原生全屏不可用时的后备） */
.phase-play.css-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    height: 100% !important;
}

.phase-play.css-fullscreen .m-top-btn {
    display: flex !important;
    top: max(40px, calc(env(safe-area-inset-top) + 8px));
}

.phase-play.css-fullscreen .m-top-status {
    display: block !important;
    top: max(40px, calc(env(safe-area-inset-top) + 8px));
}

.phase-play.css-fullscreen .mobile-controls {
    display: flex !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.phase-play.css-fullscreen .m-overlay-controls.visible {
    display: flex !important;
}

/* 全屏模式（原生） */
:fullscreen,
:-webkit-full-screen {
    background: #000;
}

:fullscreen .phase-play,
:-webkit-full-screen .phase-play {
    height: 100%;
    width: 100%;
}

:fullscreen .mobile-controls,
:-webkit-full-screen .mobile-controls {
    display: flex !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

:fullscreen .m-top-btn,
:-webkit-full-screen .m-top-btn {
    display: flex !important;
}

:fullscreen .m-top-status,
:-webkit-full-screen .m-top-status {
    display: block !important;
}

:fullscreen .m-overlay-controls.visible,
:-webkit-full-screen .m-overlay-controls.visible {
    display: flex !important;
}
