.login-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.05), transparent 50%);
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow);
    animation: fadeInUp 0.8s ease-out;
}

.login-card {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.social-login {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

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

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

.google-btn:hover {
    background: #ea4335;
    border-color: #ea4335;
    color: white;
}

.microsoft-btn:hover {
    background: #0078d4;
    border-color: #0078d4;
    color: white;
}

.apple-btn:hover {
    background: #000000;
    border-color: #000000;
    color: white;
}

[data-theme="light"] .apple-btn:hover {
    background: #000000;
    border-color: #000000;
    color: white;
}

.twitter-btn:hover {
    background: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.social-btn i {
    font-size: 1.1rem;
}

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

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

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

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input:invalid {
    border-color: #ef4444;
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field .form-input {
    padding-right: 2.5rem;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: auto;
}

.password-toggle i {
    font-size: 1rem;
}

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

.form-error {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.25rem;
    min-height: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-error.show {
    opacity: 1;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.checkmark {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.forgot-password,
.terms-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.forgot-password:hover,
.terms-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.submit-btn {
    position: relative;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    overflow: hidden;
}

.submit-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

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

.submit-btn:hover:not(.loading)::before {
    left: 100%;
}

.submit-btn:hover:not(.loading) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.submit-btn:disabled,
.submit-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    min-height: 3.25rem;
}

.submit-btn.loading {
    animation: none !important;
    transform: none !important;
}

.submit-btn.loading:hover {
    transform: none;
}

.submit-btn.loading .ripple {
    display: none !important;
}

@keyframes pulse-loading {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(59, 130, 246, 0.6);
    }
}

.btn-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

.spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.spinner::before,
.spinner::after {
    content: '';
    width: 0.375rem;
    height: 0.375rem;
    background: white;
    border-radius: 50%;
    animation: pulse-dots 1.4s ease-in-out infinite both;
}

.spinner::before {
    animation-delay: -0.32s;
}

.spinner::after {
    animation-delay: 0.32s;
}

.spinner > div {
    width: 0.375rem;
    height: 0.375rem;
    background: white;
    border-radius: 50%;
    animation: pulse-dots 1.4s ease-in-out infinite both;
    animation-delay: 0s;
}

@keyframes pulse-dots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.form-switch {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.switch-text {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.switch-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: underline;
    font-size: 1rem;
}

.switch-btn:hover {
    color: var(--accent-secondary);
}

.login-visual {
    background: var(--bg-primary);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1), transparent 70%);
}

.visual-content {
    position: relative;
    z-index: 1;
    max-width: 400px;
}

.visual-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.visual-features {
    list-style: none;
    margin-bottom: 3rem;
}

.visual-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.visual-feature i {
    color: var(--accent-success);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.testimonial {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-size: 4rem;
    color: var(--accent-primary);
    line-height: 1;
    opacity: 0.3;
}

.testimonial-quote {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.testimonial-author strong {
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.25rem;
}

.testimonial-author span {
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 1rem;
    }
    
    .login-visual {
        display: none;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 20px 40px var(--shadow);
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.modal-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.forgot-password-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.cancel-btn {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.forgot-success {
    text-align: center;
    padding: 1rem 0;
}

.success-icon {
    font-size: 4rem;
    color: var(--accent-success);
    margin-bottom: 1rem;
}

.forgot-success h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.forgot-success p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.success-note {
    font-size: 0.875rem;
    color: var(--text-muted) !important;
    margin-bottom: 2rem !important;
}

.forgot-success strong {
    color: var(--text-primary);
}

/* Reset Password Page Styles */
.loading-state,
.error-state,
.success-state {
    text-align: center;
    padding: 2rem 0;
}

.spinner-large {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.spinner-large .spinner {
    transform: scale(1.5);
}

.loading-state p {
    color: var(--text-secondary);
    margin: 0;
}

.error-state .error-icon,
.success-state .success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.error-state .error-icon {
    color: #ef4444;
}

.success-state .success-icon {
    color: var(--accent-success);
}

.error-state h2,
.success-state h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.error-state p,
.success-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.user-info {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.reset-email-info {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.875rem;
}

.reset-email-info strong {
    color: var(--text-primary);
}

.password-requirements {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.password-requirements h4 {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

.password-requirements ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.password-requirements li:last-child {
    margin-bottom: 0;
}

.password-requirements li::before {
    content: '○';
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.password-requirements li.valid {
    color: var(--accent-success);
}

.password-requirements li.valid::before {
    content: '✓';
    font-weight: bold;
}

.password-requirements li.invalid {
    color: #ef4444;
}

.password-requirements li.invalid::before {
    content: '✗';
    font-weight: bold;
}

@media (max-width: 480px) {
    .login-main {
        padding: 1rem 0;
    }

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

    .login-title {
        font-size: 1.75rem;
    }

    .social-login {
        gap: 0.5rem;
    }

    .social-btn {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }

    .modal-header {
        padding: 1rem 1.5rem 0.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cancel-btn,
    .forgot-success .submit-btn {
        width: 100%;
        justify-content: center;
    }
}