:root {
    /* Light Mode Variables */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #f43f5e;
    --accent-color: #8b5cf6;
    --light-bg: #f9fafb;
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.05);
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --input-bg: #f8fafc;
    --input-border: #e2e8f0;
}

[data-bs-theme="dark"] {
    /* Dark Mode Variables */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #f43f5e;
    --accent-color: #8b5cf6;
    --light-bg: #0f172a;
    --card-bg: #1e293b;
    --border-color: rgba(255, 255, 255, 0.05);
    --text-dark: #f8fafc;
    --text-muted: #cbd5e1;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --input-bg: #334155;
    --input-border: #475569;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-animation-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 15s infinite ease-in-out;
}

.shape-1 {
    top: 15%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    animation-delay: 0s;
}

.shape-2 {
    bottom: 10%;
    right: 15%;
    width: 250px;
    height: 250px;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    animation-delay: -5s;
}

.shape-3 {
    top: 50%;
    right: 20%;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #10b981, var(--primary-color));
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(5%, 5%) rotate(5deg);
    }
    50% {
        transform: translate(0, 10%) rotate(0deg);
    }
    75% {
        transform: translate(-5%, 5%) rotate(-5deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

.login-container {
    width: 100%;
    max-width: 450px;
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    padding: 40px 30px 20px;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.login-logo-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: white;
    font-size: 24px;
}

.login-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--text-dark);
}

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

.login-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.login-form {
    padding: 0 30px 40px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding-left: 12px;
}

.form-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 2px;
    opacity: 0.7;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-dark);
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.form-check-label {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

.login-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.login-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(99, 102, 241, 0.3);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 14px;
}

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

.divider::before {
    margin-right: 10px;
}

.divider::after {
    margin-left: 10px;
}

.social-login {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 10px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background-color: var(--light-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.social-btn i {
    margin-right: 8px;
    font-size: 18px;
}

.social-btn.google i {
    color: #ea4335;
}

.social-btn.facebook i {
    color: #1877f2;
}

.register-link {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: var(--card-shadow);
}

.theme-toggle:hover {
    transform: rotate(15deg);
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-container {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive */
@media (max-width: 576px) {
    .login-container {
        max-width: 100%;
    }
    
    .login-header {
        padding: 30px 20px 15px;
    }
    
    .login-form {
        padding: 0 20px 30px;
    }
}
