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

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

.auth-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 550px;
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

/* .auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
} */

.auth-header {
    text-align: center;
    margin-bottom: 15px;
}

.auth-header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-header p {
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
}

.auth-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 15px;
    position: relative;
}

.toggle-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

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

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    transition: transform 0.3s ease;
    z-index: 1;
}

.toggle-slider.register {
    transform: translateX(100%);
}

.form-container {
    position: relative;
    overflow: hidden;
}

.form-panel {
    transition: all 0.4s ease;
    opacity: 1;
    transform: translateX(0);
}

.form-panel.hidden {
    opacity: 0;
    transform: translateX(-20px);
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.form-group {
    margin-bottom: 15px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.form-group input.success {
    border-color: #27ae60;
    background-color: #f2fdf2;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 38px;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    user-select: none;
}

.password-strength {
    margin-top: 8px;
    font-size: 12px;
}

.strength-bar {
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    margin: 5px 0;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak {
    background: #e74c3c;
    width: 25%;
}

.strength-fair {
    background: #f39c12;
    width: 50%;
}

.strength-good {
    background: #f1c40f;
    width: 75%;
}

.strength-strong {
    background: #27ae60;
    width: 100%;
}

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

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

.checkbox-group {
    display: flex;
    align-items: center;
    padding: 0 4px;
    gap: 22px;
    margin-bottom: 15px;
}

.checkbox-group input[type='checkbox'] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

.checkbox-group label {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    cursor: pointer;
}

.checkbox-group a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    color: #666;
    font-size: 14px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
    z-index: 1;
}

.divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.google-btn {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.google-btn:hover {
    border-color: #4285f4;
    box-shadow: 0 2px 10px rgba(66, 133, 244, 0.2);
}

.google-icon {
    width: 20px;
    height: 20px;
}

.forgot-password {
    text-align: center;
    margin-top: 20px;
}

.forgot-password a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-password a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
        margin: 10px;
        min-height: 550px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

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

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    display: none;
    text-align: center;
}

.success-message.show {
    display: block;
}

/* Animation for form switching */
.form-panel {
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}
