/* ===== FIXED CSS - FULL CONTENT VISIBLE ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Main container */
.container {
    width: 100%;
    max-width: 900px;
    perspective: 1000px;
}

.forms-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 30px;
    position: relative;
    border: 1px solid rgba(222, 226, 230, 0.5);
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.toggle-bg {
    position: absolute;
    top: 6px;
    left: 6px;
    height: calc(100% - 12px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.toggle-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
    border-radius: 12px;
}

.toggle-btn.active {
    color: #667eea;
}

/* Forms Wrapper - FIXED HEIGHT */
.forms-wrapper {
    position: relative;
    overflow: visible; /* Changed from hidden */
    border-radius: 16px;
    height: auto; /* Changed from fixed height */
    min-height: 500px;
}

.form-slider {
    display: flex;
    width: 200%;
    height: auto; /* Changed from 100% */
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form Panels */
.form-panel {
    width: 50%;
    padding: 20px;
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Form Content - FIXED */
.form-content {
    max-width: 400px;
    margin: 0 auto;
    padding: 10px 0;
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.form-subtitle {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 14px;
    text-align: center;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 15px; /* Reduced spacing */
}

.name-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px; /* Reduced gap */
    margin-bottom: 15px;
}

.input-group input {
    width: 100%;
    padding: 14px 20px 14px 45px; /* Reduced padding */
    font-size: 14px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
    color: #212529;
    outline: none;
}

.input-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #6c757d;
    transition: color 0.3s ease;
}

.icon {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #495057;
    font-size: 13px;
    margin: 0;
}

.checkbox input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.checkbox.terms {
    margin-bottom: 20px;
    font-size: 13px;
}

.checkbox.terms a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.arrow {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #adb5bd;
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.divider span {
    padding: 0 12px;
}

/* Social Login */
.social-login {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.social-btn {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.social-btn:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.social-icon {
    width: 18px;
    height: 18px;
}

/* Login Link */
.login-link {
    text-align: center;
    color: #6c757d;
    margin-top: 20px;
    font-size: 14px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.switch-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.switch-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .forms-container {
        padding: 25px 20px;
        margin: 15px;
    }
    
    .forms-wrapper {
        min-height: auto;
    }
    
    .name-group {
        grid-template-columns: 1fr;
    }
    
    .form-title {
        font-size: 24px;
    }
    
    .toggle-switch {
        max-width: 280px;
        margin-bottom: 25px;
    }
    
    .toggle-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .form-content {
        padding: 5px 0;
    }
}

/* Mobile specific fixes */
@media (max-width: 480px) {
    .forms-container {
        padding: 20px 15px;
    }
    
    .form-panel {
        padding: 10px;
    }
    
    .input-group input {
        padding: 12px 15px 12px 40px;
        font-size: 13px;
    }
    
    .input-icon {
        left: 12px;
        width: 16px;
        height: 16px;
    }
    
    .submit-btn {
        padding: 13px;
        font-size: 14px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Ensure all content fits */
#signup-panel .form-content {
    padding-bottom: 20px;
}

/* Add smooth scroll for very small screens */
@media (max-height: 700px) {
    .forms-wrapper {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .form-slider {
        height: auto;
    }
}

/* Remove unnecessary animations */
.forms-container {
    animation: none;
}

/* Ensure form panels don't overlap */
.form-panel {
    flex-shrink: 0;
}

/* Fix for very long forms */
#signup-panel {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

    .error-popup {
        position: fixed;
        top: 20px;
        right: 20px;
        background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
        color: white;
        padding: 15px 25px;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(245, 101, 101, 0.3);
        z-index: 1000;
        display: flex;
        align-items: center;
        gap: 10px;
        animation: slideInRight 0.5s ease-out, fadeOut 0.5s ease-out 3.5s forwards;
        max-width: 350px;
    }
    
    .error-popup .icon {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }
    
    .error-popup .message {
        font-weight: 500;
        font-size: 14px;
    }
    
    .error-popup .close-btn {
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        font-size: 18px;
        margin-left: auto;
        padding: 0;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
    
    @keyframes fadeOut {
        to {
            opacity: 0;
            transform: translateX(100%);
        }
    }
    
    /* Overlay background when error shows */
    .error-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
        z-index: 999;
        animation: fadeIn 0.3s ease-out;
        display: none;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    /* Modal style error */
    .error-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        background: white;
        padding: 30px;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        max-width: 400px;
        width: 90%;
        text-align: center;
        animation: modalAppear 0.4s ease-out forwards;
        display: none;
    }
    
    @keyframes modalAppear {
        to {
            transform: translate(-50%, -50%) scale(1);
        }
    }
    
    .error-modal .icon-container {
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 20px;
    }
    
    .error-modal .icon-container svg {
        width: 30px;
        height: 30px;
        fill: white;
    }
    
    .error-modal h3 {
        color: #2d3748;
        margin-bottom: 10px;
        font-size: 22px;
    }
    
    .error-modal p {
        color: #718096;
        margin-bottom: 25px;
        line-height: 1.5;
    }
    
    .error-modal button {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        padding: 12px 30px;
        border-radius: 10px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .error-modal button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    }