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

body {
    background-color: #121418;
    color: #e0e0e0;
    font-family: 'Courier New', Courier, monospace;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* Version Switcher Bar */
.version-switcher {
    display: flex;
    gap: 8px;
    background: rgba(22, 27, 38, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 4px;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.version-link {
    padding: 6px 16px;
    border-radius: 9999px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.version-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.version-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.arcade-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: radial-gradient(circle at center, #2a2e39 0%, #16181f 100%);
    border: 8px solid #3b4252;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 2px 5px rgba(255, 255, 255, 0.1);
    padding: 16px 20px 20px 20px;
    max-width: 95vw;
}

.cabinet-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 4px 8px;
    border-bottom: 2px solid #2e3440;
}

.title-badge {
    font-size: 1.25rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 2px;
}

.subtitle {
    font-size: 0.85rem;
    color: #88c0d0;
    margin-left: 8px;
}

.controls-hint {
    font-size: 0.8rem;
    color: #d8dee9;
    display: flex;
    gap: 12px;
}

.controls-hint span {
    background: #2e3440;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #4c566a;
}

.screen-frame {
    position: relative;
    background-color: #000;
    border: 6px solid #1a1c23;
    border-radius: 8px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    max-width: 960px;
    height: auto;
    aspect-ratio: 640 / 350;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    cursor: pointer;
}

/* CRT Scanlines Overlay */
.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 6px 100%;
    z-index: 10;
    transition: opacity 0.2s ease;
}

.crt-overlay.disabled {
    opacity: 0;
}

/* Quick Bar below canvas */
.quick-toolbar {
    margin-top: 14px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.retro-btn {
    background: linear-gradient(180deg, #434c5e 0%, #2e3440 100%);
    color: #eceff4;
    border: 2px solid #5e81ac;
    border-radius: 4px;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: all 0.1s ease;
}

.retro-btn:hover {
    background: linear-gradient(180deg, #4c566a 0%, #3b4252 100%);
    border-color: #88c0d0;
}

.retro-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-info {
    margin-top: 15px;
    font-size: 0.75rem;
    color: #65737e;
    text-align: center;
}
