:root {
    touch-action: pan-x pan-y;
    height: 100%;
}
body {
    &.purple {
        background: linear-gradient(135deg, #BD93F9 0%, #6e40c9 25%, #ff79c6 50%, #6e40c9 75%, #BD93F9 100%);
        background-size: 300% 300%;
        animation: gradient-shift 8s ease infinite;
    }
    &.blue {
        background: linear-gradient(135deg, #66D9EF 0%, #1e90ff 25%, #BD93F9 50%, #1e90ff 75%, #66D9EF 100%);
        background-size: 300% 300%;
        animation: gradient-shift 8s ease infinite;
    }
    &.pink {
        background: linear-gradient(135deg, #FF79C6 0%, #ff2d78 25%, #FFB86C 50%, #ff2d78 75%, #FF79C6 100%);
        background-size: 300% 300%;
        animation: gradient-shift 8s ease infinite;
    }
    &.yellow {
        background: linear-gradient(135deg, #F1FA8C 0%, #FFB86C 25%, #FF79C6 50%, #FFB86C 75%, #F1FA8C 100%);
        background-size: 300% 300%;
        animation: gradient-shift 8s ease infinite;
    }
}
.drumkit {
    position: relative;
    width: 100%;
    height: 100vh;
    display: grid;
    overflow: hidden;
    grid-template-columns: 50% 50%;
    grid-template-rows: 33.333% 33.333% 33.333%;

    .instrument {
        background: transparent;
        border: 4px solid rgba(255, 255, 255, 0.02);
        cursor: pointer;
        transition: all 0.2s;
        user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;

        &:active {
            background: rgba(255, 255, 255, 0.02);

            img {
                scale: 1.3;
            }
        }

        img {
            max-width: 96%;
            height: auto;
            transition: rotate 0.4s ease, scale 0.1s ease;
            user-select: none;
            -webkit-touch-callout: none;

            &.spin {
                animation-name: spin;
                animation-duration: 5000ms;
                animation-iteration-count: infinite;
                animation-timing-function: linear;
            }

            &.pulse {
                animation-name: pulse;
                animation-duration: 1000ms;
                animation-iteration-count: infinite;
                animation-timing-function: linear;
            }
        }
    }
}

@media (min-width: 762px) {
    .drumkit {
        .instrument {
            img {
                max-height: 96%;
                width: auto;
            }
        }
    }

}

@media (min-width: 992px) {
    .drumkit {
        grid-template-columns: 33.333% 33.333% 33.333%;
        grid-template-rows: 50% 50%;
    }

}

.ring {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 4px solid var(--ring-color, rgba(255, 255, 255, 0.85));
    pointer-events: none;
    z-index: 9998;
    animation: ring-expand 0.9s ease-out forwards;
    transform: translate(-50%, -50%);
}

@keyframes ring-expand {
    0% {
        opacity: 0.9;
        width: 20px;
        height: 20px;
    }
    100% {
        opacity: 0;
        width: 400px;
        height: 400px;
    }
}

.sparkle {
    position: fixed;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    animation: sparkle-burst 0.6s ease-out forwards;
}

@keyframes sparkle-burst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) scale(0.3);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

#cache-version {
    position: fixed;
    top: 8px;
    right: 8px;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    pointer-events: none;
    z-index: 1;
    font-family: monospace;
    letter-spacing: 0.05em;
}

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

@keyframes pulse {
    0% {
        transform: scale(1.0);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1.0);
    }
}