body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    background-color: #f5f5f5;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    position: fixed;
    width: 100%;
    height: 100%;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
    }
}

.container {
    text-align: center;
    position: relative;
    z-index: 1;
}

.gif-button {
    position: relative;
    width: 300px;
    height: 200px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: #000;
    margin: 20px 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    display: block;
}

.gif-button:focus {
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    .gif-button:hover {
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    }
}

.gif-button:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.gif-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.counter {
    font-size: 16px;
    color: #999;
    margin: 8px 0;
    font-weight: normal;
    text-shadow: none;
    opacity: 0.8;
}

@media (prefers-color-scheme: dark) {
    .counter {
        color: #777;
    }
}

.click-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    z-index: 2;
    animation: ripple 0.6s linear;
    transform-origin: center;
}

@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 0.6;
    }
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.gif-button.clicked {
    animation: bounce 0.2s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

@media (max-width: 768px), (hover: none), (pointer: coarse) {
    .gif-button {
        width: 280px;
        height: 180px;
        transform: none;
        min-width: 44px;
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }

    .gif-button:hover {
        transform: none;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }

    .gif-button:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .counter {
        font-size: 22px;
    }

    body {
        overscroll-behavior: none;
        -webkit-overflow-scrolling: auto;
    }
}

@media (max-width: 320px) {
    .gif-button {
        width: 260px;
        height: 160px;
    }

    .counter {
        font-size: 20px;
    }
}

@supports (-webkit-appearance: none) {
    .gif-button {
        -webkit-appearance: none;
        -webkit-border-radius: 15px;
    }
}

* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gif-button {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}