/* src/frontend/static/css/auth.css */

html {
    background: #000;
    height: 100%;
}

body {
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding: 24px; */
}

/* затемнение как у модалки */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 1;
}

/* ===== auth modal ===== */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    height: 85%;
    background: var(--panel);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: authFadeIn 400ms cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
    border-radius: 8px;
}

.password-toggle:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* заголовок */
.auth-header {
    margin-bottom: 24px;
    text-align: center;
}

.auth-header p {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}



/* кнопка */
.btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: transform 120ms, background 120ms, box-shadow 120ms;
}

.btn-primary {
    background: var(--accent);
    color: #111;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* сообщения */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 18px;
}

.alert-error {
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.35);
}

.alert-success {
    background: rgba(214, 255, 63, 0.15);
    color: var(--text);
    border: 1px solid rgba(214, 255, 63, 0.4);
}

/* футер */
.auth-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* спиннер */
.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* адаптив */
@media (max-width: 480px) {
    .auth-container {
        margin: 10px 0;
        padding: 24px 0px;
        border-radius: 10px;
        height: calc(100% - 20px);
    }
}



/* юридический блок */
.auth-legal {
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
}

.auth-legal a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-legal a:hover {
    text-decoration: underline;
}