@import url('https://fonts.googleapis.com/css2?family=Titan+One&family=Fredoka:wght@400;600;700;900&display=swap');

body {
    font-family: 'Fredoka', sans-serif;
}

h1,
h2,
#target-number,
.opt-btn {
    font-family: 'Titan One', cursive;
}

/* Animations */
#flash-overlay {
    pointer-events: none !important;
}

.flash-anim {
    animation: flash 0.15s ease-out forwards;
}

@keyframes flash {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
    }
}

.item-pop {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Block Styling */
.block-group {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s;
}

.block-group:active {
    transform: scale(0.95);
}

.block-unit {
    width: 24px;
    height: 24px;
    background: #fbbf24;
    border: 2px solid #b45309;
    border-radius: 4px;
    box-shadow: 0 2px 0 #92400e;
}

/* Number Line Tick */
.tick {
    position: absolute;
    bottom: 0;
    width: 2px;
    height: 12px;
    background: #cbd5e1;
    transform: translateX(-50%);
}

.tick.major {
    height: 20px;
    background: #94a3b8;
}

.tick-label {
    position: absolute;
    top: 24px;
    /* below line */
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #64748b;
    font-weight: bold;
}

/* Shutter Button Pulse */
#btn-snap {
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* High-quality claymation background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('clay_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
}