:root {
    --primary: #4CAF50;
    --secondary: #333333;
    --accent: #ffffff;
    --gray-light: #f5f5f5;
    --gray: #888888;
    --gray-dark: #444444;
    --success: #4CAF50;
    --error: #F44336;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f0f0f0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Animation */
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.1);
    animation: float 15s infinite linear;
}

/* Car Animation */
.car-container {
    position: absolute;
    bottom: 50px;
    left: -250px;
    width: 200px;
    height: 100px;
    animation: driveCar 20s linear infinite;
    z-index: 0;
}

.car-body {
    position: absolute;
    bottom: 15px;
    width: 100%;
    height: 40px;
    background: #4CAF50;
    border-radius: 15px;
}

.car-top {
    position: absolute;
    bottom: 55px;
    left: 30px;
    width: 100px;
    height: 35px;
    background: #4CAF50;
    border-radius: 15px 15px 0 0;
}

.car-window {
    position: absolute;
    bottom: 65px;
    left: 45px;
    width: 70px;
    height: 25px;
    background: #d9f7da;
    border-radius: 8px 8px 0 0;
}

.car-light-front {
    position: absolute;
    bottom: 25px;
    right: 0;
    width: 12px;
    height: 12px;
    background: #ffeb3b;
    border-radius: 50%;
    box-shadow: 0 0 15px 5px rgba(255, 235, 59, 0.7);
}

.car-light-back {
    position: absolute;
    bottom: 25px;
    left: 8px;
    width: 12px;
    height: 12px;
    background: #f44336;
    border-radius: 50%;
}

.car-wheel {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #333;
    border-radius: 50%;
    bottom: 0;
    border: 4px solid #777;
    animation: wheelRotate 1.5s linear infinite;
}

.car-wheel-front {
    right: 25px;
}

.car-wheel-back {
    left: 25px;
}

.car-passengers {
    position: absolute;
    bottom: 60px;
    left: 45px;
    width: 70px;
    height: 15px;
    display: flex;
    justify-content: space-around;
}

.car-passenger {
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    position: relative;
}

/* Car color variations */
.car-blue .car-body, .car-blue .car-top {
    background: #2196F3;
}
.car-blue .car-window {
    background: #BBDEFB;
}

.car-red .car-body, .car-red .car-top {
    background: #F44336;
}
.car-red .car-window {
    background: #FFCDD2;
}

.car-yellow .car-body, .car-yellow .car-top {
    background: #FFC107;
}
.car-yellow .car-window {
    background: #FFF9C4;
}

.car-purple .car-body, .car-purple .car-top {
    background: #9C27B0;
}
.car-purple .car-window {
    background: #E1BEE7;
}

@keyframes driveCar {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(100vw + 250px));
    }
}

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

/* Container */
.container {
    display: flex;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    max-height: 800px;
    position: relative;
    z-index: 1;
}

/* Card */
.card {
    background: var(--accent);
    border-radius: 20px;
    box-shadow: 0 15px 35px -12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    display: flex;
    position: relative;
}

/* Left Panel */
.left-panel {
    flex: 1;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 49%, rgba(255, 255, 255, 0.05) 50%, transparent 51%);
    background-size: 20px 20px;
    opacity: 0.3;
}

.brand {
    position: relative;
    z-index: 1;
}

.brand h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
    background: linear-gradient(to right, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 80%;
    line-height: 1.6;
    margin-bottom: 40px;
}

.features {
    position: relative;
    z-index: 1;
}

.feature {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    transform: translateX(0);
    transition: transform 0.5s ease;
}

.feature:hover {
    transform: translateX(10px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-text h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.feature-text p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
}

/* Right Panel */
.right-panel {
    flex: 1.2;
    padding: 60px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray) transparent;
}

.right-panel::-webkit-scrollbar {
    width: 6px;
}

.right-panel::-webkit-scrollbar-track {
    background: transparent;
}

.right-panel::-webkit-scrollbar-thumb {
    background-color: var(--gray);
    border-radius: 6px;
}

/* Auth Toggle */
.auth-toggle {
    display: flex;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-light);
    position: relative;
    z-index: 1;
}

.auth-toggle-btn {
    flex: 1;
    padding: 15px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--gray);
    position: relative;
    z-index: 2;
}

.auth-toggle-btn.active {
    color: white;
}

.auth-toggle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: var(--primary);
    transition: var(--transition);
    z-index: 1;
    border-radius: 10px;
}

.auth-toggle.login::after {
    left: 50%;
}

/* Form Header */
.form-header {
    margin-bottom: 40px;
    text-align: center;
}

.form-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.form-header p {
    color: var(--gray);
    font-size: 1.1rem;
}

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

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

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 50px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

input, select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--gray-light);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

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

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* Button Styles */
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Google Sign In */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    border: 2px solid var(--gray-light);
    padding: 15px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 30px;
    color: var(--secondary);
}

.google-btn:hover {
    background: var(--gray-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.or-divider {
    text-align: center;
    position: relative;
    margin: 30px 0;
    color: var(--gray);
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--gray-light);
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

/* Account Link */
.account-link {
    text-align: center;
    margin-top: 30px;
    color: var(--gray);
}

.account-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.account-link a:hover {
    text-decoration: underline;
}

/* Success Message */
.success-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    border-radius: 20px;
}

.success-message.show {
    opacity: 1;
    pointer-events: all;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    color: white;
    font-size: 50px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

.success-message h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.success-message p {
    color: var(--gray);
    margin-bottom: 40px;
    text-align: center;
    max-width: 80%;
    line-height: 1.6;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
    opacity: 0;
}

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

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Form Display Toggle */
#login-form {
    display: none;
}

#login-header {
    display: none;
}

/* Responsive Styles */
@media (max-width: 1100px) {
    .left-panel {
        padding: 40px;
    }
    
    .right-panel {
        padding: 40px;
    }
}

@media (max-width: 900px) {
    .container {
        height: auto;
        max-height: none;
    }

    .card {
        flex-direction: column;
    }

    .left-panel {
        padding: 40px;
        clip-path: none;
        max-height: 300px;
    }

    .brand h1 {
        font-size: 2.5rem;
    }

    .features {
        display: none;
    }
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .right-panel {
        padding: 30px 20px;
    }
    
    .form-header h2 {
        font-size: 2rem;
    }
}