/* ========================================
   AUTH PAGE - UNIFIED LOGIN & REGISTER
   Modern Design with Smooth Animations
   ======================================== */

:root {
    --primary-color: #f97316;
    --primary-hover: #ea580c;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.4s;
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   LOADING OVERLAY
   ======================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
}

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

/* ========================================
   MAIN WRAPPER
   ======================================== */
.auth-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    background: var(--white);
}

/* ========================================
   BRANDING PANEL (LEFT SIDE) - SIMPLE IMAGE
   ======================================== */
.branding-panel {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    overflow: hidden;
    background-image: url('https://images.unsplash.com/photo-1555396273-367ea4eb4db5?q=80&w=1974&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
}

.branding-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.branding-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    width: 100%;
    max-width: 600px;
    animation: fadeInUp 1s ease-out;
}

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

/* Brand Header */
.brand-header {
    margin-bottom: 60px;
}

.brand-logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.brand-logo {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #1e3a8a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.brand-logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    z-index: 1;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.brand-title {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(to right, #ffffff 0%, #e0f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
}

.brand-tagline {
    font-size: 18px;
    opacity: 0.95;
    font-weight: 400;
    line-height: 1.6;
    color: #e0f2fe;
}

/* Simple Stats */
.simple-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 60px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
    font-weight: 600;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.stat-badge i {
    font-size: 18px;
    color: #10b981;
}

/* ========================================
   FORM PANEL (RIGHT SIDE)
   ======================================== */
.form-panel {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--white);
    overflow: hidden;
    padding: 30px 40px;
}

.form-content {
    width: 100%;
    max-width: 600px; 
    margin: 0 auto;
}

/* ========================================
   FORM TABS
   ======================================== */
.form-tabs {
    display: flex;
    position: relative;
    background: var(--bg-light);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 20px;
}

.tab-button {
    flex: 1;
    padding: 12px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button.active {
    color: var(--white);
}

.tab-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 8px;
    transition: transform var(--transition-speed) cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1;
    box-shadow: var(--shadow-md);
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideDown 0.4s ease-out;
    border: 1px solid;
}

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

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert i {
    font-size: 20px;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    margin-bottom: 5px;
}

.alert ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.alert li {
    margin-bottom: 4px;
    font-size: 14px;
}

/* ========================================
   FORMS CONTAINER - PROFESYONEL VE DİNAMİK GEÇİŞ
   ======================================== */
.forms-container {
    position: relative;
    overflow: hidden; 
    transition: height 0.4s ease-in-out; 
}

.auth-form {
    position: absolute;
    top: 0;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0.4s; 
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden; 
}

.auth-form.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    position: relative;
    transition-delay: 0s;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
}

#loginForm {
    transform: translateX(-100%);
}
#loginForm.active {
    transform: translateX(0);
}

#registerForm {
    transform: translateX(100%);
}
#registerForm.active {
    transform: translateX(0);
}

#loginForm:not(.active), #registerForm:not(.active) {
    visibility: hidden;
    transition-delay: 0s, 0s, 0.4s; 
}

#registerForm:not(.active) {
    transform: translateX(100%);
    opacity: 0;
    transition-delay: 0s; 
}

.tab-indicator {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    z-index: 1;
    box-shadow: var(--shadow-md);
}

.form-header {
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-header .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================
   FORM INPUTS
   ======================================== */
.input-group {
    margin-bottom: 12px;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.input-group label .required {
    color: var(--danger-color);
    margin-left: 2px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 12px 16px 12px 42px;
    font-size: 14px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-primary);
    font-family: inherit;
}

.input-wrapper select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.input-wrapper input.is-invalid {
    border-color: var(--danger-color);
    background: #fef2f2;
}

.input-wrapper input.is-valid {
    border-color: var(--secondary-color);
    background: #f0fdf4;
}

.input-wrapper input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.input-wrapper input.is-valid:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.input-hint i {
    font-size: 14px;
}

.input-hint strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Input Row (for side-by-side inputs) */
.input-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* ========================================
   FORM OPTIONS
   ======================================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.forgot-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ========================================
   SUBMIT BUTTON
   ======================================== */
.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-submit i {
    font-size: 18px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .branding-panel {
        display: none;
    }
    
    html, body {
        overflow: auto;
        height: auto;
    }
    
    .auth-wrapper {
        min-height: 100vh;
        justify-content: center;
        align-items: center;
        padding: 20px;
    }
    
    .form-panel {
        max-width: 500px;
        box-shadow: var(--shadow-xl);
        border-radius: 20px;
        padding: 30px 25px;
    }
}

@media (max-width: 640px) {
    .form-panel {
        padding: 25px 20px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .form-header .subtitle {
        font-size: 13px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .tab-button {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .tab-button i {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-wrapper {
        padding: 0;
    }
    
    .form-panel {
        border-radius: 0;
        min-height: 100vh;
    }
    
    .form-content {
        max-width: 100%;
    }
}