@tailwind base;
@tailwind components;
@tailwind utilities;

.touch-action-none {
    touch-action: none;
}

body {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* Custom shake effect for hits */
.shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-2px, 2px, 0);
    }

    20%,
    80% {
        transform: translate3d(4px, -2px, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-6px, 4px, 0);
    }

    40%,
    60% {
        transform: translate3d(6px, -4px, 0);
    }
}

/* Floating combat text for graze/score */
.floating-text {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    pointer-events: none;
    user-select: none;
    animation: floatUp 0.8s ease-out forwards;
    z-index: 30;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.8);
    }

    15% {
        opacity: 1;
        transform: translateY(-15px) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translateY(-40px) scale(1);
    }
}