/* style.css - 主应用核心样式（不包含认证界面） */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
}

/* Ensure body always fills viewport and doesn't shrink with content */
html, body {
    height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 100vw;
    overflow-x: hidden;
    background: #F4F6F9;
}

#app-root {
    flex: 1 0 auto;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    min-height: 100vh;
}

.scrollable-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 15px 20px 15px;
    min-height: 0;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    position: relative;
}

.scrollable-container::-webkit-scrollbar {
    width: 10px;
}

.scrollable-container::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 10px;
    margin: 20px 0;
}

.scrollable-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.6), 
        rgba(118, 75, 162, 0.6));
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.scrollable-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.8), 
        rgba(118, 75, 162, 0.8));
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    z-index: 1;
}

.header-top-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-top-group h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, #e2e8ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    margin: 0;
}

.file-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 8px;
}

.info-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

#fileListView, #detailView, #recordContainer {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
#fileListView {
    overflow: hidden;
}
.file-list-section {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.file-list-title {
    font-size: 22px;
    font-weight: 700;
    color: #1E293B;
    position: relative;
    padding-left: 20px;
}

.file-list-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 10px;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-list-item {
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: normal;
    gap: 20px;
    border-radius: 12px;
    margin: 5px 0;
}

.file-list-item:last-child {
    border-bottom: none;
}

.file-list-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: rgba(102, 126, 234, 0.3);
}

.file-list-item.selected {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.file-name {
    font-weight: 600;
    color: #2d3748;
    flex: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
}

.file-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.file-date {
    font-size: 13px;
    color: #718096;
    background: rgba(113, 128, 150, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.file-size {
    font-size: 13px;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.file-list-empty {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
    font-style: italic;
    font-size: 16px;
}

/* ===== 场景筛选子Tab ===== */
.scene-tabs {
    display: flex;
    gap: 6px;
    padding: 0 0 12px 0;
    flex-wrap: wrap;
    border-bottom: 1px solid #edf2f7;
    margin-bottom: 12px;
}
.scene-tab {
    padding: 4px 14px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    color: #4a5568;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}
.scene-tab:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}
.scene-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* ===== 年月折叠分组列表 ===== */
.grouped-file-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 年份行 */
.year-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 8px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #e2e8f0;
}
.year-header:hover {
    background: #f7fafc;
}
.year-label {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
}
.year-count {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 500;
}

/* 月份列表（年份的子容器） */
.month-list {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
}

/* 月份行 */
.month-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #f0f0f0;
}
.month-header:hover {
    background: #fafafa;
}
.month-label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
}
.month-count {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 500;
}

/* 折叠图标 */
.collapse-icon {
    font-size: 10px;
    color: #cbd5e0;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

/* 文件项容器（月份的子容器） */
.file-items {
    padding-left: 16px;
}

/* 文件列表项在折叠模式下的微调 */
.file-items .file-list-item {
    padding: 10px 12px;
    margin: 1px 0;
}
.file-items .file-list-item:last-child {
    border-bottom: 1px solid #edf2f7;
}

.detail-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.content-area {
    padding: 2px 0;
    min-height: 400px;
}

.conversation-block {
    background: transparent;
    padding: 8px;
    margin-bottom: 0;
    border: none;
    position: relative;
}

.conversation-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    border-radius: 6px 0 0 6px;
}

.conversation-block:hover {
    border-color: rgba(102, 126, 234, 0.3);
}

.conversation-block.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.speaker-header {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
    gap: 15px;
    flex-wrap: wrap;
}

.speaker-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.speaker-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.speaker-name-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.speaker-name {
    font-weight: 700;
    font-size: 18px;
    color: #2d3748;
}

.speaker-edit-icon {
    font-size: 14px;
    cursor: pointer;
    opacity:1;  /* 默认完全透明 */
    transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
    color: #718096;
    padding: 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    user-select: none;
}

/* 只在父容器悬停时显示图标 */
.speaker-name-wrapper:hover .speaker-edit-icon {
    opacity: 0.6;  /* 悬停时显示为半透明 */
}

/* 图标本身悬停时完全显示并增加效果 */
.speaker-edit-icon:hover {
    opacity: 1 !important;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.time-range {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
    font-size: 13px;
    color: #718096;
    background: rgba(113, 128, 150, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
}

.merged-text {
    font-size: 16px;
    line-height: 1.8;
    color: #475569;
    padding: 4px 0px;
    background: transparent;
    border-radius: 15px;
    border: none;
}

.text-segment {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0px 0px;
    border-radius: 8px;
    display: inline;
    position: relative;
}

.text-segment:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.text-segment.playing {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    color: #667eea;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.segment-divider {
    color: #cbd5e0;
    margin: 0 0px;
    font-size: 20px;
}

.close-detail-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 12px 28px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.close-detail-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.loading {
    display: none;
    text-align: center;
    padding: 100px 20px;
    color: #718096;
}

.loading-spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-right: 4px solid #764ba2;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

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

.error {
    display: none;
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    color: #c53030;
    padding: 25px;
    margin: 30px;
    border-radius: 20px;
    border-left: 6px solid #c53030;
    font-size: 15px;
    box-shadow: 0 10px 30px rgba(245, 101, 101, 0.2);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px;
    color: #718096;
}

.empty-state-icon {
    font-size: 80px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2d3748;
}

.empty-state p {
    font-size: 16px;
    max-width: 500px;
    line-height: 1.8;
}


/* ========== Speaker 浮动编辑器样式 ========== */

.speaker-editor {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    min-width: 280px;
    max-width: 320px;
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.15s ease;
    overflow: visible;
    background-color: #ffffff; /* 确保背景完全不透明 */
    opacity: 1; /* 确保不透明 */
}

.editor-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    top: -8px;
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.05));
    z-index: 1002;
}

.editor-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fafc, #edf2f7);
    border-bottom: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0;
    background-color: #f8fafc; /* 确保背景不透明 */
}

.editor-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.editor-content {
    padding: 16px;
    background-color: #ffffff; /* 确保背景不透明 */
}

.current-name-tip {
    font-size: 12px;
    color: #718096;
    background: #f8fafc; /* 使用不透明背景 */
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid #667eea;
    word-break: break-all;
    background-color: #f8fafc; /* 确保背景不透明 */
}

.speaker-name-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    box-sizing: border-box;
    background-color: #ffffff; /* 确保背景不透明 */
}

.speaker-name-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.speaker-name-input.invalid {
    border-color: #f56565;
    background-color: #fff5f5; /* 使用不透明背景 */
}

.input-tip {
    font-size: 11px;
    color: #a0aec0;
    margin-top: 4px;
    background-color: transparent;
}

.input-error {
    font-size: 12px;
    color: #e53e3e;
    background: #fff5f5; /* 使用不透明背景 */
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 10px;
    animation: shake 0.3s ease;
    border: 1px solid #feb2b2;
}

.editor-footer {
    padding: 12px 16px 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #edf2f7;
    background-color: #ffffff; /* 确保背景不透明 */
}

.editor-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.editor-btn.cancel {
    background: #e2e8f0;
    color: #4a5568;
    background-color: #e2e8f0; /* 确保背景不透明 */
}

.editor-btn.cancel:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

.editor-btn.save {
    background: #667eea;
    color: white;
    background-color: #667eea; /* 确保背景不透明 */
}

.editor-btn.save:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.save-toast {
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

.save-toast.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.save-toast.error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

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

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

/* 删除按钮和对话框样式 */
.delete-file-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    color: #718096;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: 12px;
}

.delete-file-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, #fed7d7, #fc8181);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.delete-file-btn span {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, color 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.delete-file-btn:hover {
    border-color: #fc8181;
    box-shadow: 0 4px 12px rgba(252, 129, 129, 0.2);
    transform: translateY(-2px);
}

.delete-file-btn:hover::before {
    opacity: 1;
}

.delete-file-btn:hover span {
    color: white;
    transform: scale(1.1);
}

.delete-confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.delete-confirm-dialog {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.delete-dialog-header {
    background: linear-gradient(135deg, #fc8181, #f56565);
    color: white;
    padding: 24px;
    text-align: center;
}

.delete-dialog-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.delete-dialog-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.delete-dialog-content {
    padding: 24px;
}

.delete-file-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
    border-left: 4px solid #fc8181;
}

.delete-warning {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 12px;
}

.delete-dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 24px 24px 24px;
}

.delete-btn-secondary {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    background: #e2e8f0;
    color: #4a5568;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.delete-btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

.delete-btn-danger {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #fc8181, #f56565);
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.delete-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ===== tools 三模式 (整块切换) ===== */
.tools .mode-compact { display: none; }
.tools .mode-detail { display: none; }
.tools .mode-standard { display: flex; align-items: center; gap: 8px; }

@media (max-width: 480px) {
    .tools .mode-standard { display: none; }
    .tools[data-mode="compact"] .mode-compact { display: flex !important; align-items: center; gap: 8px; }
    .tools[data-mode="compact"] .mode-detail { display: none !important; }
    .tools[data-mode="detail"] .mode-compact { display: none !important; }
    .tools[data-mode="detail"] .mode-detail { display: flex !important; align-items: center; gap: 8px; }
}

.file-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.file-info-main {
    flex: 1;
    display: flex;
    min-width: 0;
}

.file-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #718096;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        margin: 0;
        padding: 0;
        max-width: none;
        background: #ffffff;
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
        position: relative;
        border: none;
        display: flex;
        flex-direction: column;
        height: 100vh;
        max-height: 100vh;
        min-height: 100vh;
    }

    .scrollable-container {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0 15px 20px 15px;
        min-height: 0;
        background: #ffffff;
        border-radius: 20px;
        border: 1px solid #e2e8f0;
        box-shadow: none;
        position: relative;
    }

    .file-info {
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
        font-size: 14px;
        margin-bottom: 1px;
    }

    .info-item {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        padding: 5px 5px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        font-weight: 500;
    }

    .file-list-section {
        padding: 5px 5px;
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
    }

    .file-list-header {
        display: flex;
        padding: 1px 1px;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1px;
    }

    .file-list-title {
        font-size: 16px;
        font-weight: 700;
        color: #2d3748;
        position: relative;
        padding-left: 5px;
    }

    .file-list-item {
        padding: 10px 12px;
        border-bottom: 1px solid #e2e8f0;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        align-items: normal;
        gap: 5px;
        margin: 0;
        background: transparent;
    }
    .file-list-item:last-child {
        border-bottom: none;
    }
    .file-items .file-list-item {
        padding: 8px 10px;
        margin: 1px 0;
    }

    /* 场景Tab移动端 */
    .scene-tabs {
        padding: 0 0 8px 0;
        margin-bottom: 8px;
        gap: 4px;
    }
    .scene-tab {
        padding: 3px 10px;
        font-size: 12px;
    }

    /* 年月折叠移动端 */
    .year-header { padding: 6px 6px; }
    .year-label { font-size: 14px; }
    .year-count { font-size: 12px; }
    .month-list { padding-left: 14px; }
    .month-header { padding: 4px 6px; }
    .month-label { font-size: 13px; }
    .month-count { font-size: 11px; }
    .file-items { padding-left: 10px; }

    .speaker-editor {
        position: fixed;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: none;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0;
    }
    
    .editor-arrow {
        display: none;
    }
    
    .editor-footer {
        flex-direction: column;
    }
    
    .editor-btn {
        width: 100%;
        padding: 12px;
    }

    .delete-confirm-dialog {
        width: 95%;
        margin: 20px;
    }

    .delete-dialog-buttons {
        flex-direction: column;
    }

    .delete-btn-secondary,
    .delete-btn-danger {
        width: 100%;
        padding: 14px;
    }
}

/* ============================================
   超小屏移动端适配 (≤ 480px) - 精简/详细双模式
   ============================================ */
@media (max-width: 480px) {
    /* 移动端顶部栏 - 始终显示 */
    .mobile-top-bar {
        display: flex !important;
        align-items: center;
        padding: 6px 10px;
        background: #f8f9fa;
        border-bottom: 1px solid #e2e8f0;
        gap: 8px;
        flex-shrink: 0;
        min-height: 40px;
        z-index: 15;
    }
    .mobile-top-bar .mobile-meta {
        flex: 1;
        font-size: 12px;
        color: #4a5568;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 500;
    }
    .mobile-top-bar .mobile-right-group {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }
    .mobile-top-bar .mobile-btn {
        width: 32px;
        height: 32px;
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
        line-height: 1;
    }
    .mobile-top-bar .mobile-btn-close {
        background: transparent;
        color: #718096;
        font-size: 20px;
    }
    .mobile-top-bar .mobile-btn-close:active { color: #4a5568; }
    .mobile-top-bar .mobile-btn-mode {
        background: rgba(102,126,234,0.1);
        color: #667eea;
        font-size: 14px;
    }
    .mobile-top-bar .mobile-btn-mode:active { background: rgba(102,126,234,0.2); }

    /* ===== 可隐藏元素（通过 data-mode 控制） ===== */
    .app-header[data-mode="compact"] {
        max-height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        opacity: 0 !important;
        overflow: hidden !important;
        border: none !important;
        margin: 0 !important;
        transition: all 0.3s ease;
    }

    /* 退出详情关闭按钮（由 ✕ 替代） */
    #detailViewBackBtn {
        display: none !important;
    }
    /* 详情Tab嵌入按钮栏最左侧 */
    .detail-buttons-container .detail-tabs {
        display: inline-flex !important;
        flex: none !important;
        order: -1;
        border: none !important;
        margin: 0 !important;
        align-items: center;
        gap: 1px;
        background: rgba(0,0,0,0.04);
        border-radius: 5px;
        padding: 2px !important;
    }
    .detail-buttons-container .detail-tab {
        padding: 3px 8px !important;
        font-size: 12px !important;
        border: none !important;
        border-radius: 4px;
        color: #718096;
        background: transparent;
        cursor: pointer;
        white-space: nowrap;
    }
    .detail-buttons-container .detail-tab.active {
        background: white;
        color: #4299e1;
        font-weight: 600;
        box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    }

    /* 容器在移动端铺满 - 通过 flex 链自然填充父容器，不再使用固定 100vh */
    .container {
        margin: 0;
        border-radius: 0;
        flex: 1;
        height: auto;
        max-height: none;
        border: none;
        box-shadow: none;
    }

    /* Header 在移动端更紧凑 */
    .app-header {
        padding: 2px 0px 2px 2px !important;
    }
    .main-tabs {
        display: inline-flex !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border-radius: 50px !important;
        padding: 0px !important;
        gap: 0px !important;
    }
    .main-tab {
        padding: 2px 8px !important;
        font-size: 12px !important;
        border-radius: 50px !important;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.7) !important;
        font-weight: 500 !important;
        transition: all 0.3s ease !important;
        white-space: nowrap !important;
    }
    .main-tab i { font-size: 12px !important; margin-right: 2px !important; }
    .main-tab.active {
        background: rgba(255, 255, 255, 0.95) !important;
        color: #667eea !important;
        font-weight: 600 !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
    }
    .user-info { gap: 4px; }
    .user-info span { font-size: 11px; }
    .logout-btn {
        padding: 2px 5px !important;
        font-size: 14px !important;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.85) !important;
    }

    /* 文件列表区域紧凑 */
    .file-list-section { padding: 4px 4px 48px; }
    .file-list-item {
        padding: 4px 6px !important;
        gap: 4px;
        font-size: 13px;
        margin: 4px 6px;
    }
    .file-list-item:last-child {
        margin-bottom: 0;
    }
    .file-list-header { margin-bottom: 4px; }
    .file-list-title { font-size: 14px; padding-left: 4px; }
    .file-name { font-size: 13px; }
    .file-meta { gap: 4px; font-size: 11px; }
    .file-date, .file-size { padding: 2px 6px; font-size: 11px; }
    .file-device-info { display: none; }

    /* 场景Tab - 超小屏 */
    .scene-tabs { gap: 3px; padding: 0 0 6px 0; margin-bottom: 6px; }
    .scene-tab { padding: 2px 8px; font-size: 11px; }

    /* 年月折叠 - 超小屏 */
    .year-header { padding: 5px 4px; }
    .year-label { font-size: 13px; }
    .year-count { font-size: 11px; }
    .month-list { padding-left: 10px; }
    .month-header { padding: 3px 4px; }
    .month-label { font-size: 12px; }
    .file-items .file-list-item {
        padding: 3px 6px !important;
        margin: 1px 0 !important;
        font-size: 12px;
    }
    .file-items { padding-left: 6px; }

    /* 详情页 scrollable-container 改为 flex 容器 */
    #detailContent > .scrollable-container {
        display: flex;
        flex-direction: column;
        padding-bottom: 48px;
    }
    /* 移除 content-area 过大的最小高度，避免移动端溢出 */
    .content-area {
        min-height: auto !important;
    }

    /* 详情按钮栏 */
    .detail-buttons-container {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end !important;
        gap: 3px;
        flex: none;
        margin-left: auto;
        padding: 0px 6px !important;
    }
    .detail-buttons-container button {
        padding: 0px 6px !important;
        font-size: 11px !important;
        margin-right: 2px !important;
    }
    .detail-buttons-container button span { margin-right: 2px !important; }

    /* 注入到按钮栏的 tab 切换按钮 */
    .detail-buttons-container .detail-tab-inject {
        background: rgba(0,0,0,0.1);
        border: 1px solid rgba(255,255,255,0.15) !important;
        color: rgba(255,255,255,0.85);
        padding: 0px 6px !important;
        border-radius: 4px;
        cursor: pointer;
        font-size: 11px !important;
        white-space: nowrap;
        line-height: 1;
        margin: 0;
        font-weight: normal;
    }
    .detail-buttons-container .detail-tab-inject.active {
        background: white;
        color: #667eea;
        font-weight: 600;
    }

    /* 移动端 tab 按钮字号与操作按钮统一 */
    .detail-tab { font-size: 11px !important; padding: 0px 8px; }

    /* 手机屏幕下 tab 容器只下移 4px */
    .tools .detail-tabs { margin-top: 0px !important; }

    /* 对话块压缩 */
    .conversation-block { padding: 4px; margin-bottom: 4px; }
    .conversation-block::before { width: 3px; }
    .speaker-avatar { width: 28px; height: 28px; font-size: 11px; }
    .speaker-name { font-size: 14px; }
    .speaker-header { gap: 4px; }
    .speaker-info { gap: 4px; }
    .time-range { font-size: 11px; padding: 2px 6px; }
    .merged-text { font-size: 14px; line-height: 1.6; }

    /* 内容区域 */
    .content-area { padding: 6px 4px !important; }
    #conversationContent { padding: 0 !important; }

    /* 纪要内容 */
    #summaryContent .summary-container h1 { font-size: 1.2em; }
    #summaryContent .summary-container h2 { font-size: 1.1em; }
    #summaryContent .summary-container p { text-indent: 0; }
    #summaryContent .summary-container table { font-size: 0.8em; }
    #summaryContent .summary-container th,
    #summaryContent .summary-container td { padding: 4px 6px; }

    /* 教培笔记压缩 */
    .jp-note .jp-meta { padding: 12px; }
    .jp-note .jp-chapter-header { padding: 10px 12px; gap: 4px; }
    .jp-note .jp-title-text { font-size: 13px; }
    .jp-note .jp-section { padding: 12px; }
    .jp-note .jp-block { padding: 8px 10px; font-size: 12px; }

    /* 设备管理 */
    .device-stats { margin-bottom: 10px; }
    .stat-card { padding: 12px; }
    .stat-value { font-size: 18px; }
    .device-list-header h3 { font-size: 15px; }
    .add-device-btn-main { padding: 6px 12px; font-size: 12px; }
    .device-item-main { padding: 8px 10px; }

    /* 空状态 */
    .empty-state { padding: 40px 10px; }
    .empty-state-icon { font-size: 48px; }
    .empty-state h3 { font-size: 18px; }
    .empty-state p { font-size: 14px; }

    /* 迷你播放器 */
    .mini-player { width: 50px; height: 50px; bottom: 15px; right: 15px; }
    .mini-player .mini-player-btn { width: 32px; height: 32px; font-size: 14px; }

    /* 删除对话框全屏 */
    .delete-confirm-dialog { width: 100%; margin: 0; border-radius: 0; }
    .delete-dialog-header { padding: 16px; }
    .delete-dialog-header h3 { font-size: 18px; }

    /* 说话人编辑全屏 */
    .speaker-editor {
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: none !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }
    .speaker-editor .editor-arrow { display: none !important; }
    .speaker-editor .editor-footer { flex-direction: column; }
    .speaker-editor .editor-btn { width: 100%; padding: 12px; }
}