/* ===== 基础 ===== */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #059669;
    --info: #0284c7;
    --error: #dc2626;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
    --radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 640px;
    padding: 40px 20px;
    flex: 1;
}

/* ===== 头部 ===== */
header {
    text-align: center;
    margin-bottom: 32px;
}
header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ===== 上传区域 ===== */
.upload-zone {
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: #eef2ff;
}
.upload-icon { font-size: 48px; margin-bottom: 12px; }
.upload-zone p { margin-bottom: 8px; font-size: 15px; }
.hint { font-size: 13px !important; color: var(--text-secondary); }

/* ===== 文件信息 ===== */
.file-info {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}
.file-name { flex: 1; font-weight: 600; min-width: 120px; word-break: break-all; }
.file-size { color: var(--text-secondary); font-size: 14px; margin-left: auto; }
.prompt-row { width: 100%; margin-top: 8px; }
.prompt-input {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; outline: none; transition: border-color 0.2s;
}
.prompt-input:focus { border-color: var(--primary); }
.file-actions { display: flex; gap: 8px; margin-top: 12px; width: 100%; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: #f1f5f9; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #047857; }
.btn-info { background: var(--info); color: white; }
.btn-info:hover { background: #0369a1; }

/* ===== 进度 ===== */
.progress-section { margin-top: 16px; }
.progress-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}
.status-badge.processing { background: #eef2ff; color: var(--primary); }
.status-badge.done { background: #ecfdf5; color: var(--success); }
.status-badge.error { background: #fef2f2; color: var(--error); }

.progress-bar-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}
.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}
.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.progress-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== 结果 ===== */
.result-section {
    margin-top: 24px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}
.result-section h2 { margin-bottom: 8px; }
.result-hint { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== 底部 ===== */
footer {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* ===== 工具类 ===== */
.hidden { display: none !important; }
