/* 全局重置与基础样式 - 移植自 RunBeat (CadenceSync) 视觉系统 */
:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #12131a;
    --card-bg: #252736;
    --border-color: rgba(255, 255, 255, 0.12);
    
    /* 核心文字体系 */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8; /* slate-400 */
    --text-muted: #4b5563; /* slate-600 */
    
    /* 恢复原先粉紫渐变色与悬停色 */
    --primary-grad: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --hover-grad: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #db2777 100%);
    --btn-secondary: rgba(255, 255, 255, 0.05);
    --btn-secondary-hover: rgba(255, 255, 255, 0.1);
    
    --success-color: #10b981; /* emerald-500 */
    --accent-color: #a855f7; /* 改回紫色以匹配按钮配色 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle at 50% 0%, #12131a 0%, #0a0a0c 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
}

/* 背景流动发光球 (Glassmorphism 效果) */
.glass-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, rgba(99, 102, 241, 0.03) 50%, transparent 100%);
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    filter: blur(80px);
    animation: pulse-bg 12s infinite alternate ease-in-out;
}

@keyframes pulse-bg {
    0% { transform: scale(1) translate(-50%, 0); }
    100% { transform: scale(1.15) translate(-40%, 40px); }
}

/* 主容器 */
.app-container {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 头部样式 (移植 RunBeat 居中大气排版，稍微放大 Logo) */
.app-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem 0 1.5rem 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 112px; /* 稍微放大 logo */
    height: 112px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 0 35px rgba(168, 85, 247, 0.35); /* 阴影颜色也贴合粉紫 */
    border: 2px solid rgba(168, 85, 247, 0.5);
    margin-bottom: 1rem;
    background: #0f1016;
}

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

.main-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* 主板两栏布局 */
.main-content {
    display: grid;
    grid-template-columns: 4.5fr 7.5fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* 通用卡片容器 - 大圆角与精致暗框 */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.8rem;
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 拖拽上传区域 - 大圆角与柔和虚线 */
.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-color);
    background: rgba(168, 85, 247, 0.04);
    box-shadow: 0 0 20px -5px rgba(168, 85, 247, 0.15);
}

.upload-icon {
    font-size: 2.2rem;
    color: var(--text-muted);
    transition: transform 0.25s ease, color 0.25s ease;
}

.upload-zone:hover .upload-icon {
    transform: translateY(-4px);
    color: var(--accent-color);
}

.upload-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
}

.upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 文件信息卡片 */
.file-info-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: fadeIn 0.3s ease;
}

.book-icon {
    font-size: 1.25rem;
    color: var(--accent-color);
}

.file-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.filename {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.filesize {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

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

/* 选项组样式 */
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.settings-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.icon-label {
    font-size: 0.85rem;
    color: var(--accent-color);
}

.custom-select {
    background-color: #151722;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.25);
}

/* 滑块头与显示 */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.slider-header span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* 移植 RunBeat 自定义高级滑动条样式，滑块颜色贴合主渐变 */
.custom-range {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.18);
    outline: none;
    margin: 10px 0;
    cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #a855f7; /* 改回紫色 */
    cursor: pointer;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
    transition: transform 0.1s ease, background-color 0.1s ease;
    border: none;
}

.custom-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #ec4899; /* 悬停变为粉色 */
}

/* 选项卡面板 */
.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 0.75rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: var(--text-primary);
    background: rgba(168, 85, 247, 0.12);
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.2);
}

.tab-content-container {
    min-height: 380px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.tab-content {
    display: none;
    animation: fadeIn 0.25s ease;
    flex: 1;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* 章节选项列表操作 */
.chapter-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

/* 恢复原先 8px 圆角与阴影配色效果 */
.primary-btn {
    background: var(--primary-grad);
    color: #fff;
    border: none;
    padding: 0.65rem 1.4rem;
    border-radius: 8px; /* 恢复 8px */
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px -3px rgba(168, 85, 247, 0.4);
}

.primary-btn:hover:not(:disabled) {
    background: var(--hover-grad);
    box-shadow: 0 6px 20px -3px rgba(168, 85, 247, 0.5);
    transform: translateY(-1px);
}

.primary-btn:active:not(:disabled) {
    transform: translateY(0);
}

.primary-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

.secondary-btn {
    background: var(--btn-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.65rem 1rem;
    border-radius: 8px; /* 恢复 8px */
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.secondary-btn:hover {
    background: var(--btn-secondary-hover);
    border-color: rgba(255, 255, 255, 0.15);
}


.chapters-wrapper {
    flex: 1;
    overflow-y: auto;
    max-height: 380px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.2);
}

.placeholder-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5rem 2rem;
    color: var(--text-secondary);
    gap: 1rem;
    text-align: center;
}

.placeholder-icon {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.03);
}

.placeholder-text p {
    font-size: 0.8rem;
    font-weight: 600;
}

.chapters-list {
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chapter-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.chapter-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.chapter-item input[type="checkbox"] {
    margin-right: 0.8rem;
    accent-color: var(--accent-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.chapter-title {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    flex: 1;
}

.chapter-len {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-left: 0.5rem;
    font-weight: 600;
}

/* 进度条与转换展示 */
.conversion-progress {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.progress-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
}

.progress-title {
    color: var(--text-secondary);
}

.progress-track {
    width: 100%;
    height: 8px;
    background: #1e293b;
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-grad);
    border-radius: 99px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.current-fill {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

.current-text-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.current-text-card h4 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 800;
    text-transform: uppercase;
}

.current-text {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #e2e8f0;
    font-weight: 600;
}

/* 下载列表 */
.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    overflow-y: auto;
    max-height: 380px;
    padding: 0.2rem;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    animation: fadeIn 0.3s ease;
}

.audio-icon-container {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-color);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.download-meta {
    flex: 1;
    overflow: hidden;
}

.audio-name {
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.audio-size {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: 1px;
    font-weight: 600;
}

.audio-player {
    height: 32px;
    outline: none;
    border-radius: 99px;
    background: transparent;
}

/* HTML5 audio 样式美化 */
audio::-webkit-media-controls-enclosure {
    background-color: rgba(255, 255, 255, 0.04);
}

.download-btn {
    background: var(--btn-secondary);
    border: 1px solid rgba(255, 255, 255, 0.04);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.download-btn:hover {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    border-color: transparent;
}

/* 美化滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* 声音演示组件行 */
.voice-select-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

/* 核心：输入文本框 (移植 RunBeat 风格并在默认状态加持灰色高亮背景) */
.custom-textarea {
    background-color: #0f1016;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 0.85rem 1.1rem;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
    background-color: #0f1016 !important;
    color: #ffffff !important;
}

/* 文本框占位高亮灰色背景类 */
.custom-textarea.is-default {
    background-color: #0f1016 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #556278 !important; /* 深度暗灰色文本，完美背景化 */
}

/* 胶囊式模式选择器 */
.mode-selector {
    display: flex;
    background-color: #151722;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.25rem;
    border-radius: 16px;
    margin-bottom: 0.25rem;
}

.mode-btn {
    flex: 1;
    border: none;
    background: none;
    color: var(--text-secondary);
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.mode-btn:hover {
    color: var(--text-primary);
}

.mode-btn.active {
    background: var(--primary-grad);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.text-mode-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 0.5rem;
}

/* 自适应单栏布局类 */
.single-column-layout {
    grid-template-columns: 1fr !important;
    max-width: 672px;
    margin: 0 auto;
    width: 100%;
}

/* 挂载打赏组件的容器自适应居中 */
.donate-wrapper {
    max-width: 672px;
    width: 100%;
    margin: 0.5rem auto 0 auto;
}

/* 底部版权信息 */
.app-footer {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #334155;
    margin-top: 1rem;
    padding-bottom: 2rem;
}

/* 绿色本地解析 badge 样式 */
.local-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: #34d399; /* emerald-400 */
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 0.6rem;
    box-shadow: 0 1px 5px rgba(16, 185, 129, 0.02);
}

/* 书籍章节切分重组面板动画 */
.book-split-settings {
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ==================== 网易云听书助手 UI 样式 ==================== */

/* 登录状态标签 */
.badge-status-gray {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.badge-status-green {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}
.badge-status-red {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

/* 弹窗遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s ease-out;
}

/* 弹窗主体卡片 (玻璃拟态) */
.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 弹窗头部 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.15s ease;
}

.close-btn:hover {
    color: var(--text-primary);
}

/* 二维码过期遮罩层 */
.qr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.9);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    gap: 0.4rem;
    font-size: 0.72rem;
    z-index: 10;
}

/* 音频单曲同步网易云盘按钮 */
.netease-cloud-btn {
    background: rgba(230, 0, 38, 0.05);
    border: 1px solid rgba(230, 0, 38, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #e60026;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.netease-cloud-btn:hover {
    background: #e60026;
    color: #fff;
    box-shadow: 0 4px 12px rgba(230, 0, 38, 0.4);
    border-color: transparent;
}

.netease-cloud-btn.synced {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    cursor: default;
    box-shadow: none !important;
}

.netease-cloud-btn.syncing {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-secondary) !important;
    cursor: not-allowed;
}

/* 进度环状或旋转 */
.spin {
    animation: fa-spin 1s infinite linear;
}

/* 后台同步开关 Toggle Switch */
.switch input:checked + .slider {
    background-color: #3b82f6 !important;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.switch-label:hover {
    color: #fff !important;
}

/* ==================== 窄屏/移动端响应式自适应覆盖样式 ==================== */
@media (max-width: 768px) {
    /* 改变 body 为垂直方向排列，使静态定位的菜单能排列在 Logo 的下方 */
    body {
        flex-direction: column !important;
        align-items: center !important;
        padding: 1.5rem 0.5rem 2rem 0.5rem !important;
    }

    /* 缩小 app-container 的 gap，紧凑布局 */
    .app-container {
        gap: 1rem !important;
    }

    /* 用户菜单设为常规流，在垂直排列中靠上居中 */
    .user-header-area {
        position: static !important;
        margin: 0rem auto 1rem auto !important;
        display: flex;
        justify-content: center;
        width: auto !important;
    }

    /* 卡片内部 padding 适当调小，给内容腾出宽度 */
    .card {
        padding: 1.2rem !important;
        gap: 1.2rem !important;
        border-radius: 20px !important;
    }

    /* 居中标题字号在小屏下稍微缩小 */
    .main-title {
        font-size: 1.8rem !important;
    }

    /* 文件拖拽解析区缩小 padding */
    .upload-zone {
        padding: 1.8rem 0.8rem !important;
    }

    /* 章节操作栏让其内部按钮水平铺满或换行居中 */
    .chapter-actions {
        justify-content: center !important;
    }

    .chapter-actions button {
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }

    .chapter-actions span {
        max-width: 100% !important;
        text-align: center;
        margin-top: 0.2rem !important;
    }
}
