/* ============================================
   AUTHENTICATION PAGES (Login/Signup)
   Modularized styles for auth pages
   ============================================ */

/* ============================================
   AUTH SECTION
   ============================================ */

.login-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: calc(80px + 2rem) 0 4rem;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Animated gradient mesh background */
.login-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-mesh);
    animation: gradient-shift 15s ease infinite;
    opacity: 0.6;
    z-index: 0;
}

.login-section .container {
    position: relative;
    z-index: 1;
}

/* ============================================
   LOGIN/SIGNUP CARD
   ============================================ */

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Removed annoying floating animation */
}

html.dark body .login-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.auth-logo {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 1.4rem;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.12));
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.4);
    isolation: isolate;
    overflow: hidden;
    padding: 0.85rem;
    opacity: 0;
    animation: logoReveal 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}

html.dark body .auth-logo {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.18));
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

.auth-logo-glow {
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.65), transparent 55%),
        radial-gradient(circle at 78% 72%, rgba(99, 102, 241, 0.3), transparent 52%);
    filter: blur(18px);
    opacity: 0.6;
    transform: scale(0.9);
    animation: logoGlow 2.4s ease-in-out infinite alternate;
}

.auth-logo-img {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    padding: 0;
    border: none;
    object-fit: contain;
    box-shadow: none;
    position: relative;
    z-index: 1;
    filter: none;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    letter-spacing: -0.025em;
    margin-top: 0.25rem;
}

.auth-subtitle {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

@keyframes logoReveal {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logoGlow {
    from {
        opacity: 0.45;
        transform: scale(0.95);
    }
    to {
        opacity: 0.75;
        transform: scale(1.02);
    }
}

@media (max-width: 576px) {
    .auth-logo {
        width: 88px;
        height: 88px;
        border-radius: 1.2rem;
    }
}

.login-logo {
    width: 96px;
    height: 96px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo img,
.login-logo .brand-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Welcome Back Mascot Image */
.login-welcome-image {
    width: 180px;
    height: 180px;
    margin: 0 auto -20px auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.login-welcome-image .welcome-mascot {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-card {
}

/* ============================================
   OAUTH BUTTONS
   ============================================ */

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--neutral-200);
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-oauth::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-oauth:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-indigo);
}

.btn-oauth:hover::before {
    opacity: 1;
}

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

html.dark body .btn-oauth {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--neutral-700);
}

html.dark body .btn-oauth:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-purple);
}

.btn-google:hover {
    border-color: #4285F4;
}

.btn-apple {
    background: #000;
    color: #fff;
    border-color: #000;
}

.btn-apple:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

html.dark body .btn-apple {
    background: #fff;
    color: #000;
    border-color: #fff;
}

html.dark body .btn-apple:hover {
    background: #e5e5e5;
    border-color: #e5e5e5;
}

/* ============================================
   FORM DIVIDER
   ============================================ */

.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--neutral-200);
}

html.dark body .divider::before {
    background: var(--neutral-700);
}

.divider span {
    position: relative;
    background: var(--bg-primary);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

html.dark body .divider span {
    background: rgba(255, 255, 255, 0.03);
}

/* ============================================
   AUTH FORM STYLES
   ============================================ */

.login-form .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-indigo);
}

.link-primary {
    color: var(--primary-indigo);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.875rem;
}

.link-primary:hover {
    color: var(--primary-purple);
    text-decoration: underline;
}

html.dark body .link-primary {
    color: var(--primary-purple);
}

html.dark body .link-primary:hover {
    color: var(--primary-pink);
}

/* ============================================
   ALERT MESSAGES
   ============================================ */

.alert {
    padding: 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

html.dark body .alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

/* ============================================
   RESPONSIVE AUTH PAGES
   ============================================ */

@media (max-width: 768px) {
    .login-section {
        padding: calc(80px + 1rem) 0 2rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-logo {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}
