/* ===================================
   Login Page - Modern Fluent Design
   Slack/Discord/VS Code Style
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Karanlık Mod */
    --primary: #0078D4;
    --primary-dark: #106EBE;
    --primary-light: #00BCF2;
    --gradient: linear-gradient(135deg, #0078D4 0%, #00BCF2 100%);
    --gradient-hover: linear-gradient(135deg, #106EBE 0%, #0099C7 100%);
    
    --text-primary: #E5E5E5;
    --text-secondary: #B3B3B3;
    --text-tertiary: #808080;
    
    --bg-primary: #1E1E1E;
    --bg-secondary: #252525;
    --bg-tertiary: #2A2A2A;
    
    --border-color: #3A3A3A;
    --border-focus: #0078D4;
    
    --error: #EF4444;
    --error-bg: rgba(239, 68, 68, 0.15);
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.15);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

/* ===================================
   Main Container
   =================================== */

.login-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ===================================
   Left Side - Slider
   =================================== */

.login-slider {
    flex: 0 0 50%;
    position: relative;
    background: var(--gradient);
    overflow: hidden;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(102, 126, 234, 0.9) 0%, rgba(102, 126, 234, 0.3) 100%);
    z-index: 1;
}

.slide-content {
    position: absolute;
    bottom: 80px;
    left: 60px;
    right: 60px;
    z-index: 2;
    color: white;
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-content h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.slide-content p {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.6;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 60px;
    display: flex;
    gap: 12px;
    z-index: 3;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition-base);
}

.dot.active {
    width: 32px;
    border-radius: 4px;
    background: white;
}

.dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.6);
}

/* ===================================
   Right Side - Login Form
   =================================== */

.login-form-section {
    flex: 0 0 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.login-logo img {
    max-width: 100%;
    height: auto;
}

.login-logo svg {
    flex-shrink: 0;
}

.login-logo h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

/* Header */
.login-header {
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert svg {
    flex-shrink: 0;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Form */
.login-form {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group label svg {
    color: var(--text-tertiary);
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    outline: none;
    font-family: inherit;
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

.form-group input:hover {
    border-color: var(--text-tertiary);
}

.form-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.2);
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: var(--text-secondary);
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

/* Custom Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    transition: all var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}

.checkbox-wrapper:hover .checkmark {
    border-color: var(--primary);
}

.checkbox-wrapper input:checked ~ .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-wrapper input:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.forgot-password {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.forgot-password:hover {
    color: var(--primary-dark);
}

/* Login Button */
.btn-login {
    width: 100%;
    height: 48px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hover);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn-login:hover::before {
    opacity: 1;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.btn-text,
.btn-icon {
    position: relative;
    z-index: 1;
}

.btn-icon {
    transition: transform var(--transition-base);
}

.btn-login:hover .btn-icon {
    transform: translateX(4px);
}

/* Loading State */
.btn-login.loading {
    pointer-events: none;
}

.btn-login.loading .btn-text,
.btn-login.loading .btn-icon {
    opacity: 0;
}

.btn-login.loading .btn-loader {
    display: flex !important;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links span {
    color: var(--text-tertiary);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {
    .login-form-section {
        flex: 0 0 420px;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-slider {
        display: none;
    }
    
    .login-form-section {
        flex: 1;
        width: 100%;
        padding: 30px 20px;
    }
    
    .login-form-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .login-slider {
        display: none;
    }
    
    .login-header h2 {
        font-size: 24px;
    }
    
    .login-logo h1 {
        font-size: 18px;
    }
    
    .login-form-section {
        padding: 20px 16px;
    }
}

/* ===================================
   Accessibility
   =================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
