/* style.css — Game shell styling, CRT canvas, and touch controls */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--color-bg);
    font-family: var(--font-family);
    color: var(--color-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

canvas {
    display: block;
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border-radius: 8px;
    overflow: hidden;
}

#fallback {
    display: none;
    color: var(--color-primary);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    line-height: var(--line-height-md);
    text-align: center;
    margin: var(--space-8);
}

noscript {
    color: var(--color-neutral-light);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-sm);
    display: block;
    text-align: center;
    margin: var(--space-8);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Touch controls */
#touch-controls {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 10;
    pointer-events: none;
}

.touch-group {
    display: flex;
    gap: 12px;
    pointer-events: auto;
}

#touch-controls button {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
    font-size: 22px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    outline: none;
    cursor: pointer;
}

#touch-controls button:active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.7);
}

@media (max-height: 500px) {
    #touch-controls button { width: 44px; height: 44px; font-size: 18px; }
    .touch-group { gap: 8px; }
    #touch-controls { padding: 8px 12px; }
}

/* Hidden SVG */
svg[aria-hidden] { position: absolute; width: 0; height: 0; }
