.texture-overlay {
    background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
    mix-blend-mode: multiply;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
}


.dotted-bg {

    background-image: radial-gradient(#000 1px, transparent 1px);
    background-size: 24px 24px;
}

.brutalist-card {
    border: 4px solid black;
    background: white;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 8px 8px 0 0 #000;
}

.ink-block {
    background: black;
    color: white;
    padding: 0.5rem 1rem;
    border: 4px solid black;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
    box-shadow: 6px 6px 0 0 #fe5e1e;
}

.ink-block:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 0 #fe5e1e;
}

.white-block {
    background: white;
    color: black;
    padding: 0.5rem 1rem;
    border: 4px solid black;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
    box-shadow: 6px 6px 0 0 #000;
}

.white-block:hover {
    background: #e8e4de;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 0 #fe5e1e;
}

.orange-block {
    background: #FF5F1F;
    color: black;
    padding: 0.5rem 1rem;
    border: 4px solid black;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
    box-shadow: 6px 6px 0 0 #000;
}

.orange-block:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 0 #000;
}

.cat-btn {
    background: white;
    color: black;
    border: 3px solid black;
    padding: 0.4rem 0.8rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 0 black;
    text-transform: uppercase;
}

.cat-btn:hover {
    background: #fdf9f3;
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 0 black;
}

.cat-btn.active-cat {
    background: #FF5F1F;
    color: white;
    box-shadow: 4px 4px 0 0 black;
    transform: scale(1.05);
    z-index: 5;
}

.cat-btn-large {
    background: #FF5F1F;
    color: black;
    border: 4px solid black;
    padding: 1rem 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 6px 6px 0 0 black;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.cat-btn-large:hover {
    background: #FF7F50;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 0 black;
}

.cat-btn-large:active {
    transform: scale(0.98);
}


.staple {
    position: absolute;
    width: 20px;
    height: 6px;
    background: #7e7576;
    border: 1px solid black;
    z-index: 20;
}


.tape-strip {
    position: absolute;
    width: 100px;
    height: 30px;
    background: rgba(232, 228, 222, 0.8);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transform: rotate(-15deg);
    z-index: 10;
    pointer-events: none;
}

.stamp {
    position: absolute;
    border: 3px solid #FF5F1F;
    color: #FF5F1F;
    padding: 0.25rem 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    transform: rotate(15deg);
    opacity: 0.8;
    pointer-events: none;
}

#deck-trigger {
    perspective: 1000px;
}

/* Realistic Shuffle/Riffle Animation - "Nyelip" Effect */
@keyframes riffle-top {

    0%,
    100% {
        transform: rotate(1deg) translate(0, 0) translateZ(0);
    }

    25% {
        transform: rotate(5deg) translate(30px, -10px) translateZ(20px);
    }

    50% {
        transform: rotate(-3deg) translate(-15px, 5px) translateZ(-10px);
    }

    75% {
        transform: rotate(2deg) translate(10px, -5px) translateZ(10px);
    }
}

@keyframes riffle-mid {

    0%,
    100% {
        transform: rotate(-2deg) translate(0, 0) translateZ(0);
    }

    25% {
        transform: rotate(-10deg) translate(-80px, -20px) translateZ(50px);
    }

    50% {
        transform: rotate(5deg) translate(40px, 10px) translateZ(30px);
    }

    75% {
        transform: rotate(-5deg) translate(-20px, -10px) translateZ(40px);
    }
}

@keyframes riffle-bot {

    0%,
    100% {
        transform: translate(16px, 16px) rotate(0deg) translateZ(0);
    }

    30% {
        transform: translate(140px, 30px) rotate(15deg) translateZ(100px);
    }

    60% {
        transform: translate(-20px, -20px) rotate(-10deg) translateZ(60px);
    }

    85% {
        transform: translate(10px, 10px) rotate(5deg) translateZ(80px);
    }
}

.shuffling #deck-top,
.shuffling #deck-mid,
.shuffling #deck-bot {
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.shuffling #deck-top {
    animation: riffle-top 0.4s infinite ease-in-out;
}

.shuffling #deck-mid {
    animation: riffle-mid 0.4s infinite ease-in-out;
}

.shuffling #deck-bot {
    animation: riffle-bot 0.4s infinite ease-in-out;
}


.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card-flipped .card-flip-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.card-front {
    transform: rotateY(180deg);
}

.hidden-state {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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