/* Game page styles (from vsn_loading) */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Press Start 2P', monospace; background: #000; overflow: hidden; color: #fff; }

#loading-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

#game-viewport {
    position: relative;
    width: min(100vw, 100vh * 16 / 9);
    height: min(100vh, 100vw * 9 / 16);
    max-width: 100vw;
    max-height: 100vh;
    flex-shrink: 0;
}

#gameCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    background: #0A0E17;
    display: block;
    image-rendering: auto;
    image-rendering: crisp-edges;
}

#loading-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
    display: grid;
    grid-template-areas: "start-menu start-menu start-menu" ". . game-stats";
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(20,20,40,0.4) 100%);
    pointer-events: none;
}

#start-menu { grid-area: start-menu; text-align: center; pointer-events: auto; }
#start-menu .menu-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 14px 32px;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    color: #0A0E17;
    background: linear-gradient(180deg, #39ff14 0%, #22c55e 100%);
    border: 3px solid #16a34a;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 0 #15803d, 0 6px 12px rgba(0,0,0,0.3);
}
#start-menu .menu-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #15803d, 0 8px 16px rgba(0,0,0,0.35); }
#start-menu .menu-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #15803d; }

#server-info { text-align: center; margin-bottom: 0; }
#server-logo { margin-bottom: 20px; }
#logo { width: 200px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5)); }
#server-name {
    font-size: 2.5rem;
    color: #39ff14;
    text-shadow: 3px 3px 0 #000, 0 0 20px rgba(57, 255, 20, 0.5);
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
}
#server-description { font-size: 1rem; color: #8B5CF6; text-shadow: 2px 2px 0 #000; }

#game-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #4B5563;
    border-radius: 6px;
    padding: 8px;
    grid-area: game-stats;
    max-width: 250px;
    backdrop-filter: blur(5px);
    pointer-events: auto;
    align-self: end;
    justify-self: end;
    margin-bottom: 20px;
}
.stat-item { text-align: center; }
.stat-label { display: block; font-size: 0.6rem; color: #9CA3AF; margin-bottom: 3px; }
.stat-item span:last-child { font-size: 0.8rem; color: #F59E0B; text-shadow: 1px 1px 0 #000; }

#audio-controls { position: absolute; top: 20px; right: 20px; pointer-events: auto; }
.audio-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #4B5563;
    color: #E5E7EB;
    padding: 10px 15px;
    border-radius: 5px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}
.audio-btn:hover { background: rgba(59, 130, 246, 0.3); border-color: #3B82F6; color: #60A5FA; }

#connection-status { display: none; }

@keyframes glow {
    from { text-shadow: 3px 3px 0 #000, 0 0 20px rgba(57, 255, 20, 0.5); }
    to { text-shadow: 3px 3px 0 #000, 0 0 30px rgba(57, 255, 20, 0.8); }
}

@media (max-width: 1366px) {
    #server-name { font-size: 1.5rem; }
    #logo { width: 120px; }
    #loading-overlay { padding: 20px; gap: 10px; }
    #game-stats { flex-direction: row; justify-content: space-around; max-width: 300px; }
    .stat-item { display: flex; flex-direction: column; align-items: center; }
}
