/**
 * AC Bilgisayar Admin Login - Dark Theme Support
 * Version: 1.0
 * Features: Modern dark mode with gradient backgrounds
 */

/* ============================================
   CSS Variables
   ============================================ */

:root {
    /* Light theme */
    --login-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --login-card-bg: #ffffff;
    --login-text: #333333;
    --login-text-secondary: #666666;
    --login-border: #e0e0e0;
    --login-input-bg: #f8f9fa;
    --login-primary: #3498db;
    --login-primary-hover: #2980b9;
}

[data-theme="dark"] {
    /* Dark theme */
    --login-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --login-card-bg: #1e1e1e;
    --login-text: #e0e0e0;
    --login-text-secondary: #b0b0b0;
    --login-border: #333333;
    --login-input-bg: #2a2a2a;
    --login-primary: #3498db;
    --login-primary-hover: #5dade2;
}

/* ============================================
   Base Styles
   ============================================ */

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background 0.3s ease-in-out;
    padding: 20px;
}

/* Light mode için arka plan override */
html:not([data-theme="dark"]) body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* ============================================
   Login Form Container
   ============================================ */

.login-form {
    background: var(--login-card-bg);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 3rem 3rem;
    max-width: 600px;
    width: 95%;
    margin: auto;
    transition: all 0.3s ease-in-out;
}

[data-theme="dark"] .login-form {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.login-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .login-form:hover {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8);
}

/* ============================================
   Header Section
   ============================================ */

.text-center {
    margin-bottom: 2rem;
}

.text-center h2 {
    color: var(--login-text);
    font-weight: 600;
    margin-top: 1rem;
    font-size: 1.8rem;
    transition: color 0.3s ease;
}

.text-center img {
    border-radius: 50%;
    padding: 10px;
    background: linear-gradient(135deg, var(--login-primary), var(--login-primary-hover));
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.text-center img:hover {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 12px 30px rgba(52, 152, 219, 0.5);
}

/* ============================================
   Login Wrap
   ============================================ */

.login-wrap {
    margin-top: 2rem;
}

.login-img {
    text-align: center;
    margin-bottom: 2rem;
}

.login-img i {
    font-size: 4rem;
    color: var(--login-primary);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.login-img i:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ============================================
   Alert Messages
   ============================================ */

.alert {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
}

[data-theme="dark"] .alert {
    background: rgba(231, 76, 60, 0.2);
    color: #ec7063;
}

/* ============================================
   Input Groups
   ============================================ */

.input-group {
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    width: 100%;
}

.input-group-addon {
    background: var(--login-primary) !important;
    border: none !important;
    color: white !important;
    border-radius: 10px 0 0 10px !important;
    min-width: 50px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.input-group:hover .input-group-addon {
    background: var(--login-primary-hover) !important;
    transform: scale(1.05);
}

.input-group-addon i {
    font-size: 1.2rem;
}

.form-control {
    background: var(--login-input-bg) !important;
    border: 2px solid var(--login-border) !important;
    color: var(--login-text) !important;
    padding: 12px 15px;
    font-size: 1rem;
    border-radius: 0 10px 10px 0 !important;
    transition: all 0.3s ease;
    height: auto;
    flex: 1;
    width: 100%;
}

.form-control:focus {
    border-color: var(--login-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25) !important;
    background: var(--login-card-bg) !important;
}

.form-control::placeholder {
    color: var(--login-text-secondary);
    opacity: 0.7;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--login-primary), var(--login-primary-hover)) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, var(--login-primary-hover), var(--login-primary)) !important;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.4);
}

.btn-block {
    margin-bottom: 1rem;
}

.btn-block:last-child {
    margin-bottom: 0;
}

/* ============================================
   Theme Toggle Button
   ============================================ */

#login-theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(52, 152, 219, 0.3) !important;
    color: #f39c12 !important;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    display: flex !important;
    align-items: center;
    justify-content: center;
    outline: none !important;
}

/* Dark mode - Ay ikonu */
[data-theme="dark"] #login-theme-toggle {
    background: rgba(26, 26, 46, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffd700 !important;
}

#login-theme-toggle:hover {
    transform: translateY(-5px) rotate(180deg) scale(1.15);
    box-shadow: 0 12px 35px rgba(52, 152, 219, 0.5);
    border-color: rgba(52, 152, 219, 0.6) !important;
}

[data-theme="dark"] #login-theme-toggle:hover {
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.4) !important;
}

#login-theme-toggle:active {
    transform: translateY(-3px) scale(1.1) rotate(180deg);
}

#login-theme-toggle i {
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

/* Güneş ikonu için (light mode) */
#login-theme-toggle i.icon_sun {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Ay ikonu için (dark mode) */
#login-theme-toggle i.icon_moon {
    color: #f39c12;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

/* ============================================
   Animations
   ============================================ */

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

.login-form {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .login-form {
        padding: 2rem 1.5rem;
    }

    .text-center h2 {
        font-size: 1.5rem;
    }

    .text-center img {
        width: 80px !important;
        height: 80px !important;
    }

    #login-theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .login-form {
        padding: 1.5rem 1rem;
    }

    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* ============================================
   Smooth Transitions
   ============================================ */

* {
    transition-property: background-color, color, border-color, box-shadow, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease-in-out;
}
