* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    touch-action: none;
    user-select: none;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 640px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#catContainer {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 300px;
    z-index: 10;
    pointer-events: none;
}

#catSvg {
    width: 100%;
    height: 100%;
}

#hat {
    pointer-events: all;
    transition: filter 0.2s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

#hat:hover {
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 255, 0, 0.5));
}

#hat:active {
    filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 255, 0, 0.7));
}

#gameCanvas, #effectsCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#effectsCanvas {
    pointer-events: none;
    z-index: 100;
}

#ui {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
}

#scoreDisplay {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-left: 10px;
}

button:hover {
    transform: scale(1.1);
    background: #fff;
}

button:active {
    transform: scale(0.95);
}

.toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 300;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.toast.show {
    opacity: 1;
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.flash {
    animation: flash 0.3s;
}

@keyframes flash {
    0%, 100% { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    50% { background: white; }
}

@media (max-width: 640px) {
    #catContainer {
        width: 150px;
        height: 225px;
    }
    
    #scoreDisplay {
        font-size: 16px;
        padding: 8px 16px;
    }
    
    button {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .toast {
        font-size: 20px;
        padding: 15px 30px;
    }
}

@media (max-height: 640px) {
    #catContainer {
        width: 150px;
        height: 225px;
        bottom: 5%;
    }
}

