*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #060a13;
}

/* ── Yerel Arkaplan & Dinamik Hareket ── */
.space-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: #000;
    overflow: hidden;
}

/* Parallax wrapper: fare hareketini taşır */
.space-parallax-wrap {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.space-image {
    position: absolute;
    inset: -16%;
    /* Büyük taşma payı: hem Ken Burns hem parallax için */
    background-image: url('../resimler/arka-plan/arkaplan.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.55) contrast(1.3) saturate(1.15);
    opacity: 0.8;
    animation: ultraKenBurns 55s ease-in-out infinite alternate;
    will-change: transform;
}

/* Güçlendirilmiş Parlama Efektleri (Horizon & Space Glow) */
.space-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    right: -20%;
    height: 80%;
    background: radial-gradient(ellipse at center 85%, rgba(63, 100, 255, 0.4) 0%, rgba(30, 40, 150, 0.15) 50%, transparent 80%);
    filter: blur(140px);
    z-index: 1;
    pointer-events: none;
}

.space-bg::before {
    content: '';
    position: absolute;
    top: -15%;
    right: -15%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle at center, rgba(120, 160, 255, 0.12) 0%, transparent 75%);
    filter: blur(100px);
    z-index: 1;
    pointer-events: none;
}

@keyframes ultraKenBurns {
    0% {
        transform: scale(1.0) translate(0%, 0%) rotate(0deg);
    }

    25% {
        transform: scale(1.18) translate(-3%, -2%) rotate(0.8deg);
    }

    50% {
        transform: scale(1.28) translate(2%, -3%) rotate(-0.6deg);
    }

    75% {
        transform: scale(1.22) translate(-1%, 2%) rotate(1deg);
    }

    100% {
        transform: scale(1.32) translate(3%, 1%) rotate(-1deg);
    }
}

#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── Login Kartı: Arkaplanla Tam Uyumlu ── */
.login-wrap {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: 0 20px;
    animation: cardFloat 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cardFloat {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card {
    background: rgba(8, 12, 28, 0.4);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(45px) saturate(180%);
    -webkit-backdrop-filter: blur(45px) saturate(180%);
    border-radius: 42px;
    padding: 70px 55px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(255, 255, 255, 0.02),
        0 0 100px rgba(79, 70, 229, 0.1);
    position: relative;
}

.login-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 42px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent 40%, transparent 60%, rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
}

.login-logo {
    display: block;
    margin: 0 auto 52px;
    max-width: 190px;
    height: auto;
    filter: drop-shadow(0 0 25px rgba(99, 102, 241, 0.4));
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

.login-error.show {
    display: flex;
}

@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);
    }
}

.fg {
    margin-bottom: 24px;
    position: relative;
}

.fg-inner {
    position: relative;
}

.fg-inner i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.25);
    font-size: 1rem;
    transition: 0.3s;
}

.fg input {
    width: 100%;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    padding: 18px 20px 18px 52px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

.fg input::placeholder {
    color: rgba(255, 255, 255, 0.18);
}

.fg input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    outline: none;
}

.fg-inner:focus-within i {
    color: #818cf8;
    transform: translateY(-50%) scale(1.1);
}

.pwd-toggle {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    padding: 5px;
    transition: 0.2s;
}

.pwd-toggle:hover {
    color: #818cf8;
}

.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.btn-login {
    flex: 1;
    height: 56px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    border-radius: 18px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.45);
}

.btn-login:active {
    transform: translateY(0);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn-login.loading .spinner {
    display: block;
}

.btn-login.loading .btn-text {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-forgot {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    position: relative;
}

.btn-forgot:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-forgot:hover::after {
    content: 'Şifremi Unuttum';
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 20, 40, 0.95);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid rgba(99, 102, 241, 0.3);
    pointer-events: none;
}

.lockout-msg {
    font-size: 0.8rem;
    color: #f87171;
    text-align: center;
    margin-top: 16px;
    display: none;
}

.lockout-msg.show {
    display: block;
}

/* ── Şifremi Unuttum Modalı ── */
.fp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 19, 0.75);
    backdrop-filter: blur(6px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.25s;
}

.fp-overlay.active {
    opacity: 1;
    visibility: visible;
}

.fp-panel {
    background: rgba(15, 20, 40, 0.92);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 20px;
    padding: 36px 36px 32px;
    width: 100%;
    max-width: 380px;
    margin: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.25s;
}

.fp-overlay.active .fp-panel {
    transform: scale(1);
}

.fp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.fp-title {
    font-size: 1rem;
    font-weight: 700;
    color: #e8eaf6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fp-title i {
    color: #818cf8;
}

.fp-close {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.fp-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Adım göstergesi */
.fp-steps {
    display: flex;
    gap: 6px;
    margin: 16px 0 24px;
}

.fp-step {
    flex: 1;
    height: 3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s;
}

.fp-step.done {
    background: #6366f1;
}

.fp-step.active {
    background: #818cf8;
}

.fp-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Modal input */
.fp-input-wrap {
    position: relative;
    margin-bottom: 16px;
}

.fp-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(120, 120, 200, 0.5);
    font-size: 0.88rem;
}

.fp-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    padding: 14px 14px 14px 42px;
    color: #e8eaf6;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    caret-color: #818cf8;
}

.fp-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.fp-input:focus {
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.08);
}

/* Kod input (büyük tek satır) */
.fp-code-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.fp-code-input {
    flex: 1;
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    padding: 14px 8px;
    color: #e8eaf6;
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 4px;
    outline: none;
    caret-color: #818cf8;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.fp-code-input:focus {
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.fp-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-radius: 9px;
    padding: 9px 13px;
    font-size: 0.78rem;
    margin-bottom: 14px;
    display: none;
    align-items: center;
    gap: 7px;
}

.fp-error.show {
    display: flex;
}

.fp-success {
    text-align: center;
    padding: 12px 0 4px;
}

.fp-success i {
    font-size: 2.5rem;
    color: #34d399;
    display: block;
    margin-bottom: 14px;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.fp-success p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    line-height: 1.6;
}

.fp-success strong {
    color: #e8eaf6;
}

/* Modal buton */
.fp-btn {
    width: 100%;
    padding: 14px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 11px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fp-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.fp-btn-ghost {
    width: 100%;
    padding: 10px;
    background: none;
    color: rgba(255, 255, 255, 0.35);
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 8px;
    transition: color 0.2s;
}

.fp-btn-ghost:hover {
    color: rgba(255, 255, 255, 0.7);
}

.fp-pane {
    display: none;
}

.fp-pane.active {
    display: block;
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px 28px;
        border-radius: 16px;
    }
}