﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #003a5d;
}

.container {
    position: relative;
    width: 256px;
    height: 256px;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .container span {
        position: absolute;
        left: 0;
        width: 32px;
        height: 6px;
        background: #2c4766;
        border-radius: 8px;
        transform-origin: 128px;
        transform: scale(2.2) rotate(calc(var(--i) * (360deg / 50)));
        animation: animateBlink 3s linear infinite;
        animation-delay: calc(var(--i) * (3s / 50));
    }

@keyframes animateBlink {
    0% {
        background: #0ef;
    }

    25% {
        background: #2c4766;
    }
}

.login-box {
    position: absolute;
    width: 400px;
}

    .login-box form {
        width: 100%;
        padding: 0 50px;
    }

h2 {
    font-size: 2em;
    color: #0ef;
    text-align: center;
}

.input-box {
    position: relative;
    margin: 25px 0;
}

    .input-box input {
        width: 100%;
        height: 50px;
        background: transparent;
        border: 2px solid #2c4766;
        outline: none;
        border-radius: 40px;
        font-size: 1em;
        color: #fff;
        padding: 0 20px;
        transition: .5s ease;
    }

        .input-box input:focus,
        .input-box input:valid {
            border-color: #0ef;
        }

    .input-box label {
        position: absolute;
        top: 50%;
        left: 20px;
        transform: translateY(-50%);
        font-size: 1em;
        color: #fff;
        pointer-events: none;
        transition: .5s ease;
    }

    .input-box input:focus ~ label,
    .input-box input:valid ~ label {
        top: 1px;
        font-size: .8em;
        background: #1f293a;
        padding: 0 6px;
        color: #0ef;
    }

.forgot-pass {
    margin: -15px 0 10px;
    text-align: center;
}

    .forgot-pass a {
        font-size: .85em;
        color: #fff;
        text-decoration: none;
    }

        .forgot-pass a:hover {
            text-decoration: underline;
        }

.btn {
    width: 100%;
    height: 45px;
    background: #0ef;
    border: none;
    outline: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 1em;
    color: #1f293a;
    font-weight: 600;
}

.signup-link {
    margin: 20px 0 10px;
    text-align: center;
}

    .signup-link a {
        font-size: 1em;
        color: #0ef;
        text-decoration: none;
        font-weight: 600;
    }

        .signup-link a:hover {
            text-decoration: underline;
        }


/* 🔹 Input doluysa ya da odaklandığında label yukarı kaysın */
.input-box input:not(:placeholder-shown) ~ label,
.input-box input:focus ~ label {
    top: 1px;
    font-size: 0.8em;
    background: #1f293a;
    color: #0ef;
    padding: 0 6px;
}

/* === Chrome otomatik doldurma için çözüm === */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #1f293a inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

    /* === Autofill geldiğinde label'ı da yukarı taşı === */
    input:-webkit-autofill ~ label {
        top: 1px;
        font-size: 0.8em;
        background: #1f293a;
        color: #0ef;
        padding: 0 6px;
    }


/* Logo kutusunu tam ortaya getir */
.logo-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110px; /* Logonun boyutu */
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

    /* Logo resmi */
    .logo-box img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }


/* Login-box tam ortada olsun */
.container {
    position: relative;
    width: 100%;
    max-width: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}


/* İçindeki login kutusu da ortalansın */
.login-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    text-align: center;
    z-index: 10;
}

    /* Logo ortalansın */
    .login-box img {
        display: block;
        margin: 0 auto 20px auto; /* ortala + alt boşluk */
        width: 150px; /* istersen sağa sola kaymasın diye */
    }

.login-logo {
    width: 100px; /* Daha küçük ve dengeli */
    margin-bottom: 20px;
}

.btn {
    margin-top: 15px;
    position: relative;
    z-index: 10;
}


/* ==== FIX: login kutusu çarkın ÜSTÜNDE kalsın, logo ortalansın ==== */

/* Çark kapsayıcısı boyutunu koru (diğer .container tanımını ez) */
body > .container {
    width: 256px !important;
    height: 256px !important;
    position: relative !important;
}

    /* Çark parçaları en altta kalsın, tıklamayı engellemesin */
    body > .container span {
        z-index: 0;
        pointer-events: none;
    }

    /* Login kutusu tam ortada ve çarkın ÜSTÜNDE */
    body > .container .login-box {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 400px;
        text-align: center;
        z-index: 2;
    }

        /* Logo merkezde ve küçük */
        body > .container .login-box img {
            display: block;
            margin: 0 auto 16px auto;
            width: 90px; /* daha küçük logo */
            height: auto;
        }

        /* Buton çarkın altında kalmasın */
        body > .container .login-box .btn {
            position: relative;
            z-index: 2;
        }


.login-box img {
    width: 260px !important; /* istediğin gibi büyük olur */
    height: auto;
    margin-bottom: 20px;
}




/* Mobil iyileştirme */
@media (max-width: 480px) {
    body > .container {
        transform: scale(0.9); /* çarkı biraz küçült */
    }

        body > .container .login-box {
            width: 90vw;
            padding: 0 20px;
        }
}
