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

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

#game-container {
    position: relative;
    width: 90vw;
    height: 90vh;
    box-shadow: 0 0 20px rgba(0, 128, 255, 0.5);
    border-radius: 5px;
    overflow: hidden;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: block;
}

/* HUD Styles */
#hud {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    pointer-events: none;
}

#health-container, #exp-container {
    width: 200px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin-bottom: 5px;
    position: relative;
    overflow: hidden;
}

#health-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #ff3333, #ff6666);
    border-radius: 10px;
    transition: width 0.3s ease;
}

#exp-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #33ccff, #3366ff);
    border-radius: 10px;
    transition: width 0.3s ease;
}

#health-text, #exp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

#score {
    font-size: 18px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin-top: 5px;
}

/* Modal Styles */
.modal {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 20;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #1a1a2e;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 128, 255, 0.7);
    text-align: center;
    max-width: 80%;
    max-height: 80%;
    overflow-y: auto;
}

.modal h2 {
    color: #33ccff;
    margin-bottom: 20px;
    font-size: 24px;
}

#upgrade-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.upgrade-card {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    border: 2px solid #33ccff;
    border-radius: 8px;
    padding: 15px;
    width: 180px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.upgrade-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 128, 255, 0.5);
}

.upgrade-card h3 {
    color: #33ccff;
    margin-bottom: 10px;
    font-size: 16px;
}

.upgrade-card p {
    font-size: 14px;
    color: #cccccc;
}

.common {
    border-color: #ffffff;
}

.uncommon {
    border-color: #33cc33;
}

.rare {
    border-color: #cc33ff;
}

#restart-button {
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
}

#restart-button:hover {
    background: linear-gradient(135deg, #0099ff, #00ccff);
}

/* Particle Effects */
.particle {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

/* Animation for level up */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.pulse {
    animation: pulse 0.5s ease-in-out;
}

/* Hit animation */
@keyframes hit-flash {
    0% { filter: brightness(1); }
    50% { filter: brightness(2); }
    100% { filter: brightness(1); }
}

.hit-flash {
    animation: hit-flash 0.2s ease-in-out;
}