/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f0f4f8;
    color: #333;
    line-height: 1.5;
    overflow: hidden;
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    width: 75vw;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== 顶部标题区 ===== */
.page-header {
    text-align: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.title-icon {
    display: inline-block;
    margin-bottom: 6px;
}

.title-icon svg,
.title-img {
    width: 80px;
    height: 80px;
    display: block;
}

.main-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 2px;
    letter-spacing: 0;
}

.sub-title {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

/* ===== 主体内容区 ===== */
.content-wrapper {
    display: flex;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    flex: 0.8;
    min-height: 0;
}

/* ===== 左侧面板 ===== */
.left-panel {
    width: 310px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== 上传卡片 ===== */
.upload-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px 16px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1px;
}

.card-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.card-desc {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 10px;
    margin-left: 20px;
}

.upload-zone {
    background: #f7f9fc;
    border: 1.5px dashed #d0d8e6;
    border-radius: 8px;
    padding: 18px 12px 14px;
    text-align: center;
    transition: all 0.2s;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.upload-card:hover .upload-zone,
.upload-card.dragover .upload-zone {
    border-color: #4A7CFF;
    background: #f4f8ff;
}

.upload-icon-circle {
    display: inline-block;
    margin-bottom: 6px;
}

.upload-icon-circle svg {
    width: 28px;
    height: 28px;
    display: block;
}

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

.upload-format {
    font-size: 11px;
    color: #bbb;
    margin-bottom: 12px;
}

.btn-text {
    background: transparent;
    color: #4A7CFF;
    border: 1px solid #4A7CFF;
    padding: 5px 24px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-text:hover {
    background: #4A7CFF;
    color: #fff;
}

/* ===== 进度条卡片 ===== */
.progress-card {
    background: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: #e8ecf1;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4A7CFF, #7CA0FF);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 11px;
    color: #888;
}

/* ===== 使用说明卡片 ===== */
.info-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
}

.info-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

.check-icon {
    flex-shrink: 0;
    display: inline-flex;
    margin-top: 0px;
}

.check-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* ===== 右侧面板 ===== */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.file-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.file-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1px;
    flex-shrink: 0;
}

.file-card-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

.file-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.file-card-subtitle {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 10px;
    flex-shrink: 0;
    margin-left: 20px;
}

.file-list-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
}

.empty-icon {
    margin-bottom: 8px;
}

.empty-icon svg {
    width: 44px;
    height: 44px;
    display: block;
    margin: 0 auto;
}

.empty-text {
    font-size: 14px;
    color: #bbb;
    margin-bottom: 3px;
}

.empty-subtext {
    font-size: 12px;
    color: #ddd;
}

/* ===== 文件列表 ===== */
.file-list {
    width: 100%;
    list-style: none;
}

.file-list li {
    display: flex;
    align-items: center;
    padding: 7px 8px;
    border-bottom: 1px solid #f0f2f5;
}

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

.file-list li:hover {
    background: #f8f9fc;
}

.file-list li .file-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.file-list li .file-icon {
    font-size: 13px;
    flex-shrink: 0;
}

.file-list li .file-name {
    font-size: 12px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list li .file-size {
    font-size: 11px;
    color: #999;
    margin: 0 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.file-list li .btn-dl {
    background: #4A7CFF;
    color: #fff;
    border: none;
    padding: 3px 12px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== 全部下载按钮 ===== */
.batch-download {
    border-top: 1px solid #f0f2f5;
    padding-top: 10px;
    margin-top: 8px;
    flex-shrink: 0;
    text-align: center;
}

.btn-batch {
    background: #52c41a;
    color: #fff;
    border: none;
    padding: 7px 28px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
}

.btn-batch:disabled {
    background: #bbb;
    cursor: not-allowed;
}

/* ===== 底部隐私说明 ===== */
.privacy-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 20px 10px;
    background: #eaf2f6;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
}

.privacy-icon {
    flex-shrink: 0;
    display: inline-flex;
}

.privacy-icon svg {
    width: 15px;
    height: 15px;
    display: block;
}

.privacy-footer p {
    font-size: 12px;
    color: #777;
    line-height: 1.5;
    text-align: center;
}

.privacy-footer p strong {
    color: #555;
}

/* ===== 自定义弹窗 ===== */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dialog-box {
    background: #fff;
    border-radius: 14px;
    padding: 28px 32px;
    width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.dialog-icon {
    font-size: 22px;
}

.dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.dialog-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

.dialog-folder-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f7fa;
    border: 1px solid #e0e4ea;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

.dialog-folder-name {
    font-size: 15px;
    font-weight: 600;
    color: #4A7CFF;
    word-break: break-all;
    text-align: left;
    flex: 1;
    margin-right: 10px;
}

.dialog-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef2ff;
    color: #4A7CFF;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.dialog-copy-btn:hover {
    background: #dce4ff;
}

.dialog-copy-btn svg {
    width: 14px;
    height: 14px;
}

.dialog-copy-btn.copied {
    background: #52c41a;
    color: #fff;
}

.dialog-hint {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 20px;
}

.dialog-actions {
    display: flex;
    justify-content: center;
}

.dialog-btn-ok {
    background: #4A7CFF;
    color: #fff;
    border: none;
    padding: 10px 48px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.dialog-btn-ok:hover {
    background: #3a66e0;
}

/* ===== 下载管理悬浮对话框 ===== */
.dl-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dl-box {
    background: #fff;
    border-radius: 14px;
    padding: 22px 24px 20px;
    width: 400px;
    box-shadow: 0 8px 36px rgba(0,0,0,0.18);
}

.dl-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.dl-title-icon { font-size: 20px; }
.dl-title-text { font-size: 16px; font-weight: 600; color: #333; flex: 1; }

.dl-close {
    background: none; border: none;
    font-size: 18px; color: #aaa; cursor: pointer;
    padding: 2px 6px; border-radius: 4px;
}
.dl-close:hover { background: #f0f0f0; }

/* 进度条 */
.dl-progress-bar {
    width: 100%; height: 4px;
    background: #e8ecf1; border-radius: 2px;
    overflow: hidden; margin-bottom: 16px;
}
.dl-progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #4A7CFF, #7CA0FF);
    border-radius: 2px; transition: width 0.4s ease;
}

/* 模式通用 */
.dl-mode {  }

/* 文件模式 */
.dl-info {
    font-size: 13px; color: #888; margin-bottom: 10px;
}

.dl-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f7fa;
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.dl-file-icon { font-size: 22px; flex-shrink: 0; }

.dl-file-detail {
    flex: 1; min-width: 0;
}
.dl-file-name {
    font-size: 14px; font-weight: 500; color: #333;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block;
}
.dl-file-size {
    font-size: 12px; color: #999;
}

.dl-file-index {
    font-size: 13px; color: #4A7CFF; font-weight: 500;
    flex-shrink: 0;
}

.dl-btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #4A7CFF;
    color: #fff;
    border: none;
    padding: 12px 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.dl-btn-download:hover { background: #3a66e0; }
.dl-btn-download:active { background: #2d52c0; }

.dl-btn-icon { font-size: 16px; }

/* 文件夹模式 */
.dl-folder-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f7fa;
    border: 1px solid #e0e4ea;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 10px 0;
}

.dl-folder-name {
    font-size: 15px; font-weight: 600; color: #4A7CFF;
    flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.dl-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef2ff; color: #4A7CFF;
    border: none; padding: 6px 14px; border-radius: 6px;
    font-size: 12px; cursor: pointer; white-space: nowrap;
    transition: background 0.2s; flex-shrink: 0;
}
.dl-copy-btn:hover { background: #dce4ff; }
.dl-copy-btn svg { width: 14px; height: 14px; }

.dl-hint {
    font-size: 12px; color: #aaa;
    text-align: center; margin-bottom: 14px;
}

.dl-btn-ok {
    width: 100%;
    background: #52c41a; color: #fff;
    border: none; padding: 10px 0; border-radius: 8px;
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: background 0.2s;
}
.dl-btn-ok:hover { background: #45a818; }

/* 完成模式 */
.dl-done-icon { font-size: 40px; text-align: center; margin-bottom: 8px; }
.dl-done-text {
    font-size: 16px; font-weight: 500; color: #333;
    text-align: center; margin-bottom: 16px;
}
.dl-btn-close-done {
    width: 100%;
    background: #e8ecf1; color: #666;
    border: none; padding: 10px 0; border-radius: 8px;
    font-size: 14px; cursor: pointer;
}
.dl-btn-close-done:hover { background: #dce0e6; }

/* ===== SEO 隐藏文字（搜索引擎可抓取，视觉上隐藏） ===== */
.seo-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 820px) {
    body {
        overflow: auto;
    }

    .app-container {
        height: auto;
        min-height: 100vh;
        padding: 16px;
        max-width: 100%;
    }

    .content-wrapper {
        flex-direction: column;
        max-width: 100%;
        padding: 0;
    }

    .left-panel {
        width: 100%;
    }

    .right-panel {
        min-height: 180px;
    }

    .privacy-footer {
        max-width: 100%;
    }
}
