/* ========================================
   CLAYMATION GLOBAL UI COMPONENTS
   Home Button & Coin Display
   ======================================== */

/* Home Button - Claymation Style */
.clay-home-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 110px;
    height: 110px;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s ease, filter 0.2s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    border: none;
    background: none;
    padding: 0;
}

.clay-home-btn:hover {
    transform: scale(1.05) translateY(-2px);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.clay-home-btn:active {
    transform: scale(0.95) translateY(1px);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.clay-home-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Coin Display - Claymation Style */
.clay-coin-display {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0;
    background-image: url('../images/global/clay_counter_background.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    width: 400px;
    height: 128px;
}

.clay-coin-icon {
    width: 45px;
    height: 45px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    flex-shrink: 0;
}

.clay-coin-number {
    font-size: 36px;
    font-weight: bold;
    color: #FFF8DC;
    text-shadow:
        2px 2px 0 #4A3728,
        -1px -1px 0 #4A3728,
        1px -1px 0 #4A3728,
        -1px 1px 0 #4A3728,
        0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 1px;
    font-family: 'Fredoka One', 'Comic Sans MS', cursive;
    line-height: 1;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .clay-home-btn {
        width: 70px;
        height: 70px;
        top: 15px;
        left: 15px;
    }

    .clay-coin-display {
        top: 15px;
        right: 15px;
        width: 300px;
        height: 96px;
    }

    .clay-coin-icon {
        width: 38px;
        height: 38px;
    }

    .clay-coin-number {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .clay-home-btn {
        width: 60px;
        height: 60px;
        top: 10px;
        left: 10px;
    }

    .clay-coin-display {
        top: 10px;
        right: 10px;
        width: 250px;
        height: 80px;
    }

    .clay-coin-icon {
        width: 32px;
        height: 32px;
    }

    .clay-coin-number {
        font-size: 24px;
    }
}

/* Accessibility */
.clay-home-btn:focus,
.clay-coin-display:focus-within {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

/* Animation for coin updates */
@keyframes coinPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.clay-coin-number.updated {
    animation: coinPulse 0.3s ease;
}