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

body {
    background: #1a1a2e;
    overflow: hidden;
    font-family: 'IBM Plex Mono', monospace;
    -webkit-user-select: none;
    user-select: none;
}

#canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#ui-overlay > * {
    pointer-events: auto;
}

.menu-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    padding: 12px 24px;
    border: 2px solid #f0c040;
    background: rgba(20, 20, 40, 0.9);
    color: #f0c040;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-btn:hover {
    background: #f0c040;
    color: #1a1a2e;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(240, 192, 64, 0.5);
}

.menu-btn:active {
    transform: scale(0.95);
}

.menu-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.menu-btn.disabled:hover {
    background: rgba(20, 20, 40, 0.9);
    color: #f0c040;
    transform: none;
    box-shadow: none;
}

.hud-panel {
    background: rgba(10, 10, 30, 0.85);
    border: 1px solid rgba(240, 192, 64, 0.3);
    padding: 8px 12px;
    color: #e8e8e8;
    font-size: 12px;
    border-radius: 4px;
}

.pause-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 10, 30, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 100;
}

.pause-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 28px;
    color: #f0c040;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(240, 192, 64, 0.6);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 20px;
    max-width: 600px;
}

.skin-item {
    width: 80px;
    height: 80px;
    border: 2px solid #444;
    background: rgba(30, 30, 50, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-direction: column;
    border-radius: 4px;
}

.skin-item:hover {
    border-color: #f0c040;
    transform: scale(1.1);
}

.skin-item.equipped {
    border-color: #f0c040;
    box-shadow: 0 0 10px rgba(240, 192, 64, 0.5);
}

.skin-item.locked {
    opacity: 0.5;
}

.skin-price {
    font-size: 9px;
    color: #f0c040;
    margin-top: 4px;
    font-family: 'Press Start 2P', cursive;
}

.dialog-box {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    background: rgba(10, 10, 30, 0.95);
    border: 2px solid #f0c040;
    border-radius: 8px;
    padding: 16px 20px;
    color: #e8e8e8;
    font-size: 14px;
    line-height: 1.6;
}

.dialog-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    color: #f0c040;
    margin-bottom: 8px;
}

.world-map-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 10, 30, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.world-node {
    width: 100px;
    height: 80px;
    border: 2px solid #666;
    background: rgba(40, 40, 60, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-direction: column;
    border-radius: 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    color: #ccc;
    text-align: center;
    padding: 8px;
}

.world-node:hover {
    border-color: #f0c040;
    transform: scale(1.05);
}

.world-node.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.world-node.current {
    border-color: #4ecdc4;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.4);
}

.footer-link {
    position: fixed;
    bottom: 8px;
    right: 12px;
    font-size: 10px;
    color: rgba(240, 192, 64, 0.5);
    text-decoration: none;
    z-index: 1000;
}

.footer-link:hover {
    color: #f0c040;
}

/* Cutscene animations */
@keyframes cutsceneFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cutscene-active #ui-overlay {
    pointer-events: none;
}

@media (max-width: 768px) {
    .menu-btn {
        font-size: 11px;
        padding: 10px 18px;
    }
    .shop-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .skin-item {
        width: 60px;
        height: 60px;
    }
}