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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f1f5f9;
    color: #334155;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.container {
    width: 100%;
    max-width: 560px;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #94a3b8;
    margin: 8px 0 32px;
    font-size: 14px;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #6366f1;
    background: #eef2ff;
}

.upload-area p {
    margin-top: 12px;
    font-size: 15px;
    color: #64748b;
}

.browse-link {
    color: #6366f1;
    font-weight: 600;
    text-decoration: underline;
}

.upload-area .hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.file-list {
    margin-top: 16px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 14px;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: #94a3b8;
    font-size: 12px;
    flex-shrink: 0;
}

.file-remove {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}

.options {
    margin-top: 24px;
}

.options label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #475569;
}

.options input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
}

.options input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-convert {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-convert:hover:not(:disabled) {
    background: #4f46e5;
}

.btn-convert:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.progress-area {
    margin-top: 32px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #6366f1;
    font-size: 15px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e7ff;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.result-area {
    margin-top: 32px;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #22c55e;
    margin-bottom: 16px;
}

.result-item {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}

.result-item.success {
    background: #f0fdf4;
    color: #166534;
}

.result-item.error {
    background: #fef2f2;
    color: #991b1b;
}

.download-section {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-download {
    flex: 1;
    padding: 12px;
    background: #22c55e;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-download:hover {
    background: #16a34a;
}

.btn-reset {
    padding: 12px 20px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-reset:hover {
    background: #e2e8f0;
}

.error-area {
    margin-top: 32px;
    background: #fef2f2;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: #991b1b;
}

.error-area p {
    margin-bottom: 16px;
}

.error-area .btn-reset {
    background: #fff;
    border-color: #fecaca;
    color: #991b1b;
}

[hidden] { display: none !important; }
.upload-area { display: flex; width: 100%; flex-direction: column; align-items: center; gap: 12px; font: inherit; color: #475569; }
.upload-area:disabled { cursor: default; opacity: .6; }
.upload-icon { font-size: 40px; line-height: 1; color: #6366f1; }
.hint, .notice, .privacy-note { font-size: 12px; line-height: 1.7; color: #64748b; }
.options .hint { margin-top: 8px; }
.notice { margin-top: 16px; }
.privacy-note { margin-top: 24px; text-align: center; }
.progress-panel { margin-top: 28px; padding: 20px; border-radius: 12px; background: #fff; }
.progress-panel .progress-area { margin-top: 0; text-align: left; justify-content: flex-start; }
.progress-panel .hint { margin-top: 10px; }
.spinner { flex-shrink: 0; }
progress { width: 100%; margin-top: 16px; height: 8px; accent-color: #6366f1; }
.result-item, #progressText, #errorMsg { overflow-wrap: anywhere; line-height: 1.7; }
.file-remove:disabled { opacity: .3; cursor: default; }
:focus-visible { outline: 2px solid #6366f1; outline-offset: 3px; }
.error-area p { margin-bottom: 0; }
@media (max-width: 480px) { body { padding: 24px 16px; } .upload-area { padding: 32px 16px; } .result-area { padding: 16px; } }
