/* ── 全局 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ── 返回链接 ── */
.back-link {
    display: inline-block;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.back-link:hover { color: #3498db; }

/* ── 标题 ── */
h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #2c3e50;
}
.page-desc {
    color: #7f8c8d;
    font-size: 15px;
    margin-bottom: 32px;
    line-height: 1.8;
}
.page-desc strong { color: #2c3e50; }

/* ── 上传区域 ── */
.upload-zone {
    border: 2px dashed #bdc3c7;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: #fff;
}
.upload-zone:hover { border-color: #3498db; background: #f0f8ff; }
.upload-zone.drag-over {
    border-color: #2ecc71;
    background: #f0fff4;
    transform: scale(1.02);
}
.upload-zone.has-file { border-color: #3498db; background: #f0f8ff; }

.upload-icon { font-size: 48px; margin-bottom: 12px; }
.upload-text { font-size: 18px; color: #34495e; margin-bottom: 4px; }
.upload-hint { font-size: 14px; color: #95a5a6; }

/* ── 文件信息 ── */
.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #eaf6ff;
    border: 1px solid #b6d4fe;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
}
.file-info #fileName {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
    word-break: break-all;
}
.file-info #fileSize {
    color: #7f8c8d;
    font-size: 13px;
    white-space: nowrap;
}
.btn-remove {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.btn-remove:hover { color: #c0392b; }

/* ── 按钮 ── */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    font-weight: 600;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
    background: #3498db;
    color: #fff;
    margin-top: 20px;
    width: 100%;
}
.btn-primary:hover:not(:disabled) { background: #2980b9; }

.btn-success {
    background: #2ecc71;
    color: #fff;
    margin-top: 12px;
}
.btn-success:hover { background: #27ae60; }

/* ── 进度 ── */
.progress {
    margin-top: 20px;
    background: #ecf0f1;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}
.progress-bar {
    height: 6px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
    width: 0%;
    margin-bottom: 10px;
    transition: width 0.4s ease;
}
#statusText {
    font-size: 14px;
    color: #7f8c8d;
}

/* ── 错误 / 结果 ── */
.error {
    background: #fdecea;
    border: 1px solid #e74c3c;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    color: #c0392b;
    font-size: 14px;
}

.result {
    background: #eafaf1;
    border: 1px solid #2ecc71;
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
    text-align: center;
}
.result p { font-size: 18px; margin-bottom: 12px; }

/* ── 说明 ── */
.note {
    margin-top: 40px;
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 20px;
}
.note h3 { font-size: 16px; margin-bottom: 12px; color: #34495e; }
.note ul {
    padding-left: 20px;
    color: #7f8c8d;
    font-size: 14px;
}
.note li { margin-bottom: 6px; }

/* ── 首页工具网格 ── */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 32px;
}
.tool-card {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    display: block;
}
.tool-card:hover {
    border-color: #3498db;
    box-shadow: 0 4px 16px rgba(52,152,219,0.15);
    transform: translateY(-2px);
}
.tool-icon { font-size: 36px; margin-bottom: 8px; }
.tool-name { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.tool-desc { font-size: 14px; color: #7f8c8d; line-height: 1.6; }

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