/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    -webkit-user-drag: none;
    user-select: none;
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Press Start 2P', monospace;
    background-color: #000;
    color: #fff;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    cursor: url('content/mano.png') 0 0, pointer;
}

/* ===== CANVAS CONTAINER ===== */
#canvas-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
}

/* ===== INFO/LEGENDA ===== */
#info {
    position: fixed;
    top: 20px;
    left: 20px;
    color: #ffff00;
    font-size: 10px;
    text-shadow: 0 0 10px #ffff00;
    transition: opacity 0.3s;
    line-height: 1.8;
    z-index: 100;
}

#info-click,
#info-click2 {
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

#info.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== SPLASH SCREEN ===== */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffff00;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    flex-direction: column;
}

#splash-screen.hidden {
    display: none;
}

#logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

#progress-bar {
    position: relative;
    width: 260px;
    height: 3px;
    background: #00aa00;
}

#progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #ff00ff;
    transition: width 0.15s linear;
}

#logo {
    width: 200px;
    height: auto;
    animation: fadeInLogo 2s ease-out forwards;
}

@keyframes fadeInLogo {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== JOYSTICK ===== */
#joystick-left,
#joystick-right {
    position: fixed;
    bottom: 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ffff00;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: grab;
}

#joystick-left {
    left: 30px;
}

#joystick-right {
    right: 30px;
}

#joystick-left img,
#joystick-right img {
    width: 70px;
    height: 70px;
    pointer-events: none;
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 900px) {
    #logo {
        width: 150px;
    }
    
    #progress-bar {
        width: 200px;
    }
    
    #info {
        display: none;
    }
    /* I joystick NON vengono più forzati visibili su mobile, solo via JS touch */
}

/* ===== TABLET TOUCH ===== */
@media (pointer: coarse) {
    #info-click { display: none; }
    #info-click2 { display: none; }
}

@media (pointer: coarse) and (min-width: 601px) {
    #joystick-left,
    #joystick-right {
        width: 130px;
        height: 130px;
        bottom: 40px;
    }
    #joystick-left { left: 40px; }
    #joystick-right { right: 40px; }
    #joystick-left img,
    #joystick-right img {
        width: 110px;
        height: 110px;
    }
}