html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}
body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    color: #fff;
    font-family: Arial, sans-serif;
}
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('back.jpeg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.4;
}
#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
    margin-top: auto;
    margin-bottom: auto;
}

.joystick {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 10px;
    background-color: rgba(26, 26, 26, 0.7);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    position: relative;
    width: fit-content; /* Ensure the joystick container has a defined width */
    height: fit-content; /* Ensure the joystick container has a defined height */
}
.button {
    width: 60px;
    height: 60px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}
.button svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}
.button:active {
    transform: translateY(4px) scale(0.95);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}
.action-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 24px;
    color: #000;
    position: relative;
}
.yellow { background-color: #ffff00; }
.blue { background-color: #0000ff; color: #fff; }
.red { background-color: #ff0000; }
.disabled {
    background-color: #444;
    pointer-events: none;
    opacity: 0.2;
    transition: all 0.5s ease;
}
.countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    color: #ff6347;
    background-color: rgba(26, 26, 26, 0.7);
    padding: 10px 20px;
    border-radius: 10px;
    z-index: 20;
    display: none; /* Initially hidden */
}
.action-cooldown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}
@keyframes glow {
    0% { box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #ff00de, 0 0 35px #ff00de, 0 0 40px #ff00de, 0 0 50px #ff00de, 0 0 75px #ff00de; }
    100% { box-shadow: 0 0 2.5px #fff, 0 0 5px #fff, 0 0 7.5px #fff, 0 0 10px #ff00de, 0 0 17.5px #ff00de, 0 0 20px #ff00de, 0 0 25px #ff00de, 0 0 37.5px #ff00de; }
}
.glow {
    animation: glow 1s ease-in-out infinite alternate;
}
.version {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    opacity: 0.3;
    z-index: 30;
}
