* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #f3f4f7 100%);
    color: #1f2933;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    flex: 1 0 auto;
}

.hero {
    margin-bottom: 2rem;
    text-align: center;
}

.hero h1 {
    margin: 0 0 0.5rem 0;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    letter-spacing: -0.02em;
}

.hero p {
    margin: 0;
    color: #4a5568;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.hero-tagline {
    margin: 0;
    color: #4a5568;
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.hero-subtext {
    margin: 0.65rem 0 0 0;
    color: #1f2933;
    font-weight: 500;
}

.form {
    background: #ffffff;
    border-radius: 14px;
    padding: clamp(1.25rem, 4vw, 1.75rem);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.field,
.field-inline {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-inline {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

label {
    font-weight: 600;
    font-size: 0.95rem;
}

textarea,
input,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

textarea {
    resize: vertical;
}

.mode-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mode-option {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: 1px solid #cbd5e0;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    user-select: none;
}

.mode-option input {
    display: none;
}

.mode-option span {
    font-weight: 600;
    font-size: 0.9rem;
}

.mode-option:hover {
    border-color: #6366f1;
}

.mode-option.active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.checkbox {
    display: flex;
    gap: 0.5rem;
    font-weight: 500;
    align-items: center;
}

.checkbox input {
    width: auto;
}

.btn {
    background: #1f2933;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(31, 41, 51, 0.15);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: #1f2933;
    border: 1px solid rgba(31, 41, 51, 0.6);
}

.btn-outline:hover:not(:disabled) {
    background: rgba(31, 41, 51, 0.08);
    box-shadow: none;
}

.btn-outline:active:not(:disabled) {
    background: rgba(31, 41, 51, 0.12);
}

.preview-block {
    margin-top: 1.75rem;
    padding: clamp(1.25rem, 4vw, 1.75rem);
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
}

.preview-image {
    width: 100%;
    display: flex;
    justify-content: center;
}

.preview-image img,
.preview-image svg {
    width: min(280px, 80vw);
    max-width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.download-btn {
    width: 100%;
}

.alert {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.footer {
    text-align: center;
    padding: 2rem 1rem 3rem;
    font-size: 0.85rem;
    color: #6b7280;
}


.consent-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    background: rgba(244, 247, 252, 0.98);
    border: 1px solid rgba(99, 102, 241, 0.22);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.16);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    max-width: min(420px, 92vw);
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    z-index: 1000;
}

.consent-text {
    flex: 1 1 auto;
    color: #1f2933;
    font-size: 0.78rem;
    line-height: 1.35;
}

.consent-text strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.consent-links {
    margin-top: 0.35rem;
}

.consent-links a {
    color: #4c51bf;
    text-decoration: none;
    font-weight: 600;
}

.consent-links a:hover {
    text-decoration: underline;
}

.consent-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
}

.consent-actions .btn,
.consent-actions .btn-outline {
    width: 120px;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .field-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    .download-btn {
        width: 100%;
    }

    .preview-image img,
    .preview-image svg {
        width: min(240px, 70vw);
    }

    .consent-banner {
        flex-direction: column;
        bottom: 0.75rem;
        padding: 0.6rem 0.75rem;
        gap: 0.6rem;
    }

    .consent-actions {
        width: 100%;
    }

    .consent-actions .btn,
    .consent-actions .btn-outline {
        width: 100%;
    }
}

@media (min-width: 601px) {
    .download-btn {
        width: auto;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

footer {
    flex-shrink: 0;
}
