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

:root {
    --primary: #667eea;
    --primary-dark: #5a6fd8;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --dark: #1f2937;
    --darker: #111827;
    --light: #f9fafb;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
}

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

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 40px 30px 30px;
    text-align: center;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 3rem;
    margin-bottom: 5px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo p {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}

.auth-container {
    padding: 30px;
}

.tabs {
    display: flex;
    background: var(--gray-light);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray);
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

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

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--dark);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 0 8px;
    color: var(--gray);
    font-size: 0.95rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label,
.input-group select:valid ~ label {
    top: 0;
    font-size: 0.8rem;
    color: var(--primary);
    transform: translateY(-50%);
}

.input-group input::placeholder,
.input-group select::placeholder {
    color: transparent;
}

.input-group input:focus::placeholder {
    color: var(--gray-light);
}

.submit-btn {
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.form-links {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-top: 20px;
}

.form-links a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.form-links a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 2px;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.4;
}

.checkbox-group a {
    color: var(--primary);
    text-decoration: none;
}

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

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--error);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border-left: 4px solid var(--error);
}

.error-message p {
    margin: 2px 0;
}

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

.strength-bar {
    height: 4px;
    background: var(--gray-light);
    border-radius: 2px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--gray);
}

.password-match {
    margin-top: 8px;
    font-size: 0.8rem;
}

.match-text {
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.strength-weak { background: var(--error); width: 25%; }
.strength-fair { background: var(--warning); width: 50%; }
.strength-good { background: #f59e0b; width: 75%; }
.strength-strong { background: var(--success); width: 100%; }

.match-success { color: var(--success); background: #d1fae5; }
.match-error { color: var(--error); background: #fee2e2; }

.footer {
    background: var(--light);
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid var(--gray-light);
}

.footer p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        border-radius: 12px;
    }
    
    .header {
        padding: 30px 20px 25px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .auth-container {
        padding: 25px 20px;
    }
    
    .tabs {
        margin-bottom: 25px;
    }
    
    .tab-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .form-links {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer {
        padding: 15px 20px;
    }
    
    .footer-links {
        gap: 15px;
    }
}