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

body {
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 640px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #fff;
    font-size: 28px;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    text-align: center;
    color: rgba(255,255,255,0.9);
    margin-bottom: 24px;
    font-size: 14px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card h2 {
    font-size: 16px;
    color: #555;
    margin-bottom: 14px;
    border-left: 4px solid #185a9d;
    padding-left: 10px;
}

.captcha-row, .upload-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.quality-row {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 12px;
    background: #f4f8fb;
    border-radius: 8px;
}

.quality-opt {
    font-size: 14px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.quality-opt input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.quality-opt.custom {
    color: #185a9d;
    font-weight: 600;
}

.quality-opt input[type="number"] {
    width: 60px;
    padding: 4px 6px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.quality-opt input[type="number"]:not(:disabled) {
    border-color: #185a9d;
    color: #185a9d;
    font-weight: 600;
}

.row-label {
    font-size: 14px;
    color: #185a9d;
    font-weight: 600;
}

.captcha-q {
    font-size: 22px;
    font-weight: bold;
    color: #185a9d;
    background: #eef5fb;
    padding: 8px 16px;
    border-radius: 8px;
    min-width: 110px;
    text-align: center;
}

input[type="text"], input[type="file"] {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"] { width: 90px; text-align: center; }
input[type="file"] { flex: 1; min-width: 200px; }

input[type="text"]:focus, input[type="file"]:not(:disabled):hover {
    border-color: #185a9d;
}

button, .download-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #185a9d;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
}

button:hover:not(:disabled), .download-btn:hover {
    background: #0f3d6b;
}

button:active:not(:disabled) { transform: scale(0.97); }

button:disabled {
    background: #9fb8d4;
    cursor: not-allowed;
}

.tip {
    margin-top: 12px;
    font-size: 13px;
    color: #888;
}

.filename {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
    word-break: break-all;
}

.status-text {
    font-size: 15px;
    margin-bottom: 12px;
    color: #555;
}

.status-text.done { color: #2e7d32; font-weight: bold; }

.progress-bar {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #43cea2, #185a9d);
    transition: width 0.4s;
    animation: indeterminate 1.6s infinite;
}

@keyframes indeterminate {
    0% { width: 0%; margin-left: 0%; }
    50% { width: 60%; margin-left: 20%; }
    100% { width: 0%; margin-left: 100%; }
}

.download-btn {
    background: #2e7d32;
    margin-top: 8px;
}

.download-btn:hover { background: #1b5e20; }

.footer {
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    margin-top: 20px;
}
