@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* Coral Wave Palette */
    --coral-light: #FCEDD8;
    --coral-yellow: #FFD464;
    --coral-orange: #FF5E5E;
    --coral-pink: #E23C64;
    --coral-deep: #B0183D;
    
    /* Deep Space Palette */
    --space-dark: #112C70;
    --space-purple: #5B58EB;
    --space-magenta: #BB63FF;
    --space-cyan: #56E1E9;
    --space-navy: #0A2353;
    
    --accent-gradient: linear-gradient(135deg, var(--space-purple), var(--coral-pink));
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--space-dark), var(--space-navy));
    padding: 2rem;
    overflow: hidden;
    position: relative;
}

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

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-gradient);
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--coral-orange), var(--space-cyan));
    bottom: -150px;
    right: -150px;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, var(--space-magenta), var(--coral-yellow));
    top: 50%;
    right: 10%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Login Container */
.login-container {
    max-width: 1100px;
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 1;
    min-height: 650px;
}

/* Left Side - Branding */
.login-branding {
    background: var(--accent-gradient);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(60px);
}

.branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.login-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

.branding-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.branding-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    font-size: 1rem;
}

.feature i {
    font-size: 1.5rem;
}

/* Right Side - Form */
.login-form-section {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
}

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

.form-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    color: #1a1d29;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-header p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

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

.error-alert {
    background: rgba(255, 94, 94, 0.1);
    color: var(--coral-orange);
    border: 1px solid rgba(255, 94, 94, 0.2);
}

.success-alert {
    background: rgba(86, 225, 233, 0.1);
    color: var(--space-cyan);
    border: 1px solid rgba(86, 225, 233, 0.2);
}

.alert i {
    font-size: 1.2rem;
}

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

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #1a1d29;
    font-size: 0.9rem;
}

.form-group label i {
    font-size: 1rem;
    color: var(--space-purple);
}

.form-input {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(91, 88, 235, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: #1a1d29;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--space-purple);
    box-shadow: 0 0 0 4px rgba(91, 88, 235, 0.1);
    background: white;
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

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

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -0.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #6b7280;
    position: relative;
    padding-left: 2rem;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 20px;
    width: 20px;
    background: rgba(91, 88, 235, 0.1);
    border: 2px solid rgba(91, 88, 235, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-container:hover .checkmark {
    background: rgba(91, 88, 235, 0.2);
}

.checkbox-container input:checked ~ .checkmark {
    background: var(--accent-gradient);
    border-color: transparent;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.forgot-link {
    color: var(--space-purple);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: var(--coral-pink);
}

/* Submit Button */
.submit-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(91, 88, 235, 0.3);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(91, 88, 235, 0.2);
}

.divider span {
    color: #9ca3af;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Back Link */
.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #6b7280;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.75rem;
    border-radius: 12px;
}

.back-link:hover {
    color: var(--space-purple);
    background: rgba(91, 88, 235, 0.05);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    max-width: 500px;
    width: 90%;
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 94, 94, 0.1);
    color: var(--coral-orange);
}

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

.modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--accent-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.modal-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    color: #1a1d29;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: #6b7280;
    font-size: 0.95rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Responsive */
@media (max-width: 900px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .login-branding {
        padding: 2rem;
        min-height: 300px;
    }

    .branding-title {
        font-size: 2.5rem;
    }

    .branding-features {
        display: none;
    }

    .login-form-section {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .login-form-section {
        padding: 1.5rem;
    }

    .modal-content {
        padding: 2rem;
    }

    .form-header h2 {
        font-size: 1.75rem;
    }
}
