
:root {
    color-scheme: dark;
    --bg: #0b0712;
    --panel: rgba(19, 13, 29, 0.94);
    --panel-light: #211632;
    --purple: #a855f7;
    --purple-light: #d8a5ff;
    --text: #f4edff;
    --muted: #a79ab9;
    --border: rgba(190, 126, 255, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 15% 35%, rgba(102, 35, 159, 0.19), transparent 40%),
        radial-gradient(ellipse at 85% 65%, rgba(73, 29, 124, 0.17), transparent 42%),
        var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app {
    width: min(1160px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.topbar {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-family: Georgia, serif;
    font-size: 27px;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.brand-mark {
    color: var(--purple-light);
    font-size: 31px;
    text-shadow: 0 0 18px var(--purple);
}

.topbar-caption,
.eyebrow {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 2.5px;
}

.main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 420px;
    align-items: center;
    gap: 72px;
    padding: 64px 0;
}

.welcome h1 {
    max-width: 500px;
    margin: 18px 0;
    font-family: Georgia, serif;
    font-size: clamp(38px, 5vw, 62px);
    font-weight: 500;
    line-height: 1.1;
}

.welcome h1 span {
    color: var(--purple-light);
    text-shadow: 0 0 28px rgba(168, 85, 247, 0.35);
}

.welcome > p {
    max-width: 470px;
    color: var(--muted);
    line-height: 1.8;
}

.feature-list {
    display: grid;
    gap: 19px;
    margin-top: 38px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #d6c8e8;
    font-size: 14px;
}

.feature-icon {
    color: var(--purple-light);
    font-size: 21px;
}

.auth-card {
    position: relative;
    padding: 36px;
    border: 1px solid rgba(196, 140, 255, 0.5);
    border-radius: 4px;
    background:
        linear-gradient(145deg, rgba(42, 25, 61, 0.25), transparent 45%),
        var(--panel);
    box-shadow:
        0 0 0 5px rgba(155, 85, 220, 0.035),
        0 0 45px rgba(125, 48, 190, 0.13),
        inset 0 0 35px rgba(111, 47, 156, 0.06);
}

.auth-card::before,
.auth-card::after {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--purple-light);
    border-style: solid;
    content: "";
    pointer-events: none;
}

.auth-card::before {
    top: 8px;
    left: 8px;
    border-width: 1px 0 0 1px;
}

.auth-card::after {
    right: 8px;
    bottom: 8px;
    border-width: 0 1px 1px 0;
}

.card-emblem {
    margin-bottom: 12px;
    color: var(--purple-light);
    text-align: center;
    font-size: 32px;
    text-shadow: 0 0 18px var(--purple);
}

.card-heading {
    text-align: center;
}

.card-heading h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 27px;
    font-weight: 500;
}

.card-heading p,
.card-footer {
    color: var(--muted);
    font-size: 13px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 28px 0;
    padding: 4px;
    border: 1px solid var(--border);
    background: #0e0a17;
}

.auth-tab {
    padding: 11px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--muted);
}

.auth-tab.active {
    background: linear-gradient(110deg, #542580, #39204f);
    color: white;
    box-shadow: inset 0 0 0 1px rgba(204, 157, 255, 0.2);
}

.auth-card label {
    display: block;
    margin: 16px 0 8px;
    color: #d9cce9;
    font-size: 13px;
}

.auth-card input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #382a49;
    border-radius: 4px;
    outline: none;
    background: #100c19;
    color: var(--text);
    transition: border-color 160ms, box-shadow 160ms;
}

.auth-card input::placeholder {
    color: #766985;
}

.auth-card input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}

.primary-button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 14px 17px;
    border: 1px solid #bd83ff;
    border-radius: 4px;
    background: linear-gradient(110deg, #7434b6, #51217f);
    color: white;
    box-shadow: 0 0 22px rgba(134, 52, 202, 0.18);
    transition: filter 160ms, box-shadow 160ms;
}

.primary-button:hover {
    filter: brightness(1.18);
    box-shadow: 0 0 28px rgba(168, 85, 247, 0.3);
}

.auth-message {
    min-height: 0;
    margin: 10px 0 0;
    color: #ffaaaa;
    font-size: 13px;
}

.card-footer {
    margin: 24px 0 0;
    text-align: center;
}

.text-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--purple-light);
}

.text-button:hover {
    text-decoration: underline;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 0;
    border-top: 1px solid var(--border);
    color: #796b8a;
    font-size: 11px;
}

@media (max-width: 800px) {
    .main {
        grid-template-columns: 1fr;
        gap: 38px;
        padding: 42px 0;
    }

    .welcome {
        text-align: center;
    }

    .welcome h1,
    .welcome > p {
        margin-right: auto;
        margin-left: auto;
    }

    .feature-list {
        width: fit-content;
        margin-right: auto;
        margin-left: auto;
        text-align: left;
    }

    .auth-card {
        width: min(100%, 460px);
        margin: 0 auto;
        padding: 28px 24px;
    }
}

@media (max-width: 480px) {
    .app {
        width: calc(100% - 28px);
    }

    .brand {
        font-size: 23px;
    }

    .topbar-caption {
        max-width: 100px;
        font-size: 9px;
        text-align: right;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
