* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body, html {
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #eee;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    display: flex;
    overflow: hidden;
}

#viewport {
    flex: 1;
    height: 100vh;
    position: relative;
    background-color: #000;
    overflow: hidden;
}

canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

#sidebar {
    width: 320px;
    height: 100%;
    background-color: #050505;
    border-left: 1px solid #333;
    padding: 25px;
    overflow-y: auto;
}

h1 { 
    font-size: 24px; 
    margin-bottom: 10px; 
    color: #fff; 
}

h2 { 
    font-size: 18px; 
    margin-top: 25px; 
    margin-bottom: 10px; 
    color: #00ff00; 
    border-bottom: 1px solid #222; 
    padding-bottom: 5px; 
}

p { 
    font-size: 14px; 
    line-height: 1.6; 
    color: #aaa; 
    margin-bottom: 10px; 
}

.control-item { 
    margin-bottom: 8px; 
    font-size: 14px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

.key { 
    color: #fff; 
    font-weight: bold; 
    background: #222; 
    padding: 2px 8px; 
    border-radius: 3px; 
    font-family: monospace;
}

#fs-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #444;
    color: #fff;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

#fs-btn:hover { 
    background: rgba(255, 255, 255, 0.2); 
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(0, 255, 0, 0.7);
    border-radius: 80%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
}

/* Schermata iniziale overlay */
#start-screen {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    cursor: pointer;
}

#start-screen h1 {
    font-size: 48px;
    color: #00ff00;
    text-shadow: 0 0 20px #00ff00;
    margin-bottom: 20px;
}

#start-screen p {
    font-size: 18px;
    color: #aaa;
}

#start-screen .click-hint {
    font-size: 24px;
    color: #fff;
    margin-top: 30px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}