:root {
    --primary-color: #E3057A;
    --primary-dark: #B0045F;
    --secondary-color: #6c757d;
    --success-color: #48bb78;
    --error-color: #f56565;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Google Sans Flex', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

.split-screen {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Left Pane Styles */
.left-pane {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    /* Add a slight zoom animation */
    animation: zoomIn 20s infinite alternate;
}

@keyframes zoomIn {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(227, 5, 122, 0.9), rgba(176, 4, 95, 0.8));
    z-index: -1;
}

.brand-content {
    text-align: center;
    z-index: 1;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.brand-logo-circle {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.brand-logo-circle i {
    font-size: 2.5rem;
    color: var(--white);
}

.brand-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.brand-content .tagline {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 400px;
    margin: 0 auto;
}

.legal-disclaimer {
    position: absolute;
    bottom: 120px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 2;
    animation: fadeInUp 1.2s ease-out;
}

.privacy-link {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Google Sans Flex', sans-serif;
}

.privacy-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.privacy-link i {
    font-size: 1rem;
}

/* Modal Styles */
dialog.privacy-modal {
    border: none;
    border-radius: 16px;
    padding: 0;
    background: transparent;
    max-width: 600px;
    width: 90%;
    margin: auto;
    box-shadow: var(--shadow-lg);
}

dialog.privacy-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

dialog.privacy-modal[open]::backdrop {
    opacity: 1;
}

.modal-wrapper {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

dialog.privacy-modal.open .modal-wrapper {
    opacity: 1;
    transform: scale(1) translateY(0);
}

dialog.privacy-modal.close .modal-wrapper {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
}

.modal-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

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

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
    color: var(--text-color);
}

.term-section {
    margin-bottom: 1.5rem;
}

.term-section:last-child {
    margin-bottom: 0;
}

.term-section h3 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.term-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.term-section ul {
    list-style: none;
    padding-left: 1rem;
}

.term-section ul li {
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 15px;
}

.term-section ul li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.modal-footer {
    padding: 1rem 2rem;
    background: var(--bg-light);
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: flex-end;
}

.btn-accept {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-accept:hover {
    background: var(--primary-dark);
}

/* Waves Animation */
.waves-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 0;
}

.waves {
    position: relative;
    width: 100%;
    height: 100px;
    margin-bottom: -7px; /* Fix for gaps */
    min-height: 100px;
    max-height: 150px;
}

.parallax > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}
.parallax > use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}
.parallax > use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}
.parallax > use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}
@keyframes move-forever {
    0% { transform: translate3d(-90px,0,0); }
    100% { transform: translate3d(85px,0,0); }
}

/* Right Pane Styles */
.right-pane {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    position: relative;
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
    padding: 3rem;
    animation: fadeIn 1s ease-out;
}

.mobile-header {
    display: none;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.form-header {
    margin-bottom: 2.5rem;
    text-align: left;
}

.form-header h3 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Form Styles */
.modern-form .input-group {
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.icon-wrapper {
    width: 40px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.1rem;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 0.5rem;
    font-size: 1rem;
    color: var(--text-color);
    border: none;
    border-bottom: 2px solid #e2e8f0;
    outline: none;
    background: transparent;
    transition: border-color 0.3s;
    font-family: inherit;
}

.input-wrapper input:focus {
    border-bottom-color: var(--primary-color);
}

.input-wrapper label {
    position: absolute;
    top: 1rem;
    left: 0.5rem;
    color: var(--text-light);
    pointer-events: none;
    transition: 0.3s ease all;
    font-size: 1rem;
}

.input-wrapper input:focus ~ label,
.input-wrapper input:not(:placeholder-shown) ~ label {
    top: -0.5rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
}

.toggle-password {
    position: absolute;
    right: 0;
    top: 1rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s;
}

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

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.error-message {
    background-color: #fff5f5;
    color: var(--error-color);
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid #feb2b2;
}

.error-message.show {
    display: flex;
    animation: shake 0.5s;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

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

    .left-pane {
        flex: 0 0 35%; /* Take up top 35% of screen */
        min-height: 250px;
    }

    .brand-content {
        padding: 1rem;
    }

    .brand-logo-circle {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .brand-logo-circle i {
        font-size: 1.8rem;
    }

    .brand-content h1 {
        font-size: 2rem;
    }

    .brand-content .tagline {
        font-size: 1rem;
        display: none; /* Hide tagline on small screens to save space */
    }

    .right-pane {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center; /* Align to center horizontally */
        justify-content: flex-start;
        background: var(--white);
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        margin-top: -40px; /* Overlap slightly */
        z-index: 10;
        padding-top: 1rem;
    }

    .login-wrapper {
        padding: 1.5rem;
        max-width: 100%;
    }

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

    .waves-container {
        display: none; /* Hide waves on mobile for cleaner look or adjust height */
    }
}

/* Utility Classes */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-footer {
        text-align: center;
        padding: 1rem;
        margin-top: auto;
        width: 100%;
    }

    .privacy-link-mobile {
        background: transparent;
        border: 1px solid #cbd5e0;
        color: var(--text-light);
        padding: 0.6rem 1.2rem;
        border-radius: 50px;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Google Sans Flex', sans-serif;
}    .privacy-link-mobile:hover {
        background: var(--bg-light);
        color: var(--primary-color);
        border-color: var(--primary-color);
    }

    .powered-by-mobile {
        color: var(--text-light);
        font-size: 0.8rem;
        margin-top: 1rem;
        opacity: 0.8;
    }
}

/* Logo Animation */
.logo-svg {
    width: 60%;
    height: 60%;
    /* Initial fill animation */
    -webkit-mask-image: linear-gradient(to top, black 50%, transparent 60%);
    mask-image: linear-gradient(to top, black 50%, transparent 60%);
    -webkit-mask-size: 100% 250%;
    mask-size: 100% 250%;
    -webkit-mask-position: 0 100%;
    mask-position: 0 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    
    /* Combine animations: fillUp runs once, rotateStep runs infinitely after a delay */
    animation: fillUp 2.5s ease-out forwards, rotateStep 40s ease-in-out 2.5s infinite;
}

@keyframes fillUp {
    0% { 
        -webkit-mask-position: 0 0%; 
        mask-position: 0 0%;
    }
    100% { 
        -webkit-mask-position: 0 100%; 
        mask-position: 0 100%;
    }
}

@keyframes rotateStep {
    0% { transform: rotate(0deg); }
    22.5% { transform: rotate(0deg); } /* Hold 0deg for ~9s */
    25% { transform: rotate(90deg); } /* Rotate to 90deg over ~1s */
    47.5% { transform: rotate(90deg); } /* Hold 90deg */
    50% { transform: rotate(180deg); } /* Rotate to 180deg */
    72.5% { transform: rotate(180deg); } /* Hold 180deg */
    75% { transform: rotate(270deg); } /* Rotate to 270deg */
    97.5% { transform: rotate(270deg); } /* Hold 270deg */
    100% { transform: rotate(360deg); } /* Rotate to 360deg */
}
