* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

h1 {
    font-weight: bold;
    margin: 0;
    font-size: 32px;
    color: #333;
}

p {
    font-size: 16px;
    margin: 20px 0 30px;
    line-height: 1.4;
}

span {
    font-size: 12px;
    color: #666;
}

a {
    color: #4A00E0;
    font-size: 12px;
    text-decoration: none;
    margin: 15px 0;
    transition: color 0.3s ease;
}

a:hover {
    color: #6a1b9a;
    text-decoration: underline;
}

button {
    border-radius: 50px;
    border: 1px solid #4A00E0;
    background: linear-gradient(45deg, #4A00E0, #8E2DE2);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: bold;
    padding: 12px 45px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(74, 0, 224, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 0, 224, 0.4);
}

button:active {
    transform: scale(0.98);
}

button:focus {
    outline: none;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

button.ghost {
    background: transparent;
    border-color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

button.ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

form {
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.input-group {
    display: flex;
    width: 100%;
    gap: 10px;
}

.input-group input {
    flex: 1;
}

input {
    background-color: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 25px;
    padding: 12px 20px;
    margin: 8px 0;
    width: 100%;
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #4A00E0;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(74, 0, 224, 0.1);
}

input:valid {
    border-color: #4caf50;
}

input:invalid:not(:placeholder-shown) {
    border-color: #f44336;
}

.container {
    background-color: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    width: 900px;
    max-width: 100%;
    min-height: 550px;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show {
    0%, 49.99% {
        opacity: 0;
        z-index: 1;
    }
    
    50%, 100% {
        opacity: 1;
        z-index: 5;
    }
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-left {
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

.social-container {
    margin: 20px 0;
}

.social-container i {
    font-size: 20px;
}

.social-container a {
    border: 1px solid #DDDDDD;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    height: 40px;
    width: 40px;
    transition: all 0.3s ease;
}

.social-container a:hover {
    background-color: #4A00E0;
    border-color: #4A00E0;
    color: white;
    transform: translateY(-2px);
}

/* Message styles */
.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    text-align: center;
    min-height: 20px;
    transition: all 0.3s ease;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4A00E0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-overlay p {
    color: white;
    font-size: 16px;
    margin: 0;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .container {
        width: 95%;
        min-height: 500px;
    }
    
    form {
        padding: 0 30px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 0;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .overlay-panel {
        padding: 0 20px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }
    
    form {
        padding: 0 20px;
    }
    
    .form-container {
        width: 100% !important;
    }
    
    .sign-in-container,
    .sign-up-container {
        width: 100% !important;
        left: 0 !important;
    }
    
    .overlay-container {
        display: none;
    }
    
    .container.right-panel-active .sign-in-container {
        transform: translateX(-100%);
    }
    
    .container.right-panel-active .sign-up-container {
        transform: translateX(0);
    }
}

/* Additional animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #4A00E0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8E2DE2;
}
