/* Genel Sıfırlama ve Temel Ayarlar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background-image: url("bg.svg");
    background-size: cover;
    background-position: center;
}
body {
    font-family: "Plus Jakarta Sans", "Segoe UI", Segoe, "Segoe WP", "Helvetica Neue", "Helvetica", Arial, sans-serif;
    color: #1b1b1b;
    display: grid;
    place-items: center;
    overflow: hidden;
      background-image: url("bg.svg");
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Sayfa yükleme animasyonu (Fade-in) */
@keyframes pageLoadFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ana Giriş Kutusu */
.login-container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1);
    padding: 44px;
    width: 100%;
    max-width: 440px;
    text-align: center; 
    opacity: 0; /* Başlangıçta görünmez */
    animation: pageLoadFadeIn 0.6s ease-out 0.2s forwards;
}

/* Logo */
.logo {
    width: 108px;
    margin-bottom: 24px;
}

/* Başlık: "Oturum aç" */
h1 {
    font-size: 28px;
    font-weight: 600; 
    line-height: 1.2;
    margin-bottom: 4px;
}

/* Alt başlık */
.subtitle {
    font-size: 16px;
    margin-bottom: 28px;
}


/* === MODERN ANİMASYONLU INPUT (KESİN ÇÖZÜM) === */
.input-group {
    position: relative; 
    margin-bottom: 16px;
    text-align: left;
    transition: opacity 0.3s ease-out, max-height 0.4s ease-out, margin-bottom 0.4s ease-out, visibility 0.4s ease;
    opacity: 1;
    max-height: 100px; 
    visibility: visible;
    overflow: hidden; 
}
.input-group.group-hidden {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    visibility: hidden;
    pointer-events: none; 
}

.input-field {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    font-family: "Segoe UI", Segoe, "Segoe WP", "Helvetica Neue", "Helvetica", Arial, sans-serif;
    border: 1px solid #ccc;
    border-radius: 4px;
    line-height: 1.5;
    background-color: #fff;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    
    /* === KESİLME DÜZELTMESİ 1 (YENİ YOL) === */
    /* Input'a pozisyon vererek z-index katmanı oluşturmaya zorla */
    position: relative;
    /* Onu z-index: 0 (arka katman) olarak ayarla */
    z-index: 0;
}
.input-label {
    position: absolute;
    top: 10px; 
    left: 12px;
    font-size: 16px;
    color: #666;
    pointer-events: none; 
    transition: all 0.2s ease-in-out; 
    
    /* === KESİLME DÜZELTMESİ 2 (YENİ YOL) === */
    /* Etiketi z-index: 1 (ön katman) olarak ayarla */
    z-index: 1;
}
.input-field:hover {
    border-color: #888;
}
.input-field:focus {
    outline: none;
    border-color: #0067b8;
    box-shadow: 0 0 0 1.5px rgba(0, 103, 184, 0.3);
}
/* Bu stil, z-index: 1 sayesinde input'un ÜSTÜNDE görünecek */
.input-field:focus + .input-label,
.input-field:not(:placeholder-shown) + .input-label {
    top: -8px; 
    left: 10px;
    font-size: 12px; 
    color: #0067b8; 
    background-color: #ffffff; 
    padding: 0 4px; 
}

/* === ANİMASYONLU INPUT BİTİŞİ === */


/* Linkler */
a {
    color: #0067b8;
    text-decoration: none;
    font-size: 15px;
}
a:hover {
    text-decoration: underline;
    color: #005a9e;
}
.forgot-link {
    display: block; 
    font-size: 13px;
    font-weight: 600; 
    margin-bottom: 28px;
    text-align: left; 
    margin-left: 1px;
}

/* "Sonraki" Butonu */
.btn-primary {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background-color: #0067b8;
    border: none;
    border-radius: 0;
    cursor: pointer;
    line-height: 1.5;
    margin-bottom: 28px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}
.btn-primary:hover {
    background-color: #005a9e;
}
.btn-primary:disabled {
    background-color: #cccccc; 
    cursor: not-allowed; 
    opacity: 0.8;
}
.btn-primary:disabled:hover {
    background-color: #cccccc;
}

/* "Hesap oluştur" kısmı */
.create-account {
    font-size: 13px;
    color: #1b1b1b;
}
.create-account .create-link {
    font-size: 13px;
    font-weight: 600;
}

/* Footer (Sayfa Alt Bilgisi) */
.page-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
    font-size: 13px;
    color: #616161;
}
.page-footer .footer-links a,
.page-footer .footer-copy,
.page-footer .footer-copy a {
    font-size: 13px;
}
.page-footer .footer-links a {
    color: #616161;
    margin: 0 12px;
}
.page-footer .footer-links a:hover {
    color: #0067b8;
    text-decoration: underline;
}
.page-footer .footer-copy {
    margin-top: 8px;
}
.page-footer .footer-copy a {
    color: #0067b8;
}

/* === ANİMASYON YARDIMCILARI (Boşluk Düzeltilmiş) === */

.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}
.hidden.show {
    opacity: 1;
    pointer-events: auto;
}

/* Loader */
.loader-container {
    text-align: center;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease-out, height 0.3s ease-out, margin 0.3s ease-out;
}
.loader-container.show {
    opacity: 1;
    height: auto;
    margin: 20px 0; 
}
.loader {
    border: 4px solid #f3f3f3; 
    border-top: 4px solid #0067b8; 
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px auto;
}
.loader-container p {
    font-size: 14px;
    color: #666;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* PROFESYONEL HATA ANİMASYONU */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}
.shake {
    animation: shake 0.5s ease-in-out;
}

/* Hata Mesajı */
.error-message {
    font-size: 13px;
    color: #d93025;
    text-align: left;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, height 0.2s ease-out, margin-bottom 0.2s ease-out;
    height: 0;
    overflow: hidden;
}
.error-message.show {
    opacity: 1;
    transform: translateY(0);
    height: auto; 
    padding: 5px 0;
    margin-bottom: 16px; 
}


/* Kullanıcı Adı Gösterimi */
.user-display {
    display: flex;
    align-items: center;
    text-align: left;
    font-size: 16px;
    color: #333;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease-out 0.2s, transform 0.3s ease-out 0.2s, height 0.3s ease-out, margin-bottom 0.3s ease-out;
    height: 0;
    overflow: hidden;
}
.user-display.show {
    opacity: 1;
    transform: translateY(0);
    height: auto;
    margin-bottom: 16px; 
}

/* Geri Butonu (SVG İkon) */
.back-link {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-right: 8px;
    line-height: 0; 
}
.back-link-icon {
    width: 20px;
    height: 20px;
    fill: #666;
    transition: fill 0.2s ease;
}
.back-link:hover .back-link-icon {
    fill: #0067b8;
}