:root {
    --bg-900: #070d1b;
    --bg-800: #0f1830;
    --line: rgba(139, 227, 204, 0.3);
    --text-main: #dbe7ff;
    --text-muted: #9eb0d5;
    --primary: #67e9c5;
    --primary-2: #8af7dd;
    --danger: #ff8ca4;
    --radius: 18px;
    --shadow: 0 26px 40px rgba(5, 10, 23, 0.46);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    font-family: 'Space Grotesk', sans-serif;
    background:
        radial-gradient(900px 500px at 12% -6%, rgba(103, 233, 197, 0.2), transparent 58%),
        radial-gradient(900px 600px at 100% 0%, rgba(94, 129, 255, 0.2), transparent 58%),
        linear-gradient(160deg, var(--bg-800), var(--bg-900));
    padding: clamp(14px, 3vw, 32px);
    position: relative;
    overflow-x: hidden;
}

.bg-shape {
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(78px);
    pointer-events: none;
}

.bg-shape-a {
    top: -160px;
    left: -140px;
    width: 380px;
    height: 380px;
    background: rgba(103, 233, 197, 0.22);
}

.bg-shape-b {
    top: 22%;
    right: -140px;
    width: 380px;
    height: 380px;
    background: rgba(94, 129, 255, 0.24);
}

.public-nav {
    width: min(1120px, 100%);
    margin: 0 auto 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(20px, 3vw, 30px);
    letter-spacing: 0.08em;
    color: #f3f8ff;
}

.nav-actions {
    display: flex;
    gap: 10px;
}

.hero-wrap,
.auth-wrap {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.hero-card,
.auth-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(164deg, rgba(20, 32, 64, 0.9), rgba(10, 16, 33, 0.92));
    box-shadow: var(--shadow);
}

.hero-card {
    padding: clamp(24px, 5vw, 48px);
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.conversion-strip {
    margin: 10px 0 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #c7f9ea;
    font-size: 12px;
}

.conversion-strip .dot {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #6ff2cf;
}

.hero-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: 1.45fr 0.95fr;
    align-items: start;
}

h1 {
    margin: 0 0 14px;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.12;
    color: #eff6ff;
}

.subtitle {
    color: var(--text-muted);
    max-width: 780px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.micro-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.proof-pill {
    border: 1px solid rgba(139, 227, 204, 0.3);
    background: rgba(103, 233, 197, 0.08);
    color: #d8fff3;
    border-radius: 999px;
    font-size: 12px;
    padding: 6px 10px;
}

.hero-side-card {
    border: 1px solid rgba(139, 227, 204, 0.24);
    background: rgba(6, 12, 30, 0.62);
    border-radius: 14px;
    padding: 14px;
}

.hero-side-card h3 {
    margin: 0 0 10px;
    color: #f0f7ff;
}

.hero-side-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    line-height: 1.55;
}

.hero-side-metrics {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.hero-side-metrics div {
    border: 1px solid rgba(139, 227, 204, 0.2);
    background: rgba(7, 12, 28, 0.45);
    border-radius: 10px;
    padding: 8px;
}

.hero-side-metrics span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
}

.hero-side-metrics strong {
    display: block;
    color: #ebf5ff;
    margin-top: 3px;
}

.feature-grid {
    margin-top: 18px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-grid article {
    border: 1px solid rgba(139, 227, 204, 0.2);
    background: rgba(7, 12, 28, 0.45);
    border-radius: 12px;
    padding: 14px;
}

.feature-grid h3 {
    margin: 0 0 6px;
    color: #f0f7ff;
}

.feature-grid p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.auth-wrap {
    display: flex;
    justify-content: center;
}

.auth-card {
    width: min(460px, 100%);
    padding: 24px;
}

.auth-back {
    display: inline-block;
    margin-bottom: 12px;
    color: #9cc7ff;
    text-decoration: none;
}

.auth-card h1 {
    font-size: clamp(24px, 3vw, 34px);
    margin-bottom: 8px;
}

.auth-form {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.auth-form label {
    font-size: 13px;
    color: var(--text-muted);
}

input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(139, 227, 204, 0.26);
    background: rgba(8, 14, 30, 0.84);
    color: var(--text-main);
    font: inherit;
    padding: 10px 12px;
    margin-bottom: 4px;
}

input:focus,
button:focus-visible,
a:focus-visible {
    outline: none;
    border-color: rgba(139, 227, 204, 0.64);
    box-shadow: 0 0 0 3px rgba(103, 233, 197, 0.24);
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    padding: 10px 16px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 14px;
    min-height: 40px;
}

.btn-solid {
    background: linear-gradient(120deg, var(--primary), var(--primary-2));
    color: #032015;
    font-weight: 700;
}

.btn-ghost {
    border-color: rgba(139, 227, 204, 0.34);
    background: rgba(103, 233, 197, 0.1);
    color: #d8fff3;
}

.alert {
    margin: 8px 0 4px;
    color: #ffd0db;
    border: 1px solid rgba(255, 140, 164, 0.4);
    background: rgba(255, 140, 164, 0.14);
    border-radius: 10px;
    padding: 10px;
}

.switch {
    margin-top: 12px;
    color: var(--text-muted);
}

.switch a {
    color: #92f6de;
}

@media (max-width: 980px) {
    .hero-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    body {
        padding: 12px;
    }

    .public-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nav-actions,
    .hero-actions {
        width: 100%;
    }

    .nav-actions .btn,
    .hero-actions .btn {
        flex: 1;
    }

    .hero-side-metrics {
        grid-template-columns: 1fr;
    }

    .conversion-strip {
        gap: 6px;
    }
}

.social-auth {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.social-divider {
    color: var(--text-muted);
    font-size: 13px;
}

.btn-social {
    border: 1px solid rgba(139, 227, 204, 0.34);
    background: rgba(103, 233, 197, 0.08);
    color: #d8fff3;
    width: 100%;
}

.social-icon-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.telegram-auth-proxy {
    position: relative;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
}

.btn-social-icon {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(154, 176, 213, 0.28);
    background: linear-gradient(180deg, rgba(40, 46, 67, 0.92), rgba(28, 34, 52, 0.96));
    color: #f4f7ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-social-icon:hover {
    border-color: rgba(139, 227, 204, 0.42);
    transform: translateY(-1px);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    line-height: 1;
}

.social-icon-google {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.04em;
}

.social-icon-telegram svg {
    width: 18px;
    height: 18px;
    display: block;
}

.telegram-widget-wrap {
    display: flex;
    justify-content: center;
}

.telegram-auth-proxy-visual {
    width: 46px;
    height: 46px;
    pointer-events: none;
}

.telegram-widget-wrap-proxy {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    opacity: 0.02;
    z-index: 2;
}

.telegram-widget-wrap-proxy iframe,
.telegram-widget-wrap-proxy > span,
.telegram-widget-wrap-proxy > div {
    position: absolute !important;
    inset: 0 auto auto 0;
    min-width: 180px;
    height: 46px !important;
}

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-social-icon.btn-disabled {
    transform: none;
}

.social-hint {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

/* Compact auth layout: desktop + mobile space efficient */
.auth-wrap {
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-block: clamp(10px, 2.2vw, 22px);
}

.auth-card {
    width: min(400px, 100%);
    padding: 18px;
    border-radius: 14px;
}

.auth-card h1 {
    font-size: clamp(22px, 2.2vw, 32px);
    margin-bottom: 6px;
}

.auth-card .subtitle {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.auth-back {
    margin-bottom: 8px;
    font-size: 14px;
}

.auth-form {
    gap: 6px;
    margin-top: 8px;
}

.auth-form label {
    font-size: 12px;
}

.auth-form input {
    padding: 9px 11px;
    margin-bottom: 2px;
}

.auth-card .btn {
    min-height: 36px;
    font-size: 13px;
}

.social-auth {
    margin-top: 8px;
    gap: 7px;
}

.social-divider,
.social-hint,
.switch {
    font-size: 12px;
}

@media (min-width: 1200px) {
    .auth-card {
        width: min(390px, 100%);
    }
}

@media (max-width: 680px) {
    body {
        padding: 8px;
    }

    .auth-wrap {
        min-height: auto;
        align-items: flex-start;
        padding-block: 8px 12px;
    }

    .auth-card {
        width: min(360px, 95vw);
        padding: 14px;
        border-radius: 12px;
    }

    .auth-card h1 {
        font-size: clamp(20px, 7vw, 28px);
        margin-bottom: 4px;
    }

    .auth-card .subtitle {
        font-size: 13px;
        line-height: 1.35;
        margin-bottom: 8px;
    }

    .auth-form {
        gap: 5px;
        margin-top: 6px;
    }

    .auth-form label {
        font-size: 11.5px;
    }

    .auth-form input {
        padding: 8px 10px;
        margin-bottom: 1px;
    }

    .auth-card .btn {
        min-height: 35px;
        font-size: 12.5px;
    }

    .social-auth {
        margin-top: 7px;
        gap: 6px;
    }

    .switch {
        margin-top: 7px;
        margin-bottom: 0;
    }
}

/* Register simple style */
.register-simple {
    width: min(430px, 100%);
}

.register-simple .auth-form {
    gap: 7px;
}

.invite-box {
    margin: 4px 0 2px;
    border: 1px solid rgba(139, 227, 204, 0.22);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(8, 14, 30, 0.42);
}

.invite-box summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 12px;
    list-style: none;
}

.invite-box summary::-webkit-details-marker {
    display: none;
}

.invite-box[open] summary {
    margin-bottom: 8px;
}

.checkbox-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #d1deff;
    font-size: 13px;
}

.checkbox-line input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: #2be68f;
}

.username-feedback {
    min-height: 18px;
    margin-top: -2px;
    margin-bottom: 2px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--text-muted);
}

.username-feedback.error {
    color: #ff6d6d;
}

.username-feedback.ok {
    color: #62efc5;
}

.auth-form input.is-taken {
    border-color: rgba(255, 109, 109, 0.9);
    box-shadow: 0 0 0 2px rgba(255, 109, 109, 0.18);
}

.auth-form input.is-available {
    border-color: rgba(103, 233, 197, 0.72);
}

.password-field-wrap {
    position: relative;
}

.password-field-wrap input {
    padding-right: 48px;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #8fd7ff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.password-toggle-btn:hover {
    color: #c7f6e7;
}

.suggestion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.suggestion-item {
    border: 1px solid rgba(255, 109, 109, 0.55);
    background: rgba(255, 109, 109, 0.12);
    color: #ffd0d0;
    border-radius: 999px;
    font-size: 11px;
    padding: 3px 8px;
    cursor: pointer;
}

@media (max-width: 680px) {
    .register-simple {
        width: min(370px, 96vw);
    }

    .checkbox-line {
        font-size: 12px;
    }
}

.cookie-consent-shell {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1200;
}

.cookie-settings-shell {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1201;
}

.cookie-consent-card {
    width: min(344px, calc(100vw - 32px));
    border-radius: 22px;
    background: rgba(20, 22, 28, 0.96);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    padding: 24px 16px 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.cookie-consent-copy {
    margin: 0;
    color: #f1f5fb;
    font-size: 15px;
    line-height: 1.55;
}

.cookie-link-btn,
.cookie-btn-link {
    border: 0;
    background: transparent;
    color: #22d8ff;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.cookie-consent-actions {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.cookie-btn {
    min-height: 52px;
    border-radius: 16px;
    font: 700 15px/1.1 'Space Grotesk', sans-serif;
    cursor: pointer;
    border: 0;
}

.cookie-btn-solid,
.cookie-btn-soft {
    background: #ffffff;
    color: #1b1e24;
}

.cookie-settings-panel {
    display: grid;
    gap: 12px;
}

.cookie-setting-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    color: #edf3ff;
}

.cookie-setting-row strong,
.cookie-setting-row small {
    display: block;
}

.cookie-setting-row small {
    margin-top: 4px;
    color: #aab3c3;
    line-height: 1.45;
}

@media (max-width: 680px) {
    .cookie-consent-shell {
        right: 12px;
        left: 12px;
        bottom: 12px;
    }

    .cookie-settings-shell {
        right: 12px;
        left: 12px;
        bottom: 12px;
    }

    .cookie-consent-card {
        width: 100%;
    }
}
