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

body {
    font-family: 'Arial', sans-serif;
    background-color: #121212;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    position: relative;
    width: 800px;
    height: 600px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #1e1e1e;
    width: 100%;
    height: 100%;
    transform: translateZ(0);
    will-change: transform;
    image-rendering: pixelated;
}

.ui-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.menu-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
}

.hidden {
    display: none;
}

.menu-button {
    background-color: #2a9d8f;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 18px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    min-width: 200px;
    text-align: center;
    transform: translateZ(0);
    will-change: transform;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.menu-button:hover {
    background-color: #218c7e;
}

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

.game-ui {
    pointer-events: auto;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stats-bar {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.score, .level, .skill-points {
    font-size: 18px;
    font-weight: bold;
}

.xp-bar {
    width: 200px;
    height: 10px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
}

#xp-fill {
    height: 100%;
    width: 0%;
    background-color: #e9c46a;
    transition: width 0.3s;
}

.icon-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.skill-item {
    background-color: #2a2a2a;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.skill-item:hover {
    background-color: #333;
}

.skill-item.unlocked {
    border-color: #2a9d8f;
}

.skill-item.locked {
    opacity: 0.7;
}

.skill-item.active {
    border-color: #e76f51;
    background-color: #3a3a3a;
}

.skill-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.refund-button {
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.refund-button:hover {
    opacity: 1;
}

.skill-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.skill-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.skill-description {
    font-size: 12px;
    color: #aaa;
}

.final-score {
    font-size: 24px;
    margin-bottom: 20px;
}