/* Base Styles */
        :root {
            --primary: #4A007C;
            --secondary: #004080;
            --accent: #4CAF50;
            --text: #333;
            --light: #f9f9f9;
            --white: #ffffff;
            --error: #e74c3c;
            --success: #2ecc71;
            --warning: #f39c12;
            --info: #3498db;
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            color: var(--text);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
            position: relative;
            background: linear-gradient(-45deg, #4A007C, #004080, #2575fc, #4CAF50);
            background-size: 400% 400%;
            animation: gradientBG 15s ease infinite;
        }

        @keyframes gradientBG {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        body.menu-open {
            overflow-y: hidden;
        }

        /* Header Styles */
        .header {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
            padding: 1rem 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 2rem;
            position: relative;
        }

        .logo {
            display: flex;
            align-items: center;
            color: white;
            font-size: 1.8rem;
            font-weight: bold;
            text-decoration: none;
            transition: var(--transition);
        }

        .logo:hover {
            transform: translateY(-2px);
        }

        .logo img {
            height: 50px;
            width: auto;
            margin-right: 0.5rem;
        }

        .logo svg {
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
        }

        /* Main Content */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 2rem 0;
            position: relative;
        }

        /* Auth Container */
        .auth-container {
            position: relative;
            width: 100%;
            max-width: 480px;
            perspective: 1000px;
            margin-bottom: 2rem;
        }

        .auth-card {
            background-color: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            box-shadow: var(--shadow);
            padding: 40px;
            transform-style: preserve-3d;
            transition: transform 0.6s ease-in-out;
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .auth-card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                to bottom right,
                rgba(74, 0, 124, 0.1),
                rgba(0, 64, 128, 0.1),
                rgba(76, 175, 80, 0.1)
            );
            transform: rotate(30deg);
            z-index: -1;
        }

        .auth-card h1 {
            color: var(--primary);
            margin-bottom: 30px;
            font-size: 2.2rem;
            font-weight: 700;
            text-align: center;
            position: relative;
        }

        .auth-card h1::after {
            content: '';
            display: block;
            width: 60px;
            height: 4px;
            background: linear-gradient(to right, var(--primary), var(--accent));
            margin: 10px auto 0;
            border-radius: 2px;
        }

        /* Form Toggle */
        .form-toggle {
            display: flex;
            justify-content: center;
            margin-bottom: 30px;
            border-radius: 50px;
            overflow: hidden;
            background: rgba(0, 0, 0, 0.05);
            padding: 5px;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
        }

        .form-toggle button {
            flex: 1;
            padding: 12px 20px;
            border: none;
            background: transparent;
            color: var(--text);
            font-size: 1.1rem;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            border-radius: 50px;
            outline: none;
        }

        .form-toggle button.active {
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            color: var(--white);
            box-shadow: 0 4px 15px rgba(74, 0, 124, 0.3);
        }

        /* Form Styles */
        .form-group {
            margin-bottom: 25px;
            position: relative;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--text);
            font-size: 0.95rem;
        }

        .form-control {
            width: 100%;
            padding: 15px 20px;
            border: 2px solid rgba(0, 0, 0, 0.1);
            border-radius: 10px;
            font-size: 1rem;
            transition: var(--transition);
            background-color: rgba(255, 255, 255, 0.8);
        }

        .form-control:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px rgba(74, 0, 124, 0.1);
            background-color: var(--white);
        }

        .form-control::placeholder {
            color: rgba(0, 0, 0, 0.4);
        }

        .btn {
            width: 100%;
            padding: 15px;
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            color: var(--white);
            border: none;
            border-radius: 10px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: 0 4px 15px rgba(74, 0, 124, 0.3);
            position: relative;
            overflow: hidden;
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(74, 0, 124, 0.4);
        }

        .btn:active {
            transform: translateY(1px);
        }

        .btn::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, var(--secondary), var(--primary));
            opacity: 0;
            transition: var(--transition);
            z-index: 1;
        }

        .btn:hover::after {
            opacity: 1;
        }

        .btn span {
            position: relative;
            z-index: 2;
        }

        /* Message System */
        .message-container {
            position: fixed;
            top: 20px;
            right: 20px;
            width: 350px;
            max-width: 90%;
            /* Make sure it's higher than the spinner */
            z-index: 1002; 
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .message {
            padding: 18px 20px;
            border-radius: 10px;
            font-weight: 500;
            display: flex;
            align-items: center;
            box-shadow: var(--shadow);
            opacity: 0;
            transform: translateX(100%);
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(5px);
            border-left: 5px solid;
        }

        .message.show {
            opacity: 1;
            transform: translateX(0);
        }

        .message.hide {
            opacity: 0;
            transform: translateX(100%);
        }

        .message.success {
            background-color: rgba(46, 204, 113, 0.9);
            color: white;
            border-left-color: #27ae60;
        }

        .message.error {
            background-color: rgba(231, 76, 60, 0.9);
            color: white;
            border-left-color: #c0392b;
        }

        .message.info {
            background-color: rgba(52, 152, 219, 0.9);
            color: white;
            border-left-color: #2980b9;
        }

        .message.warning {
            background-color: rgba(243, 156, 18, 0.9);
            color: white;
            border-left-color: #d35400;
        }

        .message i {
            margin-right: 12px;
            font-size: 1.4rem;
        }

        .message .close-btn {
            margin-left: auto;
            background: none;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 1rem;
            opacity: 0.8;
            transition: opacity 0.2s;
        }

        .message .close-btn:hover {
            opacity: 1;
        }

        .message::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background-color: rgba(255, 255, 255, 0.3);
            animation: progressBar 5s linear forwards;
        }

        @keyframes progressBar {
            0% { width: 100%; }
            100% { width: 0%; }
        }

        /* Fancy Popups */
        .popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 999;
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
        }

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

        .popup-box {
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
            padding: 40px;
            max-width: 500px;
            width: 90%;
            text-align: center;
            transform: scale(0.8);
            opacity: 0;
            visibility: hidden; /* Ensure it's hidden by default */
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            position: absolute; /* Needed for transform: translate */
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.8); /* Combine centering and initial scale */
            overflow: hidden;
        }

        .popup-box.active { /* Apply when active */
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
            visibility: visible;
        }
        
        /* Ensure only one form is displayed at a time */
        .auth-card form.hidden {
            display: none;
        }

        .popup-box i {
            font-size: 4rem;
            margin-bottom: 20px;
            color: var(--accent);
            text-shadow: 0 3px 10px rgba(46, 204, 113, 0.3);
        }

        .popup-box h2 {
            color: var(--primary);
            margin-bottom: 15px;
            font-size: 2rem;
        }

        .popup-box p {
            color: var(--text);
            margin-bottom: 25px;
            line-height: 1.6;
        }

        .popup-box .btn-group {
            display: flex;
            gap: 15px;
            margin-top: 25px;
        }

        .popup-box .btn-group button {
            flex: 1;
        }

        .popup-box .btn-secondary {
            background: linear-gradient(45deg, #95a5a6, #7f8c8d);
        }

        .popup-box .btn-secondary:hover {
            box-shadow: 0 10px 20px rgba(149, 165, 166, 0.4);
        }

        /* Contact Section */
        .contact-section {
            background-color: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            box-shadow: var(--shadow);
            padding: 40px;
            width: 100%;
            max-width: 600px;
            text-align: center;
            margin-top: 2rem;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .contact-section h2 {
            color: var(--primary);
            margin-bottom: 25px;
            font-size: 2rem;
            position: relative;
        }

        .contact-section h2::after {
            content: '';
            display: block;
            width: 60px;
            height: 4px;
            background: linear-gradient(to right, var(--primary), var(--accent));
            margin: 15px auto 0;
            border-radius: 2px;
        }

        .contact-message {
            color: var(--text);
            font-size: 1.1rem;
            margin-bottom: 30px;
            line-height: 1.6;
        }

        .contact-methods {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-bottom: 30px;
        }

        .contact-item {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            color: var(--text);
            transition: var(--transition);
            padding: 12px 20px;
            border-radius: 10px;
            background-color: rgba(0, 0, 0, 0.03);
        }

        .contact-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            background-color: rgba(74, 0, 124, 0.05);
        }

        .contact-item i {
            color: var(--primary);
            margin-right: 15px;
            font-size: 1.5rem;
            min-width: 30px;
        }

        .contact-item a {
            color: var(--primary);
            text-decoration: none;
            transition: color 0.3s ease;
            font-weight: 500;
        }

        .contact-item a:hover {
            color: var(--accent);
        }

        /* Footer Styles */
        .footer {
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            color: white;
            padding: 3rem 0 1rem;
            margin-top: auto;
        }

        .footer-bottom {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 1rem;
            text-align: center;
            color: #999;
            margin-bottom: 0;
            font-size: 0.9rem;
        }

        .powered-by-aphrodice {
            color: white;
            font-weight: bold;
            background: linear-gradient(45deg, #3498db, #2ecc71);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-fill-color: transparent;
            display: inline-block;
        }

        /* Loading Spinner */
        .spinner-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.9);
            display: flex;
            justify-content: center;
            align-items: center;
            /* Lower than message-container, higher than everything else */
            z-index: 1001; 
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
        }

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

        .spinner {
            width: 70px;
            height: 70px;
            display: inline-block;
            position: relative;
        }

        .spinner::after,
        .spinner::before {
            content: '';  
            box-sizing: border-box;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            border: 3px solid var(--primary);
            position: absolute;
            left: 0;
            top: 0;
            animation: spinner-anim 1.2s linear infinite;
        }

        .spinner::after {
            animation-delay: 0.6s;
            border-color: var(--accent);
        }

        @keyframes spinner-anim {
            0% {
                transform: scale(0);
                opacity: 1;
            }
            100% {
                transform: scale(1);
                opacity: 0;
            }
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .header-content {
                padding: 0 1rem;
            }

            .auth-card, .contact-section {
                padding: 30px;
                margin: 1rem;
                width: calc(100% - 2rem);
            }

            .auth-card h1, .contact-section h2 {
                font-size: 1.8rem;
            }

            .form-toggle button {
                padding: 10px 15px;
                font-size: 1rem;
            }

            .form-control {
                padding: 13px 15px;
            }

            .btn {
                padding: 13px;
            }

            .message-container {
                width: 90%;
                right: 5%;
            }

            .popup-box {
                padding: 30px 20px;
            }

            .popup-box i {
                font-size: 3rem;
            }

            .popup-box h2 {
                font-size: 1.6rem;
            }
        }

        @media (max-width: 480px) {
            .logo {
                font-size: 1.4rem;
            }

            .logo svg {
                width: 40px;
                height: 40px;
            }

            .auth-card, .contact-section {
                padding: 25px 20px;
            }

            .auth-card h1, .contact-section h2 {
                font-size: 1.6rem;
            }

            .form-toggle {
                margin-bottom: 20px;
            }

            .form-toggle button {
                padding: 8px 12px;
                font-size: 0.9rem;
            }

            .form-group {
                margin-bottom: 20px;
            }

            .form-control {
                padding: 12px;
                font-size: 0.95rem;
            }

            .btn {
                padding: 12px;
                font-size: 1rem;
            }

            .contact-item {
                font-size: 1rem;
                padding: 10px 15px;
            }

            .contact-item i {
                font-size: 1.3rem;
            }

            .popup-box .btn-group {
                flex-direction: column;
                gap: 10px;
            }
        }
