@keyframes overlayIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlayOut { from { opacity: 1; } to { opacity: 0; } }

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.88) translateY(16px); filter: blur(6px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    filter: blur(0px); }
}

@keyframes modalOut {
    from { opacity: 1; transform: scale(1)    translateY(0);    filter: blur(0px); }
    to   { opacity: 0; transform: scale(0.88) translateY(16px); filter: blur(6px); }
}

.login-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 8, 20, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-overlay.active {
    display: flex;
}

.login-overlay.anim-in  { animation: overlayIn  0.32s ease forwards; }
.login-overlay.anim-out { animation: overlayOut 0.28s ease forwards; }

.login-modal {
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    overflow: hidden;
    background: var(--color-bg-card);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(80,120,220,0.08);
    position: relative;
}

.login-modal.anim-in  { animation: modalIn  0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.login-modal.anim-out { animation: modalOut 0.26s cubic-bezier(0.4,  0,    0.2, 1)   forwards; }

.login-modal-header {
    background: #1a2238;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
}

.login-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-logo {
    height: 26px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
}

.login-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-white);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.login-close {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.login-close:hover {
    background: rgba(200,60,60,0.2);
    border-color: rgba(200,60,60,0.4);
    color: #ff6b6b;
}

.login-form {
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    margin-top: 4px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2a50b8 100%);
    border: 1px solid rgba(80, 130, 220, 0.35);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-main);
    transition: filter 0.2s, transform 0.15s;
}

.login-submit-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.login-submit-btn:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.login-register-hint {
    text-align: center;
    font-size: 12.5px;
    color: var(--color-text-muted);
    margin-top: -4px;
}

.login-register-hint a {
    color: var(--color-text-light);
    font-weight: 600;
    transition: color 0.2s;
}

.login-register-hint a:hover {
    color: #fff;
}
