:root {
    --font-main: 'Mochiy Pop One', sans-serif;
    --color-primary: #ff9f43;
    --color-secondary: #ff6b6b;
    --color-bg: #feca57;
}

* {
    box-sizing: border-box;
    user-select: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--color-bg);
    overflow: hidden;
    cursor: auto;
    /* Default cursor visible */
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
}

.scene.active {
    display: flex;
}

/* Title & Result Styles */
h1,
h2 {
    font-size: 4rem;
    color: var(--color-secondary);
    text-shadow: 2px 2px 0px #fff;
    margin-bottom: 2rem;
}

p {
    font-size: 1.5rem;
    color: #333;
}

button {
    font-family: var(--font-main);
    font-size: 2rem;
    padding: 1rem 3rem;
    background-color: var(--color-primary);
    border: 4px solid #fff;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    box-shadow: 0 5px 0 #e58e26;
    transition: transform 0.1s;
}

button:active {
    transform: translateY(5px);
    box-shadow: none;
}

button:hover {
    background-color: var(--color-secondary);
}

/* Game Scene */
#scene-game {
    background: none;
    cursor: none;
}

#room-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/room.png');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

#furniture-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.furniture {
    position: absolute;
    width: 300px;
    height: 300px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s;
}

.furniture.shaking {
    animation: shake 0.5s infinite;
}

/* Smoke Effect */
.furniture.shaking::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background-image: url('images/effect/smoke.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: smoke-pulse 0.5s infinite;
    z-index: 20;
    pointer-events: none;
}

@keyframes smoke-pulse {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
    }

    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
    }
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

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

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.furniture.destroyed {
    transition: opacity 0.3s, transform 0.3s;
    opacity: 0;
    transform: scale(1.5);
}

/* Cat Character */
#cat {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: url('images/cat/cat.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 100;
    pointer-events: none;
    /* Ignore mouse events so we can click through it */
    transform: translate(-50%, -50%);
    /* Center on cursor */
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 90;
    pointer-events: none;
}

#timer,
#score {
    font-size: 3rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
}

/* Result Rank Styles */
#result-rank {
    font-weight: bold;
    color: var(--color-secondary);
}