/* Temel Reset ve Global Stiller */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--primary-bg);
    padding: 1rem;
}

.login-container {
    background: var(--card-bg);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.auth-brand {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 12px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.auth-brand h1 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.input-field {
    position: relative;
}

.input-field input,
.input-field textarea {
  padding-left: 40px; /* İkon için boşluk bırak */
  position: relative;
  z-index: 1; /* Input'u ikonların arkasında tut */
}

.input-field input:focus,
.input-field textarea:focus {
  padding-left: 40px; /* Focus durumunda padding koru */
}

.input-field input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background: var(--secondary-bg);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-field input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
    outline: none;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 2; /* İkonları ön plana çıkar */
    pointer-events: none; /* İkonlara tıklanamaz yap */
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    margin: -0.5rem;
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-height: 50px;
}

.auth-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    padding: 0.5rem;
    margin: -0.5rem;
}

.footer-link:hover {
    color: var(--accent-color);
}

.auth-alert {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(239,68,68,0.3);
}

/* Tablet ve Mobil Responsive Stiller */
@media (max-width: 768px) {
    .login-wrapper {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .login-container {
        padding: 2rem;
        margin: 0;
        border-radius: 12px;
        min-height: auto;
    }
    
    .auth-brand h1 {
        font-size: 1.6rem;
    }
    
    .logo-icon {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .input-field input {
        padding: 1rem 1rem 1rem 2.5rem;
        font-size: 16px; /* iOS zoom'u önlemek için */
    }
    
    .auth-btn {
        padding: 1.125rem;
        font-size: 1.05rem;
        min-height: 52px;
    }
    
    .auth-footer {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .footer-link {
        display: block;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 0.25rem;
        padding-top: 1rem;
    }
    
    .login-container {
        padding: 1.5rem;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    }
    
    .auth-brand {
        margin-bottom: 2rem;
    }
    
    .auth-brand h1 {
        font-size: 1.4rem;
        margin-bottom: 0.25rem;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .input-group {
        margin-bottom: 1.25rem;
    }
    
    .input-field input {
        padding: 0.9375rem 1rem 0.9375rem 2.25rem;
        font-size: 16px;
    }
    
    .input-icon {
        left: 0.75rem;
        font-size: 0.9rem;
    }
    
    .password-toggle {
        right: 0.75rem;
        font-size: 0.9rem;
        padding: 0.75rem;
        margin: -0.75rem;
    }
    
    .auth-btn {
        padding: 1rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .auth-alert {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .auth-footer {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .footer-link {
        font-size: 0.85rem;
        padding: 1rem;
    }
}

/* Çok küçük ekranlar için */
@media (max-width: 320px) {
    .login-container {
        padding: 1rem;
    }
    
    .auth-brand h1 {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .input-field input {
        padding: 0.875rem 0.75rem 0.875rem 2rem;
    }
    
    .input-icon {
        left: 0.625rem;
    }
    
    .password-toggle {
        right: 0.625rem;
    }
}

/* Landscape orientation için mobil düzenlemeler */
@media (max-height: 600px) and (orientation: landscape) {
    .login-wrapper {
        padding: 0.5rem;
        align-items: center;
    }
    
    .login-container {
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .auth-brand {
        margin-bottom: 1.5rem;
    }
    
    .logo-icon {
        margin-bottom: 1rem;
    }
    
    .input-group {
        margin-bottom: 1rem;
    }
    
    .auth-footer {
        margin-top: 1rem;
        padding-top: 1rem;
    }
}

/* Touch device optimizasyonları */
@media (hover: none) and (pointer: coarse) {
    .auth-btn:hover {
        transform: none;
    }
    
    .auth-btn:active {
        transform: scale(0.98);
        background: var(--accent-hover);
    }
    
    .footer-link:hover {
        color: var(--text-secondary);
    }
    
    .footer-link:active {
        color: var(--accent-color);
    }
    
    .password-toggle {
        padding: 1rem;
        margin: -1rem;
    }
}

/* Animasyonlar */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Geçici Başarı Stili */
.auth-btn.success {
    background: #22c55e !important;
}

/* Ana Container Animasyonu */
.login-container {
    animation: slideIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Alanı Animasyonları */
.input-field input {
    transition: all 0.4s ease;
}

.input-field input:focus {
    transform: scale(1.01);
}

.input-field input:focus ~ .input-icon {
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

/* Label Floating Efekti */
.input-group {
    position: relative;
}

.input-label {
    position: absolute;
    left: 2.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-field input:focus ~ .input-label,
.input-field input:not(:placeholder-shown) ~ .input-label {
    top: -10px;
    left: 0.5rem;
    font-size: 0.8rem;
    color: var(--accent-color);
}

/* Buton Hover Animasyonu */
.auth-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 25%, 
        rgba(255,255,255,0.1) 50%, 
        transparent 75%
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.auth-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(59,130,246,0.3);
}

/* Hata Mesajı Animasyonu */
.auth-alert {
    animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    transform: translate3d(0, 0, 0);
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Başarılı Giriş Animasyonu */
.success-animation {
    animation: successPulse 1.5s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Arkaplan Parçacık Efekti */
.login-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    animation: moveBackground 20s linear infinite;
    z-index: -1;
}

@keyframes moveBackground {
    from { background-position: 0 0, 20px 20px; }
    to { background-position: 40px 40px, 60px 60px; }
}

/* Mobil Safari için özel düzenlemeler */
@supports (-webkit-touch-callout: none) {
    .input-field input {
        font-size: 16px !important; /* Zoom'u önlemek için */
    }
}

/* Yüksek DPI ekranlar için */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .login-container {
        border-width: 0.5px;
    }
    
    .input-field input {
        border-width: 1px;
    }
}