 :root {
            --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --accent-gradient: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 50%, #ffa8a8 100%);
            --glass-bg: rgba(255, 255, 255, 0.1);
            --glass-border: rgba(255, 255, 255, 0.18);
            --text-primary: #ffffff;
            --text-secondary: rgba(255, 255, 255, 0.8);
            --text-muted: rgba(255, 255, 255, 0.6);
            --error-color: #ff4757;
            --success-color: #2ed573;
            --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
            --shadow-medium: 0 16px 64px rgba(0, 0, 0, 0.15);
            --shadow-heavy: 0 24px 80px rgba(0, 0, 0, 0.25);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            height: 100vh;
            overflow: hidden;
            background: var(--primary-gradient);
            position: relative;
            font-weight: 400;
        }

        /* Enhanced Background Animation */
        .background-animation {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: 1;
        }

        .floating-shapes {
            position: absolute;
            width: 100%;
            height: 100%;
        }

        .shape {
            position: absolute;
            background: var(--glass-bg);
            border-radius: 50%;
            animation: float 8s ease-in-out infinite;
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
        }

        .shape:nth-child(1) {
            width: 120px;
            height: 120px;
            left: 5%;
            top: 15%;
            animation-delay: 0s;
        }

        .shape:nth-child(2) {
            width: 180px;
            height: 180px;
            right: 8%;
            top: 8%;
            animation-delay: 2s;
        }

        .shape:nth-child(3) {
            width: 80px;
            height: 80px;
            left: 15%;
            bottom: 15%;
            animation-delay: 4s;
        }

        .shape:nth-child(4) {
            width: 140px;
            height: 140px;
            right: 15%;
            bottom: 25%;
            animation-delay: 1s;
        }

        .shape:nth-child(5) {
            width: 100px;
            height: 100px;
            left: 45%;
            top: 45%;
            animation-delay: 3s;
        }

        .shape:nth-child(6) {
            width: 60px;
            height: 60px;
            right: 35%;
            top: 65%;
            animation-delay: 5s;
        }

        @keyframes float {
            0%, 100% {
                transform: translateY(0px) rotate(0deg) scale(1);
                opacity: 0.6;
            }
            50% {
                transform: translateY(-30px) rotate(180deg) scale(1.1);
                opacity: 0.3;
            }
        }

        /* Enhanced Gradient Overlay */
        .gradient-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, 
                rgba(102, 126, 234, 0.9) 0%, 
                rgba(118, 75, 162, 0.8) 50%, 
                rgba(255, 107, 107, 0.7) 100%);
            z-index: 2;
        }

        /* Enhanced Particles */
        .particles {
            position: absolute;
            width: 100%;
            height: 100%;
            z-index: 3;
        }

        .particle {
            position: absolute;
            width: 3px;
            height: 3px;
            background: var(--text-secondary);
            border-radius: 50%;
            animation: particles 12s linear infinite;
        }

        .particle:nth-child(even) {
            animation-duration: 16s;
            background: var(--text-muted);
            width: 2px;
            height: 2px;
        }

        @keyframes particles {
            0% {
                transform: translateY(100vh) translateX(-50px);
                opacity: 0;
            }
            10% {
                opacity: 1;
            }
            90% {
                opacity: 1;
            }
            100% {
                transform: translateY(-100vh) translateX(50px);
                opacity: 0;
            }
        }

        /* Login Container */
        .login-container {
            position: relative;
            z-index: 10;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            padding: 20px;
        }

        .login-box {
            background: var(--glass-bg);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border: 1px solid var(--glass-border);
            border-radius: 24px;
            padding: 48px 40px;
            width: 100%;
            max-width: 420px;
            box-shadow: var(--shadow-heavy);
            text-align: center;
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .login-box:hover {
            transform: translateY(-5px);
            box-shadow: 0 32px 100px rgba(0, 0, 0, 0.3);
        }

        .login-box::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(45deg, 
                rgba(255, 255, 255, 0.1), 
                rgba(255, 255, 255, 0.05), 
                rgba(255, 255, 255, 0.1));
            border-radius: 26px;
            z-index: -1;
            animation: borderGlow 4s ease-in-out infinite alternate;
        }

        @keyframes borderGlow {
            0% {
                opacity: 0.5;
            }
            100% {
                opacity: 1;
            }
        }

        /* Typing Header */
        .typing-header {
            margin-bottom: 32px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #typing-text {
            font-size: 20px;
            font-weight: 500;
            color: var(--text-secondary);
            text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
            letter-spacing: 0.5px;
        }

        .login-title {
            color: var(--text-primary);
            margin-bottom: 32px;
            font-size: 32px;
            font-weight: 600;
            text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
            letter-spacing: -0.5px;
        }

        /* Enhanced Form Styles */
        #login-form {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        .input-group {
            position: relative;
        }

        .input-group label {
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 14px;
            font-weight: 500;
            pointer-events: none;
            transition: all 0.3s ease;
            background: transparent;
            padding: 0 8px;
        }

        .input-group input {
            width: 100%;
            padding: 18px 20px;
            background: rgba(255, 255, 255, 0.08);
            border: 1.5px solid rgba(255, 255, 255, 0.15);
            border-radius: 16px;
            color: var(--text-primary);
            font-size: 16px;
            font-weight: 400;
            outline: none;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(10px);
            font-family: 'Inter', sans-serif;
        }

        .input-group input::placeholder {
            color: transparent;
        }

        .input-group input:focus,
        .input-group input:not(:placeholder-shown) {
            border-color: rgba(255, 255, 255, 0.4);
            background: rgba(255, 255, 255, 0.12);
            transform: translateY(-2px);
            box-shadow: var(--shadow-medium);
        }

        .input-group input:focus + label,
        .input-group input:not(:placeholder-shown) + label {
            top: -8px;
            font-size: 12px;
            color: var(--text-primary);
            background: rgba(118, 75, 162, 0.8);
            border-radius: 8px;
            padding: 4px 8px;
            backdrop-filter: blur(10px);
        }

        /* Password Toggle */
        .password-toggle {
            position: absolute;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 18px;
            z-index: 5;
        }

        .password-toggle:hover {
            color: var(--text-primary);
            transform: translateY(-50%) scale(1.1);
        }

        /* Enhanced Button */
        .login-btn {
            background: var(--accent-gradient);
            border: none;
            padding: 18px 32px;
            border-radius: 16px;
            color: white;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            text-transform: none;
            letter-spacing: 0.5px;
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow-light);
            font-family: 'Inter', sans-serif;
        }

        .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: left 0.6s;
        }

        .login-btn:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-heavy);
        }

        .login-btn:hover::before {
            left: 100%;
        }

        .login-btn:active {
            transform: translateY(-1px);
        }

        .login-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        /* Error Popup */
        .error-popup {
            position: fixed;
            top: 30px;
            left: 50%;
            transform: translateX(-50%) translateY(-100px);
            background: rgba(255, 71, 87, 0.95);
            backdrop-filter: blur(20px);
            color: white;
            padding: 16px 24px;
            border-radius: 12px;
            box-shadow: var(--shadow-heavy);
            z-index: 1000;
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: 500;
            font-size: 14px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            max-width: 90vw;
        }

        .error-popup.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .error-popup i {
            font-size: 16px;
            color: #fff;
        }

        .error-popup .close-btn {
            margin-left: auto;
            background: none;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 16px;
            padding: 4px;
            border-radius: 4px;
            transition: background 0.2s;
        }

        .error-popup .close-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        /* Success Popup */
        .success-popup {
            position: fixed;
            top: 30px;
            left: 50%;
            transform: translateX(-50%) translateY(-100px);
            background: rgba(46, 213, 115, 0.95);
            backdrop-filter: blur(20px);
            color: white;
            padding: 16px 24px;
            border-radius: 12px;
            box-shadow: var(--shadow-heavy);
            z-index: 1000;
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: 500;
            font-size: 14px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            max-width: 90vw;
        }

        .success-popup.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        /* Signup Link */
        .signup-link {
            margin-top: 24px;
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 400;
        }

        .signup-link a {
            color: #ff8e8e;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
            position: relative;
        }

        .signup-link a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -2px;
            left: 0;
            background: #ff8e8e;
            transition: width 0.3s ease;
        }

        .signup-link a:hover {
            color: #ffa8a8;
            text-shadow: 0 0 10px rgba(255, 142, 142, 0.5);
        }

        .signup-link a:hover::after {
            width: 100%;
        }

        /* Loading Animation */
        .loading-spinner {
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
            margin-right: 8px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Mobile Responsive */
        @media (max-width: 480px) {
            .login-container {
                padding: 16px;
            }

            .login-box {
                padding: 32px 24px;
                border-radius: 20px;
                max-width: 100%;
            }

            .login-title {
                font-size: 28px;
                margin-bottom: 24px;
            }

            #typing-text {
                font-size: 18px;
            }

            .typing-header {
                height: 40px;
                margin-bottom: 24px;
            }

            #login-form {
                gap: 20px;
            }

            .input-group input {
                padding: 16px 18px;
                font-size: 16px;
            }

            .login-btn {
                padding: 16px 24px;
                font-size: 15px;
            }

            .error-popup,
            .success-popup {
                margin: 0 16px;
                max-width: calc(100vw - 32px);
                font-size: 13px;
                padding: 14px 20px;
            }

            .shape {
                display: none;
            }

            .particles {
                opacity: 0.5;
            }
        }

        @media (max-width: 320px) {
            .login-box {
                padding: 24px 16px;
            }

            .login-title {
                font-size: 24px;
            }

            #typing-text {
                font-size: 16px;
            }
        }

        /* Dark mode enhancements */
        @media (prefers-color-scheme: dark) {
            :root {
                --glass-bg: rgba(255, 255, 255, 0.08);
                --glass-border: rgba(255, 255, 255, 0.12);
            }
        }

        /* Reduced motion */
        @media (prefers-reduced-motion: reduce) {
            * {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }