:root {
    --primary: #4361ee;
    --secondary: #6ba9e0;
    --accent: #7209b7;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #fca311;
    --gray: #f9f9f9;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 15px;
}

html[data-theme='dark'] body {
    background: linear-gradient(135deg, #0b1220 0%, #111827 100%);
}

.container {
    display: flex;
    max-width: 750px;
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    min-height: 320px;
}

html[data-theme='dark'] .container {
    background: #0f172a;
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.5);
}

.form-section {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--light);
}

html[data-theme='dark'] .form-section {
    background: #111827;
}

.animation-section {
    flex: 1;
    background: linear-gradient(135deg, #0b3b8d 0%, #0f2f6b 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 25px;
    color: white;
    position: relative;
    overflow: hidden;
}

.animation-section::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.animation-section::after {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    bottom: -70px;
    left: -70px;
}

.animation-content {
    text-align: center;
    max-width: 350px;
    z-index: 2;
}

.animation-title {
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.animation-description {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
    opacity: 0.9;
}

.animation-section .animation-title,
.animation-section .animation-description {
    color: #ffffff;
}

.animation-container {
    width: 100%;
    height: 200px;
    position: relative;
    margin: 18px 0;
}

/* Animation elements for different user types */
.animation-element {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.animation-element.active {
    opacity: 1;
}

/* Customer Animation */
.customer-animation {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(5px);
}

.shop-icon, .order-icon, .customer-icon {
    position: absolute;
    background: white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 18px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.shop-icon:hover, .order-icon:hover, .customer-icon:hover {
    transform: translateY(-5px);
}

.shop-icon {
    top: 50px;
    left: 70px;
    animation: float 4s ease-in-out infinite;
}

.order-icon {
    top: 50px;
    right: 70px;
    animation: float 4s ease-in-out infinite 0.5s;
}

.customer-icon {
    bottom: 62px;
    animation: float 4s ease-in-out infinite 1s;
}

/* Company Owner Animation */
.company-animation {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(5px);
}

.inventory-icon, .employee-icon, .orders-icon {
    position: absolute;
    background: white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 18px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.inventory-icon:hover, .employee-icon:hover {
    transform: translateY(-6px);
}

.orders-icon:hover {
    transform: translateX(-50%) translateY(-6px);
}

.inventory-icon {
    top: 50px;
    left: 88px;
    animation: laneTopBreath 3.8s ease-in-out infinite;
}

.employee-icon {
    top: 50px;
    right: 88px;
    animation: laneTopBreath 3.8s ease-in-out infinite 0.35s;
}

.orders-icon {
    bottom: 62px;
    left: 50%;
    transform: translateX(-50%);
    animation: laneCenterRise 3.8s ease-in-out infinite 0.7s;
}

/* Delivery Man Animation */
.delivery-animation {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(5px);
}

.delivery-man {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 22px;
    animation: moveDelivery 6s linear infinite;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.package {
    position: absolute;
    width: 35px;
    height: 35px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 16px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.package:hover {
    transform: rotate(10deg);
}

.package-1 {
    top: 60px;
    left: 90px;
    animation: pulse 2s ease-in-out infinite;
}

.package-2 {
    top: 60px;
    right: 90px;
    animation: pulse 2s ease-in-out infinite 0.5s;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(3deg); }
    66% { transform: translateY(5px) rotate(-3deg); }
}

@keyframes laneTopBreath {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

@keyframes laneCenterRise {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-16px); }
}

@keyframes moveDelivery {
    0% { left: 20%; }
    50% { left: 80%; }
    100% { left: 20%; }
}

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

/* Form Styling */
.main-content {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.cube-container {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cube {
    width: 100%;
    height: 380px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    backface-visibility: hidden;
}

html[data-theme='dark'] .face {
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.45);
}

.front {
    transform: rotateY(0deg) translateZ(0);
}

.back {
    transform: rotateY(180deg) translateZ(0);
}

h2 {
    color: var(--dark);
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
}

html[data-theme='dark'] h2 {
    color: #e2e8f0;
}

.input-group {
    position: relative;
    margin-bottom: 12px;
    width: 100%;
}

input {
    width: 100%;
    padding: 7px 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 12px;
    transition: var(--transition);
    background: #f8f9fa;
}

input::placeholder {
    font-size: 11px;
}

html[data-theme='dark'] input {
    background: #111827;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-theme='dark'] input::placeholder {
    font-size: 11px;
}

input:focus {
    border-color: var(--primary);
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

html[data-theme='dark'] input:focus {
    background: #0f172a;
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.btn-primary {
    padding: 8px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 8px;
    width: 100%;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 3px 8px rgba(67, 97, 238, 0.25);
}

.btn-google-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid #e6e6e6;
    background: #fff;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin: 5px 0 3px;
    transition: var(--transition);
}

html[data-theme='dark'] .btn-google-full {
    background: #111827;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-theme='dark'] .btn-google-full:hover {
    background: #1e293b;
    border-color: #475569;
}

.btn-google-full:hover {
    background: #f5f5f5;
    border-color: #dcdcdc;
}

.btn-primary:hover {
    background: var(--secondary);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
    transform: translateY(-2px);
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    padding: 5px;
    transition: var(--transition);
}

html[data-theme='dark'] .btn-text {
    color: #93c5fd;
}

.btn-text:hover {
    color: var(--secondary);
    text-decoration: underline;
}

p {
    margin-top: 10px;
    color: var(--gray);
    text-align: center;
    font-size: 12px;
}

html[data-theme='dark'] p {
    color: #cbd5e1;
}

.cube.rotated {
    transform: rotateY(180deg);
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    align-self: flex-end;
    margin: 3px 0 10px;
    transition: var(--transition);
}

html[data-theme='dark'] .forgot-password {
    color: #93c5fd;
}

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

.password-container {
    position: relative;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
    z-index: 2; /* Ensure it's above the input */
    background: rgba(39, 19, 195, 0.8);
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
}

.toggle-password i {
    font-size: 14px;
}

/* Adjust input padding to make room for the eye icon */
.password-container input {
    padding-right: 36px; /* Space for the eye icon */
}

/* Ensure the email validation icon doesn't conflict with password toggle */
.input-group:not(.password-container) .email-validation-icon {
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    min-height: 16px;
    line-height: 1;
    pointer-events: none;
}

/* Specific styles for confirm password container when visible */
.confirm-password-container.visible {
    max-height: 100px;
    opacity: 1;
    margin-bottom: 20px;
}

.email-validation-icon {
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    min-height: 16px;
    line-height: 1;
    pointer-events: none;
}

.confirm-password-container {
    transition: all 0.5s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.confirm-password-container.visible {
    max-height: 100px;
    opacity: 1;
}

.user-type-tabs {
    display: flex;
    margin-bottom: 25px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    background: #f8f9fa;
}

.user-type-tab {
    flex: 1;
    padding: 12px;
    background-color: #f8f9fa;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
}

.user-type-tab.active {
    background-color: var(--primary);
    color: white;
}

.user-type-tab:hover:not(.active) {
    background-color: #e9ecef;
    color: var(--dark);
}

.signup-methods-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 6px 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.signup-methods-divider::before,
.signup-methods-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #d9e1ef;
}

.signup-methods-divider span {
    white-space: nowrap;
}

.signup-methods {
    display: flex;
    gap: 6px;
    margin: 0 auto 8px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 220px;
}

.method-btn-icon {
    width: 90px;
    min-width: 90px;
    height: 34px;
    padding: 0 9px;
    border: 2px solid #d3deee;
    background: #f8fbff;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: #666;
}

.method-btn-icon i {
    font-size: 14px;
}

.method-btn-text {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

html[data-theme='dark'] .signup-methods-divider {
    color: #94a3b8;
}

html[data-theme='dark'] .signup-methods-divider::before,
html[data-theme='dark'] .signup-methods-divider::after {
    background: #334155;
}

html[data-theme='dark'] .method-btn-icon {
    background: #111827;
    border-color: #334155;
    color: #cbd5e1;
}

.method-btn-icon:hover {
    border-color: #1d4ed8;
    color: #1d4ed8;
    background: #eef4ff;
    transform: translateY(-1px);
}

.method-btn-icon.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    color: #fff;
    border-color: #1e3a8a;
    box-shadow: 0 6px 14px rgba(30, 58, 138, 0.35);
}

.method-btn-icon:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.25);
}

html[data-theme='dark'] .animation-section {
    background: linear-gradient(135deg, #082a67 0%, #0a1e47 100%);
}

html[data-theme='dark'] .method-btn-icon {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

html[data-theme='dark'] .method-btn-icon:hover {
    border-color: #60a5fa;
    color: #93c5fd;
    background: #1e293b;
    transform: translateY(-1px);
}

html[data-theme='dark'] .method-btn-icon.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    border-color: #2563eb;
    color: #ffffff;
}

.error-message {
    color: var(--danger);
    font-size: 12px;
    margin-top: 3px;
    display: none;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    display: none;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    
    /* Vendor prefixes for background-clip */
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
    
    /* Vendor prefixes for text color transparency */
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
    color: transparent;
}

/* Fix for the invisible text in form sections */
.form-section p:not(.user-type-tabs *) {
    color: #666;
}

/* Ensure the animation section text remains white */
.animation-section p {
    color: white;
}

/* Fix for user type tabs text color */
.user-type-tab {
    color: #555 !important;
}

.user-type-tab.active {
    color: white !important;
}

.user-type-tab:hover:not(.active) {
    color: #333 !important;
}

/* Responsive design */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
        max-width: 500px;
    }
    
    .animation-section {
        order: -1;
        padding: 30px 20px;
        min-height: 300px;
    }
    
    .animation-container {
        height: 200px;
    }
    
    .form-section {
        padding: 30px;
    }
    
    .shop-icon, .order-icon, .customer-icon,
    .inventory-icon, .employee-icon, .orders-icon {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .shop-icon,
    .inventory-icon {
        left: 50px;
    }

    .order-icon,
    .employee-icon {
        right: 50px;
    }

    .customer-icon,
    .orders-icon {
        bottom: 45px;
    }
    
    .delivery-man {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .package {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 15px;
    }
    
    .container {
        border-radius: 15px;
    }
    
    .form-section {
        padding: 25px;
    }
    
    .face {
        padding: 20px;
    }
    
    h2 {
        font-size: 18px;
        margin-top: 4px;
        margin-bottom: 8px;
    }
    
    input {
        padding: 12px;
    }
    
    .btn-primary {
        padding: 12px;
    }

    .shop-icon,
    .inventory-icon {
        left: 32px;
    }

    .order-icon,
    .employee-icon {
        right: 32px;
    }

    .customer-icon,
    .orders-icon {
        bottom: 35px;
    }
}

.signup-methods > .method-btn-icon:nth-child(3) {
    flex: 0 0 100%;
    width: 90px;
    min-width: 90px;
    max-width: 90px;
}

.face.back {
    padding-top: 14px;
    padding-bottom: 14px;
}

.face.back h2 {
    margin-bottom: 8px;
}

.face.back p {
    margin-top: 6px;
}