:root {
    /* Light mode colors - Updated to white background */
    --bg-color: #ffffff;
    --text-color: #333333;
    --border-color: #dddddd;
    --placeholder-color: #999999;
    --link-color: #333333;
    --card-bg: #ffffff;
    --input-bg: transparent;
    --button-bg: #556ee6;
    --button-text: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Dark mode colors */
[data-bs-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --border-color: #444444;
    --placeholder-color: #888888;
    --link-color: #ffffff;
    --card-bg: #2a2a2a;
    --input-bg: rgba(255, 255, 255, 0.1);
    --button-bg: #556ee6;
    --button-text: #ffffff;
    --shadow-color: rgba(255, 255, 255, 0.1);
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: "Poppins", sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-color);
}

.auth-card {
    background: var(--card-bg);
    border-radius: 0;
    box-shadow: 0 4px 20px var(--shadow-color);
    width: 100%;
    max-width: 400px;
    text-align: center;
    padding: 3rem 2rem;
    border: 1px solid var(--border-color);
}

.auth-logo {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-logo img {
    width: 80px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 2rem 0;
    color: var(--text-color);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-control {
    width: 100%;
    padding: 0.75rem 0;
    border: none;
    border-bottom: 2px solid var(--border-color);
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--text-color);
    box-sizing: border-box;
    outline: none;
    transition: border-bottom-color 0.3s ease;
}

.form-control:focus {
    border-bottom-color: var(--button-bg);
    background: var(--input-bg);
}

.form-control::placeholder {
    color: var(--placeholder-color);
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.social-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: none;
    color: var(--placeholder-color);
    transition: color 0.3s ease;
    font-size: 1.1rem;
}

.social-btn:hover {
    color: var(--button-bg);
    border-color: var(--button-bg);
    transform: translateY(-2px);
}

.forgot-password {
    text-align: center;
    margin: 1.5rem 0;
}

.forgot-password a {
    color: var(--link-color);
    text-decoration: underline;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--button-bg);
}

.btn-auth {
    width: 60px;
    height: 60px;
    background: var(--button-bg);
    border: none;
    border-radius: 50%;
    color: var(--button-text);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-auth:hover {
    background: #4c63d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(85, 110, 230, 0.3);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--placeholder-color);
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--button-bg);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #4c63d2;
    text-decoration: underline;
}

.error-message {
    color: #d32f2f;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    text-align: left;
}

.success-message {
    color: #388e3c;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    text-align: left;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    background-color: var(--border-color);
    color: var(--placeholder-color);
}

.alert-success {
    background-color: #d4edda;
    color: #388e3c;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #d32f2f;
    border: 1px solid #f5c6cb;
}

.auth-description {
    color: var(--placeholder-color);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Theme Switcher */
#theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-color);
}

#theme-switcher:hover {
    background: var(--button-bg);
    color: var(--button-text);
    border-color: var(--button-bg);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
        box-shadow: 0 2px 10px var(--shadow-color);
    }

    .auth-logo img, .auth-logo svg {
        width: 60px;
        max-height: 60px;
    }

    .auth-title {
        font-size: 1.25rem;
    }

    #theme-switcher {
        width: 45px;
        height: 45px;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .auth-page-wrapper {
        padding: 15px;
    }

    .auth-card {
        padding: 1.5rem 1rem;
    }

    .social-login {
        gap: 0.75rem;
    }

    .social-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .btn-auth {
        width: 55px;
        height: 55px;
        font-size: 1.1rem;
    }
}

/* Smooth transitions for all interactive elements */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Focus states for accessibility */
.form-control:focus,
.btn-auth:focus,
.social-btn:focus,
#theme-switcher:focus {
    outline: 2px solid var(--button-bg);
    outline-offset: 2px;
}

/* Loading state for buttons */
.btn-auth.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--button-text);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}