:root {
    --bg: #090b10;
    --surface: rgba(18, 22, 31, 0.72);
    --surface-hover: rgba(255, 255, 255, 0.055);

    --border: rgba(255, 255, 255, 0.09);
    --border-hover: rgba(255, 255, 255, 0.18);

    --text: #f2f5f9;
    --text-secondary: #98a2b3;
    --text-muted: #687386;

    --accent: #3b82f6;
    --accent-bright: #60a5fa;

    --danger-bg: rgba(239, 68, 68, 0.10);
    --danger-border: rgba(239, 68, 68, 0.22);
    --danger-text: #fca5a5;
}

* {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 50% -20%,
            rgba(59, 130, 246, 0.13),
            transparent 45%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    overflow-x: hidden;
}

.auth-background {
    position: fixed;
    inset: 0;

    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;

    width: 600px;
    height: 600px;

    border-radius: 50%;

    filter: blur(100px);

    opacity: 0.16;
}

.glow-1 {
    top: -280px;
    left: -220px;

    background: #2563eb;
}

.glow-2 {
    right: -260px;
    bottom: -320px;

    background: #7c3aed;
}

.auth-page {
    position: relative;

    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 440px;

    position: relative;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.025)
        );

    border: 1px solid var(--border);

    border-radius: 22px;

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    overflow: hidden;
}

.auth-brand {
    display: flex;
    align-items: center;

    gap: 14px;

    padding: 24px 28px;

    border-bottom: 1px solid var(--border);

    background: rgba(255, 255, 255, 0.018);
}

.brand-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            #2563eb
        );

    color: white;

    font-weight: 800;
    font-size: 20px;

    box-shadow:
        0 8px 24px rgba(37, 99, 235, 0.28);
}

.brand-title {
    font-size: 15px;
    font-weight: 700;

    letter-spacing: 0.01em;
}

.brand-subtitle {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 12px;
}

.auth-content {
    padding: 30px 28px 28px;
}

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

.auth-heading h1 {
    margin: 0 0 8px;

    font-size: 25px;
    font-weight: 700;

    letter-spacing: -0.02em;
}

.auth-heading p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 13px;
}

.auth-form {
    display: flex;
    flex-direction: column;

    gap: 9px;
}

.field-label {
    margin-top: 6px;

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 600;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;

    left: 13px;
    top: 50%;

    transform: translateY(-50%);

    width: 20px;

    text-align: center;

    opacity: 0.55;

    font-size: 14px;

    pointer-events: none;
}

input {
    width: 100%;
    height: 46px;

    padding: 0 14px;

    border: 1px solid var(--border);

    border-radius: 11px;

    outline: none;

    background: rgba(0, 0, 0, 0.18);

    color: var(--text);

    font-size: 14px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

input::placeholder {
    color: #596274;
}

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

input:focus {
    border-color: rgba(96, 165, 250, 0.65);

    background: rgba(0, 0, 0, 0.28);

    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.10);
}

.auth-button,
.register-button {
    width: 100%;
    min-height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    border-radius: 11px;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.auth-button {
    margin-top: 16px;

    border: 0;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );

    color: white;

    box-shadow:
        0 10px 28px rgba(37, 99, 235, 0.22);
}

.auth-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 14px 34px rgba(37, 99, 235, 0.32);
}

.auth-button:active {
    transform: translateY(0);
}

.button-arrow {
    font-size: 18px;
    line-height: 1;

    transition: transform 0.18s ease;
}

.auth-button:hover .button-arrow {
    transform: translateX(3px);
}

.auth-divider {
    display: flex;
    align-items: center;

    gap: 12px;

    margin: 22px 0 16px;
}

.auth-divider span {
    height: 1px;

    flex: 1;

    background: var(--border);
}

.auth-divider small {
    color: var(--text-muted);

    font-size: 11px;
}

.register-button {
    min-height: 43px;

    border: 1px solid var(--border);

    background: rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);
}

.register-button:hover {
    border-color: rgba(96, 165, 250, 0.42);

    background: rgba(59, 130, 246, 0.07);

    color: var(--text);
}

.auth-error {
    display: flex;
    align-items: flex-start;

    gap: 9px;

    margin-bottom: 20px;
    padding: 11px 13px;

    border: 1px solid var(--danger-border);

    border-radius: 10px;

    background: var(--danger-bg);

    color: var(--danger-text);

    font-size: 12px;
    line-height: 1.45;
}

.auth-footer {
    padding: 16px 28px;

    border-top: 1px solid var(--border);

    text-align: center;

    color: var(--text-muted);

    font-size: 11px;

    letter-spacing: 0.04em;

    background: rgba(0, 0, 0, 0.08);
}

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

    .auth-card {
        border-radius: 18px;
    }

    .auth-brand {
        padding: 20px;
    }

    .auth-content {
        padding: 25px 20px;
    }

    .auth-footer {
        padding: 14px 20px;
    }
}
