* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #111827;
}

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

.card {
    width: 100%;
    max-width: 980px;
    background: #ffffff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .28);
}

.header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 26px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    color: #0f172a;
}

.subtitle {
    color: #475569;
    max-width: 720px;
    line-height: 1.6;
}

.badge {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: bold;
}

.form {
    margin-top: 16px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #111827;
}

textarea,
input,
select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 14px;
    font-size: 15px;
    outline: none;
    transition: .2s;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

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

.actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.btn {
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: 800;
    cursor: pointer;
    font-size: 15px;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn:hover,
.copy:hover {
    filter: brightness(.95);
}

.alert {
    margin: 18px 0;
    padding: 16px;
    border-radius: 14px;
    font-weight: 700;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

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

.result-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.result code {
    display: block;
    white-space: pre-wrap;
    word-break: break-all;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.6;
}

.copy {
    border: none;
    background: #0f172a;
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.info {
    margin-top: 24px;
    padding: 18px;
    background: #f1f5f9;
    border-radius: 18px;
    color: #475569;
    line-height: 1.6;
}

.info h2 {
    margin-top: 0;
    color: #0f172a;
}

@media (max-width: 720px) {
    .card {
        padding: 22px;
        border-radius: 18px;
    }

    .header,
    .actions,
    .result-head {
        flex-direction: column;
        align-items: stretch;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

.hint {
    margin: 12px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}
