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

html, body {
    height: 100%;
    margin: 0;
}

/* Pixel fonts — Public Pixel (body/UI) + Press Start 2P (arcade display) */
@font-face {
    font-family: 'PublicPixel';
    src: url('../fonts/PublicPixel.woff2') format('woff2'),
         url('../fonts/PublicPixel.woff') format('woff'),
         url('../fonts/PublicPixel.ttf') format('truetype'),
         url('../fonts/PublicPixel.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    font-size-adjust: none;
}
@font-face {
    font-family: 'PressStart2P';
    src: url('../fonts/PressStart2P.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    font-size-adjust: none;
}

/* Arcade palette (mirrors UITheme.js) */
:root {
    --bg-deep: #0d0b2b;
    --bg-panel: #191540;
    --ink: #f4f4f8;
    --ink-muted: #8b88b8;
    --cyan: #2ce8f5;
    --red: #ff3864;
    --gold: #ffd23f;
    --bevel-light: #4a44a0;
    --bevel-dark: #0a0820;
}

body {
    font-family: 'PublicPixel', monospace;
    /* Microscope dark-field: radial glow toward the center of the cabinet */
    background:
        radial-gradient(ellipse at 50% 42%, #16123f 0%, var(--bg-deep) 60%, #070619 100%);
    color: var(--ink);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    overflow: hidden;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#game {
    display: block;
    width: 100%;
    height: 100%;
}

/* The canvas is the arcade screen: chunky beveled bezel around it */
#game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-panel);
    padding: 10px;
    border: 4px solid var(--bevel-light);
    border-right-color: var(--bevel-dark);
    border-bottom-color: var(--bevel-dark);
    box-shadow:
        0 0 0 4px var(--bevel-dark),
        0 0 28px rgba(44, 232, 245, 0.14);
}

canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Marquee above the screen */
#game-info-top {
    text-align: center;
    line-height: 1;
}

#game-info-top h1 {
    font-family: 'PressStart2P', 'PublicPixel', monospace;
    color: var(--red);
    margin: 0;
    font-size: 22px;
    letter-spacing: 1px;
    /* Layered pixel shadow for a lit-marquee look */
    text-shadow: 0 3px 0 var(--bevel-dark), 0 0 14px rgba(255, 56, 100, 0.45);
}

#game-info-top p {
    color: var(--ink-muted);
    margin: 8px 0 0;
    font-size: 9px;
    letter-spacing: 1px;
}

/* Control-panel legend below the screen */
#game-info-bottom {
    text-align: center;
}

#game-info-bottom p {
    color: var(--cyan);
    margin: 0;
    font-size: 9px;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Fullscreen režim - skrýt okolní elementy a maximalizovat canvas */
body:fullscreen #game-info-top,
body:fullscreen #game-info-bottom {
    display: none;
}

body:fullscreen #game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    z-index: 9999;
}

body:fullscreen {
    gap: 0;
    padding: 0;
    justify-content: flex-start;
    align-items: flex-start;
}

/* Webkit fullscreen varianta */
body:-webkit-full-screen #game-info-top,
body:-webkit-full-screen #game-info-bottom {
    display: none;
}

body:-webkit-full-screen #game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    z-index: 9999;
}

body:-webkit-full-screen {
    gap: 0;
    padding: 0;
    justify-content: flex-start;
    align-items: flex-start;
}

/* Mozilla fullscreen varianta */
body:-moz-full-screen #game-info-top,
body:-moz-full-screen #game-info-bottom {
    display: none;
}

body:-moz-full-screen #game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    z-index: 9999;
}

body:-moz-full-screen {
    gap: 0;
    padding: 0;
    justify-content: flex-start;
    align-items: flex-start;
}