/* =========================================================
   login.css — Styles for the Login / Sign In page
   ========================================================= */

.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 2rem 1rem;
}

.login-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: loginCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.login-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.login-logo span {
    color: var(--accent-color);
}

.login-tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: all 0.25s ease;
    text-decoration: none;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-oauth::after {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-oauth:hover::after {
    opacity: 0.06;
}

.btn-oauth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-oauth:active {
    transform: translateY(0);
}

/* Google button */
.btn-oauth-google {
    background: #fff;
    color: #3c4043;
    border-color: #dadce0;
}

.btn-oauth-google:hover {
    border-color: #bdc1c6;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* GitHub button */
.btn-oauth-github {
    background: #24292e;
    color: #fff;
    border-color: #444d56;
}

.btn-oauth-github:hover {
    background: #2f363d;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.btn-oauth-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.login-footer-text {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

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

/* Light mode overrides */
:root.theme-light .login-card {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

:root.theme-light .btn-oauth-github {
    background: #24292e;
    color: #fff;
}

/* ── Login Alerts ──────────────────────────────────────── */
.login-alert {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    text-align: left;
    line-height: 1.5;
}

.login-alert p {
    margin: 0;
}

.login-alert--error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid #f87171;
    color: #f87171;
}

.login-alert--warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid #fbbf24;
    color: #fbbf24;
}
