:root {
    --bg: #020305;
    --panel: #08131d;
    --panel-soft: #0c1a27;
    --border: rgba(19, 220, 255, 0.16);
    --text: #ffffff;
    --text-soft: #d3e0e8;
    --muted: #8aa3b2;
    --accent: #13dcff;
    --accent-soft: rgba(19, 220, 255, 0.12);
    --danger: #ff8f8f;
    --success: #87d8b1;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);

    --radius: 20px;
    --radius-sm: 14px;

    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 20px;
    --space-5: 28px;
    --space-6: 40px;
    --space-7: 56px;

    --max: 920px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    background:
        radial-gradient(circle at 50% -18%, rgba(46, 203, 255, 0.16), transparent 38%),
        radial-gradient(circle at 82% 18%, rgba(19, 220, 255, 0.08), transparent 22%),
        linear-gradient(180deg, #020305 0%, #05090f 42%, #020305 100%);
    color: var(--text);
}

img {
    max-width: 100%;
    display: block;
}

button,
input {
    font: inherit;
}

.page {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 40px 18px 56px;
    position: relative;
}

.intro,
.form-shell,
.success-state {
    margin-bottom: var(--space-5);
}

.logo-wrap {
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
}

.logo-wrap img {
    width: 220px;
    height: auto;
    filter: drop-shadow(0 0 18px rgba(19, 220, 255, 0.12));
}

.intro h1 {
    margin: 0 0 var(--space-3);
    font-size: clamp(2rem, 7vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    max-width: 10ch;
    text-shadow: 0 0 24px rgba(19, 220, 255, 0.06);
}

.intro-copy {
    margin: 0 0 var(--space-5);
    max-width: 72ch;
    color: var(--text-soft);
    font-size: 1rem;
}

.intro-card,
.form-card,
.state-card {
    background: linear-gradient(180deg, rgba(15, 42, 68, 0.24), rgba(255, 255, 255, 0.02)), rgba(8, 19, 29, 0.94);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
}

.intro-card::before,
.form-card::before,
.state-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(19, 220, 255, 0.08), transparent 38%);
    pointer-events: none;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: linear-gradient(180deg, rgba(19, 220, 255, 0.18), rgba(19, 220, 255, 0.08));
    border-radius: var(--radius);
    overflow: hidden;
}

.info-item {
    background: rgba(2, 6, 10, 0.52);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.info-value {
    font-size: 1rem;
    color: var(--text);
}

.form-card,
.state-card {
    padding: 24px;
}

.form-kicker {
    margin-bottom: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.form-title {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 0 24px rgba(19, 220, 255, 0.06);
}

.form-description,
.footer-note {
    margin: 0;
    color: var(--text-soft);
}

.form-description {
    margin-bottom: 22px;
}

.footer-note {
    margin-top: 14px;
    font-size: 0.92rem;
    color: var(--muted);
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.field label,
.invite-link-email,
.participants-header h3,
.invite-links-header h3 {
    color: #ffffff;
}

.field label {
    font-weight: 600;
}

.field input,
.participant-row input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(19, 220, 255, 0.05), rgba(255, 255, 255, 0.01)), var(--panel-soft);
    color: var(--text);
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.field input:focus,
.participant-row input:focus {
    border-color: rgba(19, 220, 255, 0.42);
    box-shadow:
        0 0 0 3px rgba(19, 220, 255, 0.12),
        0 0 18px rgba(19, 220, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.checkbox-row {
    margin-bottom: 20px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-soft);
    font-size: 0.95rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.participants-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin: 24px 0 14px;
}

.participants-header h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.participants-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.participants-list {
    display: grid;
    gap: 12px;
}

.participant-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.status,
.error {
    display: none;
    margin: 0 0 14px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.status {
    background: rgba(19, 220, 255, 0.1);
    border: 1px solid rgba(19, 220, 255, 0.18);
    color: #c9f7ff;
}

.error {
    background: rgba(255, 143, 143, 0.1);
    border: 1px solid rgba(255, 143, 143, 0.18);
    color: #ffc0c0;
}

.actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

button {
    appearance: none;
    border: none;
    border-radius: 999px;
    min-height: 48px;
    padding: 0 18px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.18s ease;
}

button.primary,
button:not(.ghost) {
    background: var(--accent);
    color: #001018;
    box-shadow: 0 0 20px rgba(19, 220, 255, 0.28);
}

button.primary:hover,
button:not(.ghost):hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

button.ghost {
    background: rgba(19, 220, 255, 0.08);
    color: var(--accent);
    border: 1px solid rgba(19, 220, 255, 0.28);
}

button.ghost:hover {
    background: rgba(19, 220, 255, 0.16);
}

button.small {
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.92rem;
    border-radius: 999px;
}

button.remove-btn {
    min-width: 50px;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 999px;
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 28px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(223, 232, 245, 0.76);
}

.form-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #13dcff;
    flex-shrink: 0;
}

.form-disclaimer {
    margin-top: 60px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(223, 232, 245, 0.54);
    text-align: right;
}

.success-state {
    display: none;
}

.state-mark {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--border);
}

.state-mark.success {
    color: var(--success);
    background: rgba(135, 216, 177, 0.1);
    border-color: rgba(135, 216, 177, 0.22);
}

.state-card h2 {
    margin: 0 0 20px;
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 0 24px rgba(19, 220, 255, 0.06);
}

.state-card p {
    margin: 0;
    color: var(--text-soft);
}

.invite-links-wrap {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.invite-links-header {
    margin-bottom: 16px;
}

.invite-links-header h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.invite-links-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.invite-links-list {
    display: grid;
    gap: 12px;
}

.invite-link-card {
    padding: 0;
    border: none;
    background: transparent;
}

.invite-link-email {
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.invite-link-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.invite-link-url {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(19, 220, 255, 0.22);
    background: linear-gradient(180deg, rgba(19, 220, 255, 0.05), rgba(255, 255, 255, 0.01)), var(--panel-soft);
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.invite-link-url:hover {
    border-color: rgba(19, 220, 255, 0.4);
    box-shadow:
        0 0 18px rgba(19, 220, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.copy-link-btn {
    min-width: 110px;
    width: auto;
}

.site-shell {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 18px;
}

.site-footer {
    padding: 0 0 40px;
}

.site-footer__inner {
    display: grid;
    gap: 20px;
    padding: 24px 0 0;
    border-top: 1px solid rgba(19, 220, 255, 0.12);
}

.site-footer__brand-block {
    display: grid;
    gap: 14px;
}

.site-footer__logo {
    width: 180px;
    height: auto;
}

.site-footer__description {
    margin: 0;
    max-width: 52ch;
    color: var(--muted);
    line-height: 1.55;
}

.site-footer__contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.site-footer__smiley {
    width: 72px;
    height: auto;
    object-fit: contain;
    opacity: 0.95;
}

.site-footer__contact-link {
    color: var(--text-soft);
    text-decoration: none;
}

.site-footer__contact-link:hover {
    color: #ffffff;
}

.intro,
.form-shell,
.success-state,
.site-footer {
    position: relative;
    z-index: 1;
}

@media (min-width: 720px) {
    .page {
        padding: 36px 28px 72px;
    }

    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .actions .ghost {
        margin-right: auto;
    }

    .actions button {
        min-width: 140px;
    }

    .site-footer__inner {
        grid-template-columns: 1fr auto;
        align-items: end;
    }
}

.site-footer__links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}

.site-footer__legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
}

.site-footer__legal-links a {
    font-size: 0.82rem;
    color: rgba(223, 232, 245, 0.62);
    transition: color 0.2s ease;
}

.site-footer__legal-links a:hover {
    color: #f3f7ff;
}

@media (max-width: 720px) {
    .site-footer__links {
        align-items: center;
    }

    .site-footer__legal-links {
        justify-content: center;
    }
}

@media (max-width: 719px) {
    .participants-header {
        flex-direction: column;
        align-items: stretch;
    }

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

    .invite-link-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .copy-link-btn {
        width: 100%;
    }
}

@media (min-width: 980px) {
    .page {
        max-width: 980px;
    }

    .intro-copy {
        font-size: 1.05rem;
        max-width: 80ch;
    }

    .form-card,
    .state-card {
        padding: 28px;
    }
}