<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Verdant Login</title>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <style>
        :root {
            --olive-leaf: #606c38;
            --black-forest: #283618;
            --cornsilk: #fefae0;
            --earth-yellow: #dda15e;
            --tigers-eye: #bc6c25;
        }

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

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            min-height: 100vh;
            background: var(--cornsilk);
            overflow-x: hidden;
        }

        .container {
            display: flex;
            min-height: 100vh;
        }

        /* Left Panel - Brand/Visual Section */
        .left-panel {
            flex: 1;
            background: linear-gradient(145deg, var(--black-forest) 0%, var(--olive-leaf) 100%);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 3rem;
            position: relative;
            overflow: hidden;
        }

        .left-panel::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(254, 250, 224, 0.03) 0%, transparent 50%);
            animation: slowRotate 30s linear infinite;
        }

        @keyframes slowRotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .brand-content {
            position: relative;
            z-index: 1;
            text-align: center;
            color: var(--cornsilk);
        }

        .logo {
            width: 80px;
            height: 80px;
            margin-bottom: 2rem;
            position: relative;
        }

        .logo-circle {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--earth-yellow) 0%, var(--tigers-eye) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 
                0 10px 40px rgba(221, 161, 94, 0.3),
                inset 0 -3px 10px rgba(0, 0, 0, 0.1),
                inset 0 3px 10px rgba(255, 255, 255, 0.2);
            animation: float 6s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        .logo-circle svg {
            width: 40px;
            height: 40px;
            fill: var(--cornsilk);
        }

        .brand-title {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            letter-spacing: -0.02em;
        }

        .brand-subtitle {
            font-size: 1.1rem;
            font-weight: 300;
            opacity: 0.85;
            max-width: 300px;
            line-height: 1.6;
        }

        /* Floating Elements */
        .floating-elements {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            pointer-events: none;
            overflow: hidden;
        }

        .floating-leaf {
            position: absolute;
            width: 20px;
            height: 20px;
            background: var(--olive-leaf);
            border-radius: 50% 0 50% 0;
            opacity: 0.15;
            animation: floatLeaf 15s ease-in-out infinite;
        }

        .floating-leaf:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
        .floating-leaf:nth-child(2) { top: 20%; right: 15%; animation-delay: 2s; width: 15px; height: 15px; }
        .floating-leaf:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 4s; width: 25px; height: 25px; }
        .floating-leaf:nth-child(4) { bottom: 15%; right: 10%; animation-delay: 6s; }
        .floating-leaf:nth-child(5) { top: 50%; left: 5%; animation-delay: 8s; width: 12px; height: 12px; }

        @keyframes floatLeaf {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(10px, -20px) rotate(90deg); }
            50% { transform: translate(-5px, -10px) rotate(180deg); }
            75% { transform: translate(15px, 5px) rotate(270deg); }
        }

        /* Right Panel - Login Form */
        .right-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 3rem;
            background: var(--cornsilk);
            position: relative;
        }

        .login-container {
            width: 100%;
            max-width: 420px;
        }

        .login-header {
            margin-bottom: 2.5rem;
        }

        .login-header h1 {
            font-size: 2rem;
            font-weight: 700;
            color: var(--black-forest);
            margin-bottom: 0.5rem;
            letter-spacing: -0.02em;
        }

        .login-header p {
            color: var(--olive-leaf);
            font-size: 1rem;
            font-weight: 400;
        }

        /* Glassmorphism Form Card */
        .form-card {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 24px;
            padding: 2.5rem;
            border: 1px solid rgba(255, 255, 255, 0.8);
            box-shadow: 
                0 8px 32px rgba(40, 54, 24, 0.08),
                0 2px 8px rgba(40, 54, 24, 0.04);
        }

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

        .form-label {
            display: block;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--black-forest);
            margin-bottom: 0.5rem;
        }

        /* Neumorphic Input Fields */
        .input-wrapper {
            position: relative;
        }

        .form-input {
            width: 100%;
            padding: 1rem 1rem 1rem 3rem;
            font-size: 1rem;
            font-family: inherit;
            border: none;
            border-radius: 14px;
            background: var(--cornsilk);
            color: var(--black-forest);
            box-shadow: 
                inset 3px 3px 6px rgba(40, 54, 24, 0.08),
                inset -3px -3px 6px rgba(255, 255, 255, 0.9);
            transition: all 0.3s ease;
            outline: none;
        }

        .form-input::placeholder {
            color: rgba(96, 108, 56, 0.5);
        }

        .form-input:focus {
            box-shadow: 
                inset 3px 3px 6px rgba(40, 54, 24, 0.12),
                inset -3px -3px 6px rgba(255, 255, 255, 0.9),
                0 0 0 3px rgba(96, 108, 56, 0.15);
        }

        .input-icon {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            color: var(--olive-leaf);
            opacity: 0.6;
            transition: opacity 0.3s ease;
        }

        .form-input:focus + .input-icon,
        .input-wrapper:hover .input-icon {
            opacity: 1;
        }

        .password-toggle {
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            color: var(--olive-leaf);
            opacity: 0.6;
            transition: opacity 0.3s ease;
            padding: 0;
        }

        .password-toggle:hover {
            opacity: 1;
        }

        /* Checkbox */
        .checkbox-group {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 2rem;
        }

        .checkbox-wrapper {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            cursor: pointer;
        }

        .checkbox-input {
            display: none;
        }

        .checkbox-custom {
            width: 20px;
            height: 20px;
            border-radius: 6px;
            background: var(--cornsilk);
            box-shadow: 
                inset 2px 2px 4px rgba(40, 54, 24, 0.08),
                inset -2px -2px 4px rgba(255, 255, 255, 0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .checkbox-input:checked + .checkbox-custom {
            background: var(--olive-leaf);
            box-shadow: 
                0 2px 8px rgba(96, 108, 56, 0.3);
        }

        .checkbox-custom svg {
            width: 12px;
            height: 12px;
            stroke: var(--cornsilk);
            stroke-width: 3;
            opacity: 0;
            transform: scale(0);
            transition: all 0.2s ease;
        }

        .checkbox-input:checked + .checkbox-custom svg {
            opacity: 1;
            transform: scale(1);
        }

        .checkbox-label {
            font-size: 0.875rem;
            color: var(--black-forest);
        }

        .forgot-link {
            font-size: 0.875rem;
            color: var(--tigers-eye);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .forgot-link:hover {
            color: var(--earth-yellow);
        }

        /* Submit Button */
        .submit-btn {
            width: 100%;
            padding: 1rem;
            font-size: 1rem;
            font-weight: 600;
            font-family: inherit;
            border: none;
            border-radius: 14px;
            background: linear-gradient(135deg, var(--olive-leaf) 0%, var(--black-forest) 100%);
            color: var(--cornsilk);
            cursor: pointer;
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
            box-shadow: 
                0 4px 15px rgba(40, 54, 24, 0.2),
                0 2px 5px rgba(40, 54, 24, 0.1);
        }

        .submit-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: left 0.5s ease;
        }

        .submit-btn:hover {
            transform: translateY(-2px);
            box-shadow: 
                0 8px 25px rgba(40, 54, 24, 0.25),
                0 4px 10px rgba(40, 54, 24, 0.15);
        }

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

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

        .submit-btn.loading {
            pointer-events: none;
        }

        .submit-btn .btn-text {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: opacity 0.3s ease;
        }

        .submit-btn.loading .btn-text {
            opacity: 0;
        }

        .submit-btn .spinner {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 24px;
            height: 24px;
            border: 3px solid rgba(254, 250, 224, 0.3);
            border-top-color: var(--cornsilk);
            border-radius: 50%;
            opacity: 0;
            animation: spin 0.8s linear infinite;
        }

        .submit-btn.loading .spinner {
            opacity: 1;
        }

        @keyframes spin {
            to { transform: translate(-50%, -50%) rotate(360deg); }
        }

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

        .divider-line {
            flex: 1;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(96, 108, 56, 0.2), transparent);
        }

        .divider-text {
            font-size: 0.875rem;
            color: var(--olive-leaf);
            opacity: 0.7;
        }

        /* Social Login */
        .social-login {
            display: flex;
            gap: 1rem;
        }

        .social-btn {
            flex: 1;
            padding: 0.875rem;
            border: none;
            border-radius: 12px;
            background: var(--cornsilk);
            box-shadow: 
                3px 3px 6px rgba(40, 54, 24, 0.08),
                -3px -3px 6px rgba(255, 255, 255, 0.9);
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .social-btn:hover {
            box-shadow: 
                5px 5px 10px rgba(40, 54, 24, 0.1),
                -5px -5px 10px rgba(255, 255, 255, 1);
            transform: translateY(-2px);
        }

        .social-btn:active {
            box-shadow: 
                inset 2px 2px 4px rgba(40, 54, 24, 0.08),
                inset -2px -2px 4px rgba(255, 255, 255, 0.9);
            transform: translateY(0);
        }

        .social-btn svg {
            width: 24px;
            height: 24px;
        }

        /* Sign Up Link */
        .signup-link {
            text-align: center;
            margin-top: 2rem;
            font-size: 0.9rem;
            color: var(--black-forest);
        }

        .signup-link a {
            color: var(--tigers-eye);
            text-decoration: none;
            font-weight: 600;
            transition: color 0.3s ease;
        }

        .signup-link a:hover {
            color: var(--earth-yellow);
        }

        /* Success State */
        .success-message {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 2rem;
        }

        .success-icon {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--olive-leaf) 0%, var(--black-forest) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1.5rem;
            animation: successPop 0.5s ease;
        }

        @keyframes successPop {
            0% { transform: scale(0); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }

        .success-icon svg {
            width: 40px;
            height: 40px;
            stroke: var(--cornsilk);
            stroke-width: 3;
            stroke-linecap: round;
            stroke-linejoin: round;
            fill: none;
        }

        .success-icon svg path {
            stroke-dasharray: 100;
            stroke-dashoffset: 100;
            animation: drawCheck 0.5s ease 0.3s forwards;
        }

        @keyframes drawCheck {
            to { stroke-dashoffset: 0; }
        }

        .success-message h2 {
            font-size: 1.5rem;
            color: var(--black-forest);
            margin-bottom: 0.5rem;
        }

        .success-message p {
            color: var(--olive-leaf);
        }

        /* Responsive Design */
        @media (max-width: 968px) {
            .container {
                flex-direction: column;
            }

            .left-panel {
                min-height: 30vh;
                padding: 2rem;
            }

            .brand-title {
                font-size: 2rem;
            }

            .brand-subtitle {
                font-size: 1rem;
            }

            .right-panel {
                padding: 2rem;
            }
        }

        @media (max-width: 480px) {
            .form-card {
                padding: 1.5rem;
            }

            .login-header h1 {
                font-size: 1.5rem;
            }

            .social-login {
                flex-direction: column;
            }

            .checkbox-group {
                flex-direction: column;
                align-items: flex-start;
                gap: 1rem;
            }
        }

        /* Input validation states */
        .form-input.error {
            box-shadow: 
                inset 3px 3px 6px rgba(188, 108, 37, 0.15),
                inset -3px -3px 6px rgba(255, 255, 255, 0.9),
                0 0 0 2px rgba(188, 108, 37, 0.3);
        }

        .error-message {
            font-size: 0.75rem;
            color: var(--tigers-eye);
            margin-top: 0.5rem;
            display: none;
        }

        .form-group.error .error-message {
            display: block;
            animation: shake 0.4s ease;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- Left Panel - Brand Section -->
        <div class="left-panel">
            <div class="floating-elements">
                <div class="floating-leaf"></div>
                <div class="floating-leaf"></div>
                <div class="floating-leaf"></div>
                <div class="floating-leaf"></div>
                <div class="floating-leaf"></div>
            </div>
            
            <div class="brand-content">
                <div class="logo">
                    <div class="logo-circle">
                        <svg viewBox="0 0 24 24" fill="currentColor">
                            <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/>
                        </svg>
                    </div>
                </div>
                <h1 class="brand-title">Verdant</h1>
                <p class="brand-subtitle">Cultivating sustainable solutions for a greener tomorrow. Join our growing community.</p>
            </div>
        </div>

        <!-- Right Panel - Login Form -->
        <div class="right-panel">
            <div class="login-container">
                <div class="login-header">
                    <h1>Welcome back</h1>
                    <p>Enter your credentials to access your account</p>
                </div>

                <div class="form-card">
                    <form id="loginForm">
                        <div class="form-group" id="emailGroup">
                            <label class="form-label" for="email">Email Address</label>
                            <div class="input-wrapper">
                                <input 
                                    type="email" 
                                    id="email" 
                                    class="form-input" 
                                    placeholder="you@example.com"
                                    autocomplete="email"
                                >
                                <svg class="input-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
                                    <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/>
                                    <polyline points="22,6 12,13 2,6"/>
                                </svg>
                            </div>
                            <span class="error-message">Please enter a valid email address</span>
                        </div>

                        <div class="form-group" id="passwordGroup">
                            <label class="form-label" for="password">Password</label>
                            <div class="input-wrapper">
                                <input 
                                    type="password" 
                                    id="password" 
                                    class="form-input" 
                                    placeholder="••••••••"
                                    autocomplete="current-password"
                                >
                                <svg class="input-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
                                    <rect x="3" y="11" width="18" height="11" rx="2" ry="2"/>
                                    <path d="M7 11V7a5 5 0 0 1 10 0v4"/>
                                </svg>
                                <button type="button" class="password-toggle" id="togglePassword">
                                    <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" id="eyeIcon">
                                        <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>
                                        <circle cx="12" cy="12" r="3"/>
                                    </svg>
                                </button>
                            </div>
                            <span class="error-message">Password must be at least 8 characters</span>
                        </div>

                        <div class="checkbox-group">
                            <label class="checkbox-wrapper">
                                <input type="checkbox" class="checkbox-input" id="remember">
                                <span class="checkbox-custom">
                                    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor">
                                        <polyline points="20 6 9 17 4 12"/>
                                    </svg>
                                </span>
                                <span class="checkbox-label">Remember me</span>
                            </label>
                            <a href="#" class="forgot-link">Forgot password?</a>
                        </div>

                        <button type="submit" class="submit-btn" id="submitBtn">
                            <span class="btn-text">
                                Sign In
                                <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
                                    <line x1="5" y1="12" x2="19" y2="12"/>
                                    <polyline points="12 5 19 12 12 19"/>
                                </svg>
                            </span>
                            <span class="spinner"></span>
                        </button>
                    </form>

                    <div class="divider">
                        <span class="divider-line"></span>
                        <span class="divider-text">or continue with</span>
                        <span class="divider-line"></span>
                    </div>

                    <div class="social-login">
                        <button type="button" class="social-btn" aria-label="Sign in with Google">
                            <svg viewBox="0 0 24 24">
                                <path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/>
                                <path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/>
                                <path fill="#FBBC05" d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/>
                                <path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/>
                            </svg>
                        </button>
                        <button type="button" class="social-btn" aria-label="Sign in with Apple">
                            <svg viewBox="0 0 24 24" fill="#000">
                                <path d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"/>
                            </svg>
                        </button>
                        <button type="button" class="social-btn" aria-label="Sign in with GitHub">
                            <svg viewBox="0 0 24 24" fill="#333">
                                <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
                            </svg>
                        </button>
                    </div>

                    <div class="success-message" id="successMessage">
                        <div class="success-icon">
                            <svg viewBox="0 0 24 24">
                                <path d="M20 6L9 17l-5-5"/>
                            </svg>
                        </div>
                        <h2>Welcome back!</h2>
                        <p>Redirecting to your dashboard...</p>
                    </div>
                </div>

                <p class="signup-link">
                    Don't have an account? <a href="#">Create one</a>
                </p>
            </div>
        </div>
    </div>

    <script>
        // DOM Elements
        const loginForm = document.getElementById('loginForm');
        const emailInput = document.getElementById('email');
        const passwordInput = document.getElementById('password');
        const emailGroup = document.getElementById('emailGroup');
        const passwordGroup = document.getElementById('passwordGroup');
        const submitBtn = document.getElementById('submitBtn');
        const togglePassword = document.getElementById('togglePassword');
        const eyeIcon = document.getElementById('eyeIcon');
        const successMessage = document.getElementById('successMessage');

        // Password visibility toggle
        togglePassword.addEventListener('click', () => {
            const type = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
            passwordInput.setAttribute('type', type);
            
            // Update icon
            if (type === 'text') {
                eyeIcon.innerHTML = `
                    <path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/>
                    <line x1="1" y1="1" x2="23" y2="23"/>
                `;
            } else {
                eyeIcon.innerHTML = `
                    <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>
                    <circle cx="12" cy="12" r="3"/>
                `;
            }
        });

        // Email validation
        function validateEmail(email) {
            const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
            return re.test(email);
        }

        // Password validation
        function validatePassword(password) {
            return password.length >= 8;
        }

        // Clear error state
        function clearError(group, input) {
            group.classList.remove('error');
            input.classList.remove('error');
        }

        // Set error state
        function setError(group, input) {
            group.classList.add('error');
            input.classList.add('error');
        }

        // Real-time validation
        emailInput.addEventListener('input', () => {
            if (validateEmail(emailInput.value) || emailInput.value === '') {
                clearError(emailGroup, emailInput);
            }
        });

        passwordInput.addEventListener('input', () => {
            if (validatePassword(passwordInput.value) || passwordInput.value === '') {
                clearError(passwordGroup, passwordInput);
            }
        });

        // Form submission
        loginForm.addEventListener('submit', async (e) => {
            e.preventDefault();
            
            let isValid = true;

            // Validate email
            if (!validateEmail(emailInput.value)) {
                setError(emailGroup, emailInput);
                isValid = false;
            } else {
                clearError(emailGroup, emailInput);
            }

            // Validate password
            if (!validatePassword(passwordInput.value)) {
                setError(passwordGroup, passwordInput);
                isValid = false;
            } else {
                clearError(passwordGroup, passwordInput);
            }

            if (!isValid) return;

            // Show loading state
            submitBtn.classList.add('loading');
            submitBtn.disabled = true;

            // Simulate API call
            await new Promise(resolve => setTimeout(resolve, 2000));

            // Show success state
            submitBtn.classList.remove('loading');
            loginForm.style.display = 'none';
            document.querySelector('.divider').style.display = 'none';
            document.querySelector('.social-login').style.display = 'none';
            successMessage.style.display = 'flex';

            // Redirect simulation
            setTimeout(() => {
                // In a real app, redirect to dashboard
                console.log('Redirecting to dashboard...');
            }, 2000);
        });

        // Add subtle parallax effect to floating leaves
        document.addEventListener('mousemove', (e) => {
            const leaves = document.querySelectorAll('.floating-leaf');
            const x = e.clientX / window.innerWidth;
            const y = e.clientY / window.innerHeight;

            leaves.forEach((leaf, index) => {
                const speed = (index + 1) * 0.5;
                const xOffset = (x - 0.5) * speed * 20;
                const yOffset = (y - 0.5) * speed * 20;
                leaf.style.transform = `translate(${xOffset}px, ${yOffset}px)`;
            });
        });

        // Social button click effects
        document.querySelectorAll('.social-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                this.style.transform = 'scale(0.95)';
                setTimeout(() => {
                    this.style.transform = '';
                }, 150);
            });
        });
    </script>
</body>
</html>