/* ============================================================
   Violencetown — v0.3.0
   Full pixel-art UI. Minimal HTML — mostly canvas.
   ============================================================ */

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

body {
    background: #0a0a0a;
    color: #c8b888;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden { display: none !important; }

/* --- Splash --- */

#splash {
    position: fixed; inset: 0; z-index: 100;
    background: #0a0a0a;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 16px;
}
#splash.gone { display: none; }

#splash-canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    width: 640px; height: 440px;
}

#splash-buttons {
    display: flex; gap: 12px;
}

#splash-buttons button {
    background: #2a2218;
    border: 2px solid #8b7340;
    color: #d4b96a;
    font-family: 'Courier New', monospace;
    font-size: 14px; font-weight: 700;
    padding: 10px 32px;
    cursor: pointer;
    letter-spacing: 3px;
    transition: all 0.15s;
}

#splash-buttons button:hover {
    background: #3a3020;
    border-color: #d4b96a;
    color: #fff;
}

#splash-hint {
    font-size: 10px; color: #555; letter-spacing: 2px;
}

/* --- Game layout --- */

#game-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw; height: 100vh;
}

#game-layout {
    display: flex;
    align-items: stretch;
    gap: 0;
    height: min(calc(100vh - 16px), calc(100vw - 16px));
    max-height: 900px;
}

#game-canvas {
    display: block;
    background: #000;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    aspect-ratio: 1;
    height: 100%;
}

/* --- Log panel --- */

#log-panel {
    width: 200px;
    background: #12100c;
    border-left: 2px solid #3a3020;
    display: flex; flex-direction: column;
    overflow: hidden;
}

#text-log {
    flex: 1; overflow-y: auto;
    padding: 8px;
    font-size: 10px; line-height: 1.6;
    color: #a89868;
}
#text-log::-webkit-scrollbar { width: 4px; }
#text-log::-webkit-scrollbar-track { background: #0a0a0a; }
#text-log::-webkit-scrollbar-thumb { background: #3a3020; }

.log-line { padding: 1px 0; }
.log-line-combat { color: #cc6644; }
.log-line-pickup { color: #88aa44; }
.log-line-system { color: #6688aa; }

/* --- New game button (top-right corner) --- */

#new-game {
    position: absolute; top: 8px; right: 8px;
    background: #1a1610;
    border: 1px solid #3a3020;
    color: #777;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    padding: 3px 8px;
    cursor: pointer;
    letter-spacing: 1px;
    z-index: 10;
}
#new-game:hover { border-color: #8b7340; color: #d4b96a; }

/* --- Responsive --- */

@media (max-width: 700px) {
    #log-panel { display: none; }
}
