@font-face {
    font-family: 'Bitcount';
    src: url('assets/fonts/Bitcount.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html {
    overscroll-behavior: none;
}

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

body {
    font-family: "Bitcount", system-ui, sans-serif;
    min-height: 100vh;
    background: radial-gradient(ellipse at bottom right, #400202 0%, #050000 50%, #000000 100%);
    background-attachment: fixed;
    background-size: cover;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    overscroll-behavior: none;
}

.auth-card {
    max-width: 480px;
    width: 100%;
    background: rgba(18, 3, 3, 0.45);
    backdrop-filter: blur(40px) saturate(130%);
    -webkit-backdrop-filter: blur(40px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    padding: 45px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.75), inset 0 1px 0px rgba(255, 255, 255, 0.1);
    text-align: center;
}

h1 {
    font-size: 2.4rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: #ff5c5c;
    text-shadow: 0 4px 20px rgba(255, 92, 92, 0.25);
}

p {
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 30px;
    letter-spacing: 0.3px;
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 35px;
    background: rgba(0, 0, 0, 0.45);
    padding: 20px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s;
}

.pin-display.error {
    border-color: #ff3c3c;
    animation: shake 0.4s ease-in-out;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pin-dot.filled {
    background-color: #ff5c5c;
    border-color: #ff5c5c;
    box-shadow: 0 0 12px rgba(255, 92, 92, 0.6);
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 10px;
}

.pad-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    font-family: "Bitcount", system-ui, sans-serif;
    font-size: 1.5rem;
    padding: 16px 0;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}

.pad-btn:hover {
    background: rgba(255, 92, 92, 0.1);
    color: #ff5c5c;
    border-color: rgba(255, 92, 92, 0.3);
}

.pad-btn:active {
    transform: scale(0.96);
}

.btn-clear {
    font-size: 1.1rem;
    color: #a0a0a0;
}

.btn-enter {
    font-size: 1.1rem;
    background: rgba(255, 92, 92, 0.08);
    border-color: rgba(255, 92, 92, 0.2);
    color: #ff5c5c;
}

.btn-enter:hover {
    background: rgba(255, 92, 92, 0.2);
    color: #ffffff;
    border-color: rgba(255, 92, 92, 0.5);
}

.back-btn {
    display: inline-block;
    margin-top: 35px;
    color: #ffffff;
    text-decoration: none !important;
    font-size: 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
    padding-bottom: 4px;
    transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-btn:hover {
    color: #ff5c5c;
    border-color: #ff5c5c !important;
}

@keyframes shake {

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

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

@media (max-width: 600px) {
    .auth-card {
        padding: 30px 20px;
        border-radius: 16px;
    }

    h1 {
        font-size: 1.8rem;
    }

    p {
        font-size: 1.1rem;
    }

    .pad-btn {
        padding: 12px 0;
        font-size: 1.3rem;
    }
}