* {
    box-sizing: border-box;
    padding: 0;
}

@font-face {
    font-family: "Noto Sans";
    src: url("fonts/NotoSans-Thin.ttf") format("truetype");
    font-weight: 100;
}

@font-face {
    font-family: "Noto Sans";
    src: url("fonts/NotoSans-Light.ttf") format("truetype");
    font-weight: 300;
}

@font-face {
    font-family: "Noto Sans";
    src: url("fonts/NotoSans-Regular.ttf") format("truetype");
    font-weight: 400;
}

@font-face {
    font-family: "Noto Sans";
    src: url("fonts/NotoSans-Medium.ttf") format("truetype");
    font-weight: 500;
}

@font-face {
    font-family: "Noto Sans";
    src: url("fonts/NotoSans-Bold.ttf") format("truetype");
    font-weight: 700;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 24px;
    font-family: "Noto Sans", sans-serif;
    color: #1a1c22;
    background-color: #e9ebef;
    background-image: radial-gradient(circle at 50% 18%, #f5f7fa 0%, #e9ebef 48%, #dde0e7 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
    background-size: 160px 160px;
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    top: -14px;
    bottom: -14px;
    right: -14px;
    width: calc(100vh * 931 / 1754 + 28px);
    background: url("images/Background.png") no-repeat center / auto 100%;
    pointer-events: none;
    z-index: -1;
    transform: translate(var(--parallax-x, 0px), var(--parallax-y, 0px));
    transition: opacity 0.6s ease, translate 0.6s ease;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    transform: translateY(4px);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.title {
    text-align: center;
    color: #1a1c22;

}

.title h1 {
    font-weight: 100;
    letter-spacing: 2px;
    margin: 0;
}

.line {
    width: 270px;
    height: 1px;
    background: linear-gradient(to right,
        transparent,
        rgba(49, 49, 49, 0.45) 20%,
        rgba(49, 49, 49, 0.45) 80%,
        transparent);
    margin: -2px auto 0;
}

.login-card {
    background-color: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.85);
    width: 380px;
    max-width: 100%;
    padding: 40px;
    transform: translateY(-50px);
    border-radius: 22px;
    box-shadow:
        0 24px 60px rgba(20, 22, 30, 0.12),
        0 2px 6px rgba(20, 22, 30, 0.05);
    position: relative;

    --cat-width: 90px;
    --cat-right: 20px;
    --cat-ledge: 0px;
}

.cat {
    position: absolute;
    right: var(--cat-right);
    top: calc(var(--cat-ledge) - var(--cat-width) * 103 / 214);
    width: var(--cat-width);
    height: calc(var(--cat-width) * 236 / 214);
    pointer-events: none;

    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.cat.is-ready {
    opacity: 1;
    transform: translateY(0);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;

}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

input::-webkit-caps-lock-indicator {
    content: none;
    display: none;
}

.capslock-indicator {
    display: flex;
    align-items: center;
    margin-right: 10px;
    color: #1a1c22;
    opacity: 0.55;
    user-select: none;
}

.capslock-indicator[hidden] {
    display: none;
}

.capslock-indicator svg {
    width: 16px;
    height: 16px;
}

.form-error {
    font-size: 13px;
    text-align: center;
    color: #b3261e;
    margin: -4px 0;
}

.form-group input {
    padding-left: 14px;
    padding-right: 14px;
    align-items: center;
    border: none;
    font: inherit;
    height: 46px;
    background: transparent;
    flex: 1;
}

.login-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 46px;
    padding: 0;
    background-color: #0c0d10;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.18em;
    margin-top: 4px;
    box-shadow: 0 10px 22px rgba(12, 13, 16, 0.20);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.login-button:hover {
    background-color: #23242c;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(12, 13, 16, 0.26);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(12, 13, 16, 0.22);
}

.login-button-icon {
    width: 19px;
    height: 19px;
    margin-top: 1px;
    filter: brightness(0) invert(1);
    transition: transform 0.25s ease;
}

.login-button:hover .login-button-icon {
    transform: rotate(-14deg) scale(1.1);
}

.login-button.is-loading,
.login-button.is-success {
    color: transparent;
    pointer-events: none;
    transform: none;
}

.login-button.is-loading .login-button-icon,
.login-button.is-success .login-button-icon {
    opacity: 0;
}

.login-button.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    animation: spin 0.7s linear infinite;
}

.login-button.is-success::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 12px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: translate(-50%, -62%) rotate(45deg);
    animation: check-pop 0.25s ease both;
}

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

@keyframes check-pop {
    from {
        opacity: 0;
        transform: translate(-50%, -62%) rotate(45deg) scale(0.5);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -62%) rotate(45deg) scale(1);
    }
}

.login-form.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-9px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(3px);
    }
}

.form-group input:focus {
    outline: none;
}

input::placeholder {
    color: #8b8b95;
    font-weight: 400;
}

/* OTOMATIK DOLDURMA (Chrome/Safari)
   Tarayici kendi doldurma zeminini INPUT'un kutusuna boyar; o kutu kare koseli
   ve ikonlarin ARASINDA kaldigi icin yuvarlak alanin ortasinda tasmis bir blok
   olarak gorunuyordu.
   ONCE denendi: ayni renkle ic golge (box-shadow inset) + sarmalayiciyi beyaza
   cekmek. Yetmedi - alan bu kez tumden beyazlayip digerinden farkli duruyordu.
   SIMDIKI COZUM: zemini METNE kirp. background-clip:text ile tarayicinin
   boyadigi alan yalnizca harflerin icine dusuyor, yani zemin HIC gorunmuyor;
   alan normal doldurulmus gibi kaliyor (pill + ikonlar + kose bozulmadan).
   :is() bilinmeyen secicileri yutar - eski tarayicida kural komple dusmez. */
input:is(:-webkit-autofill, :autofill),
input:is(:-webkit-autofill, :autofill):hover,
input:is(:-webkit-autofill, :autofill):focus,
input:is(:-webkit-autofill, :autofill):active {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: #1a1c22;
    caret-color: #1a1c22;
    /* Chrome doldurmanin ardindan kendi mavi/sari zeminine donmek icin bir gecis
       baslatiyor; sure uzatilinca o renk hic ortaya cikmaz. */
    transition: background-color 600000s 0s;
}

.input-wrapper {
    display: flex;
    align-items: center;
    border-radius: 12px;
    background-color: rgba(245, 245, 247, 0.9);
    border: 1px solid rgba(20, 22, 30, 0.06);
    height: 42px;
    padding-left: 14px;
    padding-right: 14px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper:hover {
    border-color: rgba(20, 22, 30, 0.14);
}

.input-wrapper:focus-within {
    background-color: #ffffff;
    border-color: rgba(20, 22, 30, 0.55);
    box-shadow: 0 0 0 3px rgba(20, 22, 30, 0.07);
}

.input-wrapper > img {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.input-wrapper:focus-within > img {
    opacity: 0.85;
}

.password-toggle {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    width: auto;
    height: auto;
    cursor: pointer;
}

.password-toggle img {
    width: 16px;
    height: 16px;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.password-toggle:hover img {
    opacity: 0.9;
}

.input-wrapper input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
}

.blackpaw-logo {
    width: 70px;
    height: 70px;
    position: fixed;
    left: 50%;
    bottom: 50px;
    transform: translateX(-50%);
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.blackpaw-logo:hover {
    opacity: 1;
}

.blackpaw-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (prefers-reduced-motion: no-preference) {

    .login-card {
        animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .logo,
    .title,
    .line,
    .form-group,
    .login-button {
        animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .logo {
        animation-delay: 0.1s;
    }

    .title {
        animation-delay: 0.18s;
    }

    .line {
        animation-name: line-in;
        animation-delay: 0.28s;
    }

    .form-group {
        animation-delay: 0.36s;
    }

    .form-group+.form-group {
        animation-delay: 0.44s;
    }

    .login-button {
        animation-delay: 0.52s;
    }

    .blackpaw-logo {
        animation: fade-in 0.6s ease 0.75s both;
    }


    body.leaving .login-card {
        animation: card-out 0.45s cubic-bezier(0.55, 0, 0.85, 0.4) forwards;
    }

    body.leaving .blackpaw-logo {
        animation: fade-out 0.45s ease forwards;
    }

    body.leaving::after {
        opacity: 0;
        translate: 44px 0;
    }
}

@keyframes card-out {
    to {
        opacity: 0;
        translate: 0 -30px;
    }
}

@keyframes fade-out {
    to {
        opacity: 0;
    }
}

@keyframes card-in {
    from {
        opacity: 0;
        translate: 0 16px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        translate: 0 12px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

@keyframes line-in {
    from {
        opacity: 0;
        scale: 0 1;
    }

    to {
        opacity: 1;
        scale: 1 1;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

@media (max-width: 900px) {

    body::after {
        display: none;
    }
}

@media (max-width: 430px) {
    body {
        padding: 16px;
    }

    .login-card {
        padding: 32px 24px;
        --cat-width: 68px;
        --cat-right: 12px;
    }
}

@media (max-height: 760px) {
    .login-card {
        transform: translateY(-20px);
    }

    .blackpaw-logo {
        width: 56px;
        height: 56px;
        bottom: 24px;
    }
}

@media (max-height: 640px) {
    .login-card {
        transform: none;
    }

    .blackpaw-logo {
        display: none;
    }
}
