@font-face {
    font-family: 'Satoshi';
    src: url('../fonts/satoshi/Satoshi-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Satoshi';
    src: url('../fonts/satoshi/Satoshi-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Satoshi';
    src: url('../fonts/satoshi/Satoshi-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

:root {
    --white: #ffffff;
    --black: #09090b;
    --ink: #151515;
    --muted: #666a73;
    --line: #dedfe5;
    --yellow: #ffd21f;
    --yellow-hover: #ffc400;
    --yellow-soft: #ffe36d;
    --yellow-muted: #fff8d6;
    --error: #ff2f6d;
    --error-soft: #ffd2df;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: 'Satoshi', Arial, sans-serif;
}

.topbar {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(255, 210, 31, .18);
    box-shadow: 0 10px 32px rgba(9, 9, 11, .1);
    backdrop-filter: blur(12px);
}

input,
button,
select,
textarea {
    font-family: 'Satoshi', Arial, sans-serif;
}

.container {
    width: min(100%, 1100px);
    min-height: calc(100vh - 90px);
    margin: 0 auto;
    padding: 38px 22px 68px;
    text-align: center;
}

h1 {
    max-width: 1040px;
    margin: 0 auto 12px;
    color: var(--white);
    font-size: 48px;
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: 0;
    text-wrap: balance;
    text-shadow: 0 8px 34px rgba(0, 0, 0, .44);
}

.headline-yellow {
    color: var(--white);
}

.headline-muted {
    color: var(--yellow);
}

.subtitle {
    margin: 0 auto 24px;
    color: rgba(255, 255, 255, .82);
    font-size: 21px;
    font-weight: 500;
    line-height: 1.34;
    text-shadow: 0 8px 24px rgba(0, 0, 0, .36);
}

.card {
    max-width: 570px;
    margin: 0 auto;
    padding: 22px;
    color: var(--ink);
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .32), 0 2px 14px rgba(255, 210, 31, .16);
    backdrop-filter: blur(18px);
}

form {
    display: grid;
    gap: 12px;
}

.field-wrap {
    position: relative;
    width: 100%;
    margin: 0;
}

.main-input {
    width: 100%;
    height: 60px;
    padding: 0 18px;
    text-align: center;
    color: var(--black);
    background: var(--white);
    border: 2px solid var(--line);
    border-radius: 8px;
    outline: 0 solid transparent;
    caret-color: var(--black);
    box-shadow: none;
    transition: border-color .16s ease, outline-color .16s ease, outline-width .16s ease;
}

.main-input:hover {
    border-color: var(--black);
}

.main-input:focus {
    border-color: var(--black);
    background: var(--white);
    outline: 4px solid var(--yellow-soft);
}

.field-wrap.empty.touched .main-input,
.main-input.error {
    border-color: var(--error-soft);
    background: var(--white);
    outline: 4px solid var(--error-soft);
}

.field-wrap:has(.main-input.error)::after,
.checkbox-row.error::after {
    position: absolute;
    top: -10px;
    right: 12px;
    padding: 4px 9px;
    color: var(--white);
    background: var(--error);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.field-wrap:has(.main-input.error)::after {
    content: 'Povinné';
}

.checkbox-row.error {
    position: relative;
    border-color: var(--error);
    background: var(--white);
    outline: 4px solid var(--error-soft);
}

.checkbox-row.error::after {
    content: 'Potvrdiť';
}

.name-input,
.type-input {
    font-size: 23px;
    font-weight: 700;
}

.issuer-input {
    height: 54px;
    font-size: 16px;
    font-weight: 500;
}

.fake-placeholder {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #8b8f99;
    text-align: center;
    padding: 0 18px;
}

.field-wrap.empty .fake-placeholder {
    display: flex;
}

.fake-cursor {
    display: none;
}

.name-field .fake-placeholder,
.type-field .fake-placeholder {
    font-size: 22px;
    font-weight: 700;
}

.issuer-field .fake-placeholder {
    font-size: 16px;
    font-weight: 500;
}

.type-input[readonly] {
    cursor: pointer;
    user-select: none;
    background: var(--white);
}

.mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.mode-btn {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    color: var(--black);
    background: rgba(255, 248, 214, .96);
    border: 1px solid rgba(255, 210, 31, .58);
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(9, 9, 11, .14), inset 0 1px 0 rgba(255, 255, 255, .72);
    transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.mode-icon {
    margin-right: 6px;
    font-size: 15px;
    line-height: 1;
}

.mode-btn:hover {
    background: #ffd21f;
    box-shadow: 0 14px 32px rgba(9, 9, 11, .18), inset 0 1px 0 rgba(255, 255, 255, .68);
    transform: translateY(-1px);
}

.mode-btn.active {
    color: var(--black);
    background: linear-gradient(180deg, #ffe36d 0%, #ffd21f 100%);
    border-color: rgba(255, 210, 31, .72);
}

.mode-btn.active:hover {
    background: linear-gradient(180deg, #ffdf54 0%, #ffc400 100%);
}

.mode-btn:active {
    transform: translateY(0);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 0;
    margin: 0;
    padding: 8px 14px;
    color: var(--muted);
    text-align: left;
    font-size: 14px;
    line-height: 1.42;
    background: var(--white);
    border: 0;
    border-radius: 8px;
    outline: 0 solid transparent;
    transition: outline-color .16s ease, outline-width .16s ease;
}


.checkbox-row input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--yellow);
}

.checkbox-row label {
    cursor: pointer;
}

.checkbox-row label + .rules-toggle {
    margin-left: -6px;
}

.rules-toggle {
    appearance: none;
    padding: 0;
    color: var(--black);
    background: transparent;
    border: 0;
    font-size: inherit;
    font-weight: 700;
    line-height: inherit;
    text-decoration: underline;
    text-decoration-color: var(--yellow);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    cursor: pointer;
}

.rules-toggle::after {
    content: ' ▾';
    font-size: 12px;
    text-decoration: none;
}

.rules-toggle[aria-expanded="true"]::after {
    content: ' ▴';
}

.rules-panel {
    max-height: 94px;
    margin-top: 8px;
    padding: 12px 14px;
    overflow-y: auto;
    color: var(--muted);
    text-align: left;
    background: rgba(255, 248, 214, .96);
    border: 1px solid rgba(255, 210, 31, .58);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    font-size: 13px;
    line-height: 1.45;
    scrollbar-color: var(--yellow) rgba(255, 210, 31, .18);
    scrollbar-width: thin;
}

.rules-panel p {
    margin: 0;
}

.rules-panel p + p {
    margin-top: 7px;
}

.generate-btn {
    width: 100%;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    color: var(--black);
    background: linear-gradient(180deg, #ffe36d 0%, #ffd21f 100%);
    border: 1px solid rgba(255, 210, 31, .72);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(9, 9, 11, .18), inset 0 1px 0 rgba(255, 255, 255, .72);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.generate-btn:hover {
    background: linear-gradient(180deg, #ffdf54 0%, #ffc400 100%);
    box-shadow: 0 14px 32px rgba(9, 9, 11, .22), inset 0 1px 0 rgba(255, 255, 255, .68);
    transform: translateY(-1px);
}

.generate-btn:active {
    transform: translateY(0);
}

.small {
    margin-top: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.contact-container {
    padding-top: 58px;
}

.contact-card {
    max-width: 620px;
}

.contact-input {
    height: 58px;
    font-size: 18px;
    font-weight: 600;
}

.contact-message-wrap .fake-placeholder {
    align-items: flex-start;
    padding-top: 18px;
}

.contact-card .field-wrap:focus-within .fake-placeholder,
.contact-card .field-wrap:has(.main-input:not(:placeholder-shown)) .fake-placeholder {
    display: none;
}

.contact-textarea {
    min-height: 116px;
    height: auto;
    padding: 18px;
    resize: vertical;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.45;
}

.contact-alert {
    margin-bottom: 14px;
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.contact-alert.success {
    color: #244100;
    background: rgba(229, 255, 190, .9);
    border: 1px solid rgba(132, 204, 22, .46);
}

.contact-alert.error {
    color: #7a1232;
    background: rgba(255, 210, 223, .92);
    border: 1px solid rgba(255, 47, 109, .36);
}

@media (max-width: 700px) {
    .container {
        min-height: calc(100vh - 90px);
        padding: 34px 14px 52px;
    }

    h1 {
        font-size: 34px;
        line-height: 1.1;
    }

    .subtitle {
        margin-bottom: 20px;
        font-size: 19px;
    }

    .card {
        padding: 20px 14px;
    }

    .name-input,
    .type-input,
    .name-field .fake-placeholder,
    .type-field .fake-placeholder {
        font-size: 19px;
    }

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

@media (max-width: 420px) {
    h1 {
        font-size: 30px;
    }

    .main-input {
        height: 56px;
        padding: 0 12px;
    }

    .name-input,
    .type-input,
    .name-field .fake-placeholder,
    .type-field .fake-placeholder {
        font-size: 17px;
    }
}
