:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --accent: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --gray: #6c757d;
    --gray-light: #ced4da;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    line-height: 1.5;
    color: var(--dark);
}

.container {
    display: flex;
    max-width: 380px;
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.illustration-section {
    display: none;
}

.form-section {
    flex: 1;
    padding: 24px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: slideInDown 0.6s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

h1 {
    font-size: 20px;
    margin-bottom: 8px;
    text-align: center;
    color: var(--dark);
    animation: slideInUp 0.6s ease 0.1s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    color: var(--gray);
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    animation: slideInUp 0.6s ease 0.2s both;
}

.form-group {
    margin-bottom: 16px;
    animation: slideInUp 0.6s ease 0.3s both;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 12px 12px 12px 36px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
    background: #fff;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.15);
}

.user-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: slideInUp 0.6s ease 0.4s both;
}

.user-type {
    flex: 1;
    text-align: center;
    padding: 16px 8px;
    border: 1.5px solid var(--gray-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
}

.user-type:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.user-type.selected {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.08);
    box-shadow: 0 2px 4px rgba(67, 97, 238, 0.1);
}

.user-type i {
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--primary);
}

.user-type h3 {
    font-size: 13px;
    margin-bottom: 2px;
    color: var(--dark);
}

.user-type p {
    font-size: 11px;
    color: var(--gray);
    line-height: 1.3;
}

.btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    animation: slideInUp 0.6s ease 0.5s both;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.25);
}

.btn:active {
    transform: translateY(0);
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    animation: slideInUp 0.6s ease 0.6s both;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-light);
}

.divider span {
    padding: 0 12px;
    color: var(--gray);
    font-size: 12px;
}

.social-login {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    animation: slideInUp 0.6s ease 0.7s both;
}

.social-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.social-btn:hover {
    border-color: var(--primary);
    background: #f8f9fa;
    transform: translateY(-1px);
}

.social-btn img {
    width: 16px;
    height: 16px;
}

.login-link {
    text-align: center;
    margin-top: 16px;
    color: var(--gray);
    font-size: 13px;
    animation: slideInUp 0.6s ease 0.8s both;
}

.login-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.password-strength {
    height: 3px;
    margin-top: 6px;
    border-radius: 2px;
    background-color: #e5e7eb;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px !important;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
}

.remember-me input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Ultra Advanced Responsiveness */
@media (min-width: 420px) {
    .container {
        max-width: 400px;
    }
    
    .form-section {
        padding: 28px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 420px;
    }
    
    .form-section {
        padding: 32px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    .logo-text {
        font-size: 20px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 900px;
        flex-direction: row;
    }
    
    .illustration-section {
        display: flex;
        flex: 1;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        color: white;
        padding: 40px;
        flex-direction: column;
        justify-content: center;
        position: relative;
        overflow: hidden;
        animation: slideInLeft 0.6s ease;
    }
    
    @keyframes slideInLeft {
        from {
            opacity: 0;
            transform: translateX(-20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .illustration-section::before {
        content: '';
        position: absolute;
        width: 120px;
        height: 120px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        top: -30px;
        left: -30px;
    }
    
    .illustration-section::after {
        content: '';
        position: absolute;
        width: 80px;
        height: 80px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        bottom: -30px;
        right: -30px;
    }
    
    .form-section {
        flex: 1;
        padding: 40px;
    }
    
    .logo {
        justify-content: flex-start;
    }
    
    .logo-text {
        color: var(--light);
    }
    
    h1, .subtitle {
        text-align: left;
    }
    
    .features {
        margin-top: 30px;
    }
    
    .feature {
        display: flex;
        align-items: center;
        margin-bottom: 16px;
        animation: slideInLeft 0.6s ease 0.8s both;
    }
    
    .feature-icon {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 12px;
        font-size: 16px;
    }
    
    .feature-text h3 {
        font-size: 15px;
        margin-bottom: 2px;
    }
    
    .feature-text p {
        font-size: 12px;
        opacity: 0.9;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1000px;
    }
    
    .illustration-section {
        padding: 50px;
    }
    
    .form-section {
        padding: 50px;
    }
}

@media (max-width: 360px) {
    .container {
        max-width: 320px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .user-type-selector {
        flex-direction: column;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    input, select {
        padding: 10px 10px 10px 32px;
        font-size: 13px;
    }
    
    .input-icon {
        font-size: 13px;
        left: 10px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 10px;
        align-items: flex-start;
    }
    
    .container {
        margin: 10px 0;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    h1 {
        margin-bottom: 5px;
    }
    
    .subtitle {
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .container {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #1a1a1a;
        --dark: #f8f9fa;
        --gray-light: #404040;
    }
    
    body {
        background: linear-gradient(135deg, #0f0f0f 0%, #2d3748 100%);
    }
    
    .container {
        background: #2d3748;
        color: var(--dark);
    }
    
    input, select, .social-btn {
        background: #4a5568;
        border-color: #718096;
        color: var(--dark);
    }
    
    input:focus, select:focus {
        background: #4a5568;
    }
}

/* Print styles */
@media print {
    .container {
        box-shadow: none;
        max-width: 100%;
    }
    
    .social-login, .divider {
        display: none;
    }
}