* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.16), transparent 28%),
        #f2f4f8;
    color: #1f2937;
}

.page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 36px 20px;
}

.card {
    width: 100%;
    max-width: 760px;
    background: rgba(255, 255, 255, 0.96);
    padding: 34px;
    border-radius: 24px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.badge {
    display: inline-block;
    margin-bottom: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

h1 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 22px;
}

.description {
    color: #64748b;
    line-height: 1.65;
    margin-bottom: 30px;
    font-size: 16px;
}

.section-description {
    color: #64748b;
    line-height: 1.55;
    margin-top: 0;
    margin-bottom: 18px;
}

.tool-section {
    padding: 24px;
    margin-top: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

label {
    font-weight: 700;
    color: #334155;
}

select,
input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
    background: #ffffff;
    color: #0f172a;
}

select:focus,
input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

input[type="file"] {
    padding: 11px;
    cursor: pointer;
}

button {
    margin-top: 8px;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.18s ease;
}

button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

button:disabled {
    background: #93c5fd;
    cursor: wait;
    transform: none;
}

.format-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 14px;
}

.format-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.format-select {
    appearance: none;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.format-select:hover {
    background: #f1f5f9;
}

.arrow-button {
    width: 56px;
    height: 52px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 14px;
    background: #dbeafe;
    color: #2563eb;
    font-size: 26px;
    font-weight: 900;
    cursor: pointer;
    line-height: 1;
}

.arrow-button:hover {
    background: #bfdbfe;
}

.status-box {
    display: none;
    margin-top: 12px;
    padding: 13px 15px;
    border-radius: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.status-box.loading {
    display: block;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.status-box.success {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.status-box.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.info {
    margin-top: 24px;
    padding: 24px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.info h2 {
    font-size: 19px;
    margin-bottom: 12px;
}

.info ul {
    margin: 0;
    padding-left: 20px;
    color: #475569;
    line-height: 1.65;
}

.error-page-message {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 700;
    border: 1px solid #fecaca;
    line-height: 1.5;
}

.back-link {
    display: inline-block;
    margin-top: 4px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
}

.back-link:hover {
    background: #1d4ed8;
}

@media (max-width: 700px) {
    .page {
        padding: 20px;
    }

    .card {
        padding: 24px;
        border-radius: 20px;
    }

    h1 {
        font-size: 28px;
    }

    .tool-section {
        padding: 18px;
    }

    .format-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .arrow-button {
        width: 100%;
    }
}
