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

body {
    background: #1a0a2e;
    overflow: hidden;
    font-family: 'Fredoka One', 'Nunito', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
}

#canvas {
    display: block;
    cursor: default;
    image-rendering: auto;
}

#touch-controls {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#joystick-area {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 120px;
    height: 120px;
    pointer-events: auto;
    touch-action: none;
}

#joystick-base {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 3px solid rgba(255,255,255,0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#joystick-thumb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    position: absolute;
    transition: none;
}

#interact-btn {
    position: absolute;
    bottom: 40px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(76,175,80,0.7);
    border: 3px solid rgba(255,255,255,0.5);
    color: white;
    font-size: 28px;
    pointer-events: auto;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pause-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 20px;
    pointer-events: auto;
    touch-action: manipulation;
}

#footer {
    position: fixed;
    bottom: 4px;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    font-family: 'Nunito', sans-serif;
    z-index: 5;
}

#footer a {
    color: rgba(255,200,255,0.6);
    text-decoration: none;
}

#footer a:hover {
    color: #FF69B4;
}

@media (pointer: coarse) {
    #touch-controls {
        display: block;
    }
}

@media (hover: none) {
    #touch-controls {
        display: block;
    }
}