* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.2rem;
    margin: 0 0 10px;
    color: #2c3e50;
}

header p {
    color: #666;
    font-size: 1.05rem;
}

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

.card h2 {
    margin-top: 0;
    font-size: 1.4rem;
    color: #2c3e50;
    border-bottom: 2px solid #eef2f7;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

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

.upload-area:hover,
.upload-area.dragover {
    border-color: #3182ce;
    background: #ebf8ff;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-area .icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.upload-area p {
    margin: 8px 0;
    color: #4a5568;
}

.upload-area .formats {
    font-size: 0.9rem;
    color: #718096;
}

.btn {
    display: inline-block;
    background: #3182ce;
    color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn:hover {
    background: #2b6cb0;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

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

.btn-secondary {
    background: #edf2f7;
    color: #2d3748;
}

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

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 180px;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #4a5568;
    font-size: 0.9rem;
}

.form-group select,
.form-group input {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.conversions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.conversions-table th,
.conversions-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #edf2f7;
}

.conversions-table th {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-processing {
    background: #dbeafe;
    color: #1e40af;
}

.badge-completed {
    background: #d1fae5;
    color: #065f46;
}

.badge-failed {
    background: #fee2e2;
    color: #991b1b;
}

.file-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.file-info-item {
    background: #f7fafc;
    padding: 14px 16px;
    border-radius: 8px;
}

.file-info-item .label {
    font-size: 0.8rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.file-info-item .value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3748;
    word-break: break-all;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(49, 130, 206, 0.3);
    border-top-color: #3182ce;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

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

.error-message {
    color: #991b1b;
    font-size: 0.85rem;
    margin-top: 4px;
}

footer {
    text-align: center;
    color: #a0aec0;
    font-size: 0.85rem;
    margin-top: 40px;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }

    .form-group {
        width: 100%;
    }
}
