﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100dvh; /* mobil için doğru */
    overflow: hidden;
    background: url('/images/Duvar_Kagidi_1.png') no-repeat center center;
    background-size: cover;
}


/* Login kutusu */
.login-box {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 40px;
    border-radius: 20px;
    width: 400px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    margin: auto;
    transition: border 0.3s, box-shadow 0.3s;
}

    /* Başarılı giriş animasyonu */
    .login-box.success {
        border: 2px solid #4CAF50;
        box-shadow: 0 20px 50px rgba(76, 175, 80, 0.25);
        animation: successAnim 0.6s forwards;
    }

@keyframes successAnim {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Logo */
.logo img {
    width: 300px; /* eski: 180px */
    max-width: 80%;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

h2 {
    color: #0D47A1;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 20px;
}

/* Input ve label */
.input-group {
    position: relative;
    margin-bottom: 25px;
}

    .input-group input {
        width: 100%;
        padding: 12px 10px;
        border: 2px solid #CCCCCC;
        border-radius: 8px;
        outline: none;
        background: #F9F9F9;
        color: #0D47A1;
        font-size: 14px;
        transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    }

        .input-group input:focus {
            border-color: #0D47A1;
            box-shadow: 0 4px 12px rgba(13,71,161,0.2);
            background: #E3F2FD;
        }

    .input-group label {
        position: absolute;
        top: 12px;
        left: 12px;
        color: #999999;
        font-size: 14px;
        pointer-events: none;
        transition: 0.3s;
    }

    .input-group input:focus + label,
    .input-group input:not(:placeholder-shown) + label {
        top: -10px;
        left: 8px;
        font-size: 12px;
        color: #0D47A1;
        background: #FFFFFF;
        padding: 0 4px;
    }



/* Button */
.btn {
    width: 100%;
    padding: 14px;
    background: #0D47A1;
    color: #FFFFFF;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}

    .btn:hover:not(:disabled) {
        background: #1565C0;
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(13,71,161,0.3);
    }

    .btn:disabled {
        background: #90CAF9;
        cursor: not-allowed;
        transform: scale(1);
        box-shadow: none;
    }

/* Hata mesajı */
.error-msg {
    color: #D32F2F;
    background: #FFE5E5;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
    text-align: center;
}
span.field-validation-error {
    color: red !important; 
    font-size: 0.8em; 
    display: block;
    margin-top: 5px;
    text-align: left; 
}


/* Tick işareti (başarı) */
.success-tick {
    display: none;
    color: #4CAF50;
    font-size: 36px;
    margin-top: 15px;
}

.login-box.success .success-tick {
    display: block;
    animation: tickAnim 0.5s ease-out;
}

@keyframes tickAnim {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive ayarlar */
@media (max-width: 768px) {
    .login-box {
        width: 90%;
        padding: 40px 30px;
    }

    h2 {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .logo img {
        width: 260px; /* eski: 180px */
        max-width: 80%;
        height: auto;
        margin-bottom: 20px;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .btn {
        font-size: 15px;
        padding: 12px;
    }

    .input-group input {
        padding: 11px;
    }
}

@media (max-width: 480px) {
    .login-box {
        width: 100%;
        height: 100dvh;
        border-radius: 0;
        box-shadow: none;
        padding: 40px 24px;
        /* Mobilde arka plan resmi ekleme */
        background: url('/images/mobil-wallpaper.png') no-repeat center center;
        background-size: cover;
    }

    body {
        align-items: stretch;
    }
    h2 {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .logo img {
        width: 240px; /* eski: 180px */
        max-width: 80%;
        height: auto;
        margin-bottom: 20px;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .btn {
        font-size: 14px;
        padding: 11px;
    }

    .input-group input {
        font-size: 16px;
    }

}
