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

/* Full-height chain so Phaser's parent offsetHeight is never 0. */
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: #111;
    font-family: 'Press Start 2P', monospace;
}

/* Phaser's autoCenter:CENTER_BOTH handles canvas centering via margin offsets. */
#game-container {
    width: 100%;
    height: 100%;
}

#game-container canvas {
    display: block;
    touch-action: none;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
}

#portrait-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #111;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.portrait-inner {
    text-align: center;
    color: #F5C400;
    font-family: 'Press Start 2P', monospace;
}

.portrait-icon {
    font-size: 64px;
    margin-bottom: 24px;
    display: block;
    animation: spin-icon 2s linear infinite;
}

.portrait-inner p {
    font-size: 16px;
    margin: 8px 0;
}

.portrait-sub {
    font-size: 10px !important;
    color: #888 !important;
    margin-top: 16px !important;
}

@keyframes spin-icon {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
