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

        body, html {
            margin: 0;
            padding: 0;
            height: 100%;
            font-family: 'Poppins', sans-serif;
            background: #f0f2f5;
            overflow-x: hidden;
        }

        body {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        /* Top Preloader Styles with animation */
        .progress-bar {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            z-index: 9999;
            background-color: #f0f2f5;
            overflow: hidden;
        }
        
        .progress {
            width: 0%;
            height: 100%;
            background: linear-gradient(90deg, #5C6BC0, #7986CB, #9FA8DA);
            background-size: 200% 100%;
            animation: 
                loading 2s ease-out forwards,
                gradient-shift 2s linear infinite;
        }
        
        @keyframes loading {
            0% { width: 0; }
            20% { width: 40%; }
            50% { width: 60%; }
            70% { width: 75%; }
            85% { width: 90%; }
            100% { width: 100%; }
        }
        
        @keyframes gradient-shift {
            0% { background-position: 0% 50%; }
            100% { background-position: 100% 50%; }
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .spinner {
            display: none;
            width: 1.5rem;
            height: 1.5rem;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top: 2px solid white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto;
        }

        .button-content {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .button-text {
            display: inline-block;
        }

        /* Enhanced Loading Spinner for login */
        .full-screen-spinner {
            position: fixed;
            inset: 0;
            background-color: rgba(240, 242, 245, 0.9);
            backdrop-filter: blur(4px);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 50;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }
        
        .full-screen-spinner.active {
            opacity: 1;
            visibility: visible;
        }
        
        .spinner-container {
            position: relative;
            width: 100px;
            height: 100px;
        }
        
        .spinner-outer {
            position: absolute;
            width: 100px;
            height: 100px;
            border: 4px solid transparent;
            border-top-color: #5C6BC0;
            border-radius: 50%;
            animation: spin 1.5s linear infinite;
        }
        
        .spinner-middle {
            position: absolute;
            width: 80px;
            height: 80px;
            top: 10px;
            left: 10px;
            border: 4px solid transparent;
            border-top-color: #7986CB;
            border-radius: 50%;
            animation: spin 1.2s linear infinite reverse;
        }
        
        .spinner-inner {
            position: absolute;
            width: 60px;
            height: 60px;
            top: 20px;
            left: 20px;
            border: 4px solid transparent;
            border-top-color: #9FA8DA;
            border-radius: 50%;
            animation: spin 0.9s linear infinite;
        }
        
        .spinner-shimmer {
            position: absolute;
            top: -10px;
            left: -10px;
            right: -10px;
            bottom: -10px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(92, 107, 192, 0.3) 0%, rgba(92, 107, 192, 0) 70%);
            animation: pulse 1.5s ease-in-out infinite;
            z-index: -1;
        }

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

        /* Toast notification styles */
        .toast {
            position: fixed;
            right: 20px;
            bottom: 20px;
            padding: 12px 20px;
            background-color: #ffffff;
            color: #1f2937;
            border-radius: 8px;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.3s ease;
            z-index: 1000;
            display: flex;
            align-items: center;
            max-width: 350px;
            border: 1px solid #e5e7eb;
        }

        .toast.success {
            border-left: 4px solid #10B981;
        }

        .toast.error {
            border-left: 4px solid #EF4444;
        }

        .toast.warning {
            border-left: 4px solid #F59E0B;
        }

        .toast.show {
            opacity: 1;
            transform: translateY(0);
        }

        .toast-icon {
            margin-right: 12px;
            font-size: 20px;
        }

        .toast-icon.success {
            color: #10B981;
        }

        .toast-icon.error {
            color: #EF4444;
        }

        .toast-icon.warning {
            color: #F59E0B;
        }

        .toast-content {
            flex: 1;
        }

        .toast-message {
            margin: 0;
            font-size: 14px;
            color: #374151;
        }

        /* Form styling */
        .form-input {
            background-color: #f8f9fa;
            border: 1px solid #e0e0e0;
            transition: all 0.3s ease;
            width: 100%;
            padding: 0.625rem 2.5rem;
            border-radius: 0.5rem;
            font-size: 15px;
            color: #333;
        }
        
        .form-input:hover {
            border-color: #7986CB;
            background-color: #fff;
        }

        .form-input:focus {
            background-color: #fff;
            border-color: #7986CB;
            outline: none;
        }

        /* Magic particles */
        .magic-particle {
            position: absolute;
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: #5C6BC0;
            pointer-events: none;
            opacity: 0;
            z-index: 9998;
        }
        
        @keyframes particle-effect {
            0% { transform: translate(0, 0) scale(1); opacity: 1; }
            100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
        }
        
        /* Logo animation */
        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
        
        .floating {
            animation: float 3s ease-in-out infinite;
        }
        
        /* Login button */
        .login-btn {
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
            background: linear-gradient(135deg, #7986CB, #5C6BC0);
            z-index: 1;
            width: 100%;
            padding: 0.75rem;
            color: white;
            border: none;
            border-radius: 0.5rem;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
        }
        
        .login-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #5C6BC0, #3F51B5);
            transition: transform 0.5s ease;
            z-index: -1;
            transform: scaleX(0);
            transform-origin: right;
        }
        
        .login-btn:hover::before {
            transform: scaleX(1);
            transform-origin: left;
        }

        .login-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(92, 107, 192, 0.4);
        }
        
        .login-btn:active {
            transform: scale(0.98);
        }

        .login-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

        /* Login container - same structure as WAVE */
        .login-container {
            width: 100%;
            max-width: 28rem;
        }

        .login-card {
            background-color: #ffffff;
            padding: 2rem;
            border-radius: 0.75rem;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            border: 1px solid #e5e7eb;
        }

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

        .login-header img {
            margin: 0 auto 1rem;
            width: 5rem;
            height: 5rem;
        }

        .login-header h2 {
            font-size: 1.5rem;
            font-weight: 600;
            color: #1f2937;
        }

        .login-error {
            margin-top: 1rem;
            color: #EF4444;
            text-align: center;
            font-size: 0.875rem;
            display: none;
        }

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

        .form-group label {
            display: block;
            color: #6b7280;
            font-size: 0.875rem;
            font-weight: 500;
            margin-bottom: 0.5rem;
        }

        .input-wrapper {
            position: relative;
        }

        .input-wrapper i {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            color: #9ca3af;
            font-size: 1.125rem;
        }

        .input-wrapper i.left-icon {
            left: 0.75rem;
        }

        .input-wrapper i.right-icon {
            right: 0.75rem;
            cursor: pointer;
            transition: color 0.3s;
        }

        .input-wrapper i.right-icon:hover {
            color: #5C6BC0;
        }

        .remember-forgot {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.875rem;
            margin-bottom: 1rem;
        }

        .remember-me {
            display: flex;
            align-items: center;
            color: #6b7280;
        }

        .remember-me input {
            margin-right: 0.5rem;
            accent-color: #5C6BC0;
        }

        .forgot-password {
            color: #5C6BC0;
            text-decoration: none;
            transition: color 0.3s;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 0.875rem;
        }

        .forgot-password:hover {
            color: #3F51B5;
        }

        /* Turnstile container */
        .turnstile-wrapper {
            margin-top: 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .captcha-error {
            color: #EF4444;
            font-size: 0.75rem;
            margin-top: 0.25rem;
            display: none;
        }

        /* Footer links */
        .login-footer {
            margin-top: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.875rem;
        }

        .login-footer a {
            color: #6b7280;
            text-decoration: none;
            display: flex;
            align-items: center;
            transition: color 0.3s;
        }

        .login-footer a:hover {
            color: #5C6BC0;
        }

        .login-footer a i {
            margin-right: 0.25rem;
        }

        /* Modal overlay */
        .modal-overlay {
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
            position: fixed;
            inset: 0;
            background-color: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 50;
        }

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

        .modal-content {
            transform: scale(0.95);
            opacity: 0;
            transition: transform 0.3s ease, opacity 0.3s ease;
            background-color: #ffffff;
            padding: 2rem;
            border-radius: 0.75rem;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            border: 1px solid #e5e7eb;
            width: 100%;
            max-width: 28rem;
            position: relative;
        }

        .modal-overlay.active .modal-content {
            transform: scale(1);
            opacity: 1;
        }

        .step-transition {
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        .step-hidden {
            opacity: 0;
            transform: translateY(10px);
            pointer-events: none;
            position: absolute;
            inset: 0;
            padding: 2rem;
        }

        .step-visible {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 1.5rem;
        }

        .modal-subtitle {
            color: #6b7280;
            font-size: 0.875rem;
            margin-bottom: 1.5rem;
        }

        .modal-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            color: #9ca3af;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1.5rem;
            transition: color 0.3s;
        }

        .modal-close:hover {
            color: #1f2937;
        }

        .otp-input {
            text-align: center;
            font-size: 1.25rem;
            letter-spacing: 0.25rem;
        }

        .resend-link {
            text-align: center;
            margin-top: 1rem;
        }

        .resend-link p {
            font-size: 0.875rem;
            color: #6b7280;
        }

        .resend-link button {
            color: #5C6BC0;
            background: none;
            border: none;
            cursor: pointer;
            font-weight: 500;
            transition: color 0.3s;
        }

        .resend-link button:hover {
            color: #3F51B5;
        }

        /* Rate limit overlay */
        .rate-limit-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 9998;
        }
        
        .rate-limit-container {
            background: white;
            padding: 40px;
            text-align: center;
            border-radius: 12px;
            max-width: 400px;
            margin: 20px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        }
        
        .countdown-timer {
            font-size: 2rem;
            font-weight: bold;
            color: #ef4444;
            margin: 20px 0;
        }

        @keyframes shake {
            0%, 100% {transform: translateX(0);}
            10%, 30%, 50%, 70%, 90% {transform: translateX(-5px);}
            20%, 40%, 60%, 80% {transform: translateX(5px);}
        }

        .shake {
            animation: shake 0.5s;
        }

        @media (max-width: 640px) {
            .login-footer {
                flex-direction: column;
                gap: 0.75rem;
            }
        }