:root {
    color-scheme: dark;
    --bg-1: #07111d;
    --bg-2: #0d1b2a;
    --card: rgba(12, 20, 35, 0.78);
    --card-border: rgba(160, 190, 230, 0.16);
    --text: #ecf5ff;
    --muted: #9aaec6;
    --field: rgba(255, 255, 255, 0.04);
    --field-border: rgba(160, 190, 230, 0.14);
    --accent: #6be7d8;
    --accent-2: #8fe8ff;
    --danger: #ff8b8b;
    --shadow: 0 32px 90px rgba(0, 0, 0, 0.45);
    --radius: 28px;
    --font: "Segoe UI", "Trebuchet MS", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(circle at 20% 10%, rgba(107, 231, 216, 0.16), transparent 24%),
        radial-gradient(circle at 80% 90%, rgba(143, 232, 255, 0.12), transparent 26%),
        linear-gradient(160deg, var(--bg-1), var(--bg-2) 58%, #08101a);
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(70px);
    opacity: 0.7;
}

body::before {
    width: 340px;
    height: 340px;
    left: -140px;
    top: 12%;
    background: rgba(107, 231, 216, 0.15);
}

body::after {
    width: 260px;
    height: 260px;
    right: -90px;
    bottom: 10%;
    background: rgba(143, 232, 255, 0.1);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(100%, 560px);
    padding: 34px;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    background: linear-gradient(180deg, rgba(12, 20, 35, 0.9), var(--card));
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
}

.auth-heading {
    margin-bottom: 22px;
}

.auth-heading h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.04em;
    line-height: 1;
}

.auth-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.notice {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    line-height: 1.6;
}

.notice ul {
    margin: 0;
    padding-left: 18px;
}

.notice-error {
    color: #ffd6d6;
    background: rgba(255, 139, 139, 0.08);
    border-color: rgba(255, 139, 139, 0.22);
}

.notice-success {
    color: #d4ffea;
    background: rgba(102, 239, 159, 0.08);
    border-color: rgba(102, 239, 159, 0.22);
}

.auth-form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    color: #d5e5f6;
    font-size: 0.95rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--field-border);
    border-radius: 16px;
    background: var(--field);
    color: var(--text);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.field input:focus {
    border-color: rgba(107, 231, 216, 0.45);
    box-shadow: 0 0 0 4px rgba(107, 231, 216, 0.12);
}

.password-row {
    display: grid;
    gap: 10px;
}

.toggle-password {
    justify-self: end;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    cursor: pointer;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d5e5f6;
    user-select: none;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.submit-button {
    margin-top: 4px;
    height: 54px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #03111c;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(107, 231, 216, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.submit-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 24px 46px rgba(107, 231, 216, 0.28);
}

.auth-link {
    display: inline-flex;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.95rem;
}

.auth-link:hover {
    color: var(--accent);
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 640px) {
    .auth-page {
        padding: 16px;
    }

    .auth-card {
        padding: 22px;
        border-radius: 22px;
    }

    .auth-heading {
        margin-bottom: 18px;
    }

    .field input,
    .submit-button {
        height: 50px;
    }
}
