/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* Background Pattern */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    z-index: 1;
}

/* Main Container */
.auth-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 700px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: slideInUp 0.8s ease-out;
}

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

/* Left Side - Brand Section */
.brand-section {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 48px 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.brand-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="8" height="8" patternUnits="userSpaceOnUse"><circle cx="4" cy="4" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.4;
}

.brand-content {
    position: relative;
    z-index: 2;
}

.brand-icon {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.brand-icon i {
    font-size: 3rem;
    color: white;
    transform: translateY(-2px);
}

.brand-super-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.brand-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto;
}

.brand-features {
    margin-top: 32px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item i {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.feature-item span {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.95;
}

/* Right Side - Form Section */
.form-section {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.form-header p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Error Message */
.error-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #dc2626;
    font-size: 0.9rem;
    text-align: center;
    display: none;
    animation: slideInDown 0.3s ease-out;
}

.error-message:not(:empty) {
    display: block;
}

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

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.input-group label i {
    color: #3b82f6;
    width: 16px;
    font-size: 0.95rem;
}

.optional {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.85rem;
}

.input-group input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    background: white;
    color: #1f2937;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-weight: 500;
}

.input-group input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.input-group input:focus {
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 6px 20px -5px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* Password Input with Toggle */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* Password Strength Indicator */
.password-strength, .password-match {
    font-size: 0.8rem;
    margin-top: 6px;
    min-height: 16px;
}

.strength-weak {
    color: #dc2626;
}

.strength-medium {
    color: #f59e0b;
}

.strength-strong {
    color: #10b981;
}

.match-success {
    color: #10b981;
}

.match-error {
    color: #dc2626;
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 18px 22px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.btn-icon {
    transition: transform 0.3s ease;
    font-size: 0.95rem;
}

.submit-btn:hover .btn-icon {
    transform: translateX(3px);
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.form-footer p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

.auth-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    transition: width 0.3s ease;
}

.auth-link:hover::after {
    width: 100%;
}

.auth-link:hover {
    color: #1d4ed8;
}

/* Responsive Design */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .brand-section {
        padding: 36px 28px;
    }
    
    .brand-title {
        font-size: 2.25rem;
    }
    
    .brand-features {
        display: none;
    }
    
    .form-section {
        padding: 36px 28px;
    }
}

@media (max-width: 640px) {
    body {
        padding: 16px;
    }
    
    .auth-container {
        border-radius: 20px;
    }
    
    .brand-section {
        padding: 28px 24px;
    }
    
    .brand-icon {
        width: 100px;
        height: 100px;
        margin-bottom: 24px;
    }
    
    .brand-icon i {
        font-size: 2.5rem;
    }
    
    .brand-super-title {
        font-size: 1.2rem;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .form-section {
        padding: 28px 24px;
    }
    
    .form-header h2 {
        font-size: 1.6rem;
    }
    
    .input-group input {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .submit-btn {
        padding: 16px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    body {
        overflow-y: auto;
    }
    
    .auth-container {
        align-items: flex-start;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    .brand-section {
        padding: 24px 20px;
    }
    
    .form-section {
        padding: 24px 20px;
    }
    
    .auth-form {
        gap: 20px;
    }
}