/* Reset et Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --color-bg-left: #FFFFFF;
    --color-bg-right: #0A0E14;
    --color-text-primary: #000000;
    --color-text-secondary: #666666;
    --color-border: #E5E5E5;
    --color-input-bg: #F8F8F8;
    --color-button-primary: #000000;
    --color-button-secondary: #FFFFFF;
    --color-link: #000000;
    --color-glow-blue: rgba(100, 150, 255, 0.4);
    --color-glow-purple: rgba(150, 100, 255, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

/* Container */
.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
    width: 100vw;
}

/* Left Panel */
.left-panel {
    background: var(--color-bg-left);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    position: relative;
    overflow-y: auto;
}

.logo {
    position: absolute;
    top: 2rem;
    left: 2rem;
    width: 32px;
    height: 32px;
    color: var(--color-text-primary);
}

.logo svg {
    width: 100%;
    height: 100%;
}

.auth-selector {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-text {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 400;
}

.dropdown {
    position: relative;
}

.dropdown-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.dropdown-button:hover {
    background: #FAFAFA;
    border-color: #D0D0D0;
}

.dropdown-button svg:first-child {
    color: var(--color-text-secondary);
}

.chevron {
    color: var(--color-text-secondary);
    transition: transform 0.2s ease;
}

/* Form Container */
.form-container {
    max-width: 400px;
    width: 100%;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-container h1 {
    font-size: 32px;
    font-weight: 400;
    color: var(--color-text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-primary);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 15px;
    font-family: var(--font-family);
    color: var(--color-text-primary);
    background: var(--color-bg-left);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:hover {
    border-color: #D0D0D0;
}

.form-input:focus {
    border-color: var(--color-text-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-input::placeholder {
    color: #999;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-family);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--color-button-primary);
    color: white;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--color-button-secondary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: #FAFAFA;
    border-color: #D0D0D0;
}

/* Terms */
.terms {
    margin-top: 1rem;
}

.terms p {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.terms a {
    color: var(--color-link);
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.terms a:hover {
    opacity: 0.7;
}

/* Right Panel */
.right-panel {
    background: linear-gradient(135deg, #0A0E14 0%, #1A1E28 50%, #0F1419 100%);
    position: relative;
    overflow: hidden;
}

.background-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(40, 50, 70, 0.4) 0%, rgba(30, 40, 60, 0.2) 100%);
    border: 1px solid rgba(100, 120, 160, 0.1);
    backdrop-filter: blur(20px);
}

.shape-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    right: -100px;
    background: linear-gradient(135deg, rgba(50, 70, 100, 0.3) 0%, rgba(30, 40, 60, 0.15) 100%);
    border: 1px solid rgba(100, 140, 200, 0.15);
    animation: float 20s ease-in-out infinite;
}

.shape-2 {
    width: 700px;
    height: 700px;
    bottom: -200px;
    left: -150px;
    background: linear-gradient(135deg, rgba(40, 55, 80, 0.35) 0%, rgba(25, 35, 55, 0.15) 100%);
    border: 1px solid rgba(90, 120, 180, 0.12);
    animation: float 25s ease-in-out infinite;
    animation-delay: -5s;
}

.shape-3 {
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(45, 60, 90, 0.25) 0%, rgba(30, 40, 65, 0.1) 100%);
    border: 1px solid rgba(95, 125, 185, 0.1);
    animation: float 30s ease-in-out infinite;
    animation-delay: -10s;
}

/* Glows */
.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: pulse 8s ease-in-out infinite;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(100, 150, 255, 0.4) 0%, transparent 70%);
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(120, 100, 255, 0.3) 0%, transparent 70%);
    bottom: 10%;
    left: 10%;
    animation-delay: -4s;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.05);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.1);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
    }
    
    .right-panel {
        display: none;
    }
    
    .left-panel {
        padding: 1.5rem;
    }
    
    .form-container {
        margin-top: 4rem;
    }
}

@media (max-width: 640px) {
    .left-panel {
        padding: 1rem;
    }
    
    .logo {
        top: 1rem;
        left: 1rem;
    }
    
    .auth-selector {
        top: 1rem;
        right: 1rem;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }
    
    .form-container {
        padding: 0 0.5rem;
    }
    
    .form-container h1 {
        font-size: 28px;
    }
}

/* Additional styling for better UX */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px white inset;
    -webkit-text-fill-color: var(--color-text-primary);
    transition: background-color 5000s ease-in-out 0s;
}

/* Focus visible for accessibility */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.form-input:focus-visible,
.dropdown-button:focus-visible {
    outline: 2px solid var(--color-text-primary);
    outline-offset: 2px;
}

/* Loading state (optional) */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
