* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #121212;
    color: #ffffff;
    overflow: hidden;
}

#menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 100;
    transition: opacity 0.5s;
}

#menu.hidden {
    opacity: 0;
    pointer-events: none;
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #00bfff;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.mode-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.mode-btn {
    padding: 0.8rem 2rem;
    margin: 0.5rem;
    font-size: 1.2rem;
    background-color: #2a2a2a;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    width: 200px;
}

.mode-btn:hover {
    background-color: #3a3a3a;
    transform: scale(1.05);
}

.mode-btn.active {
    background-color: #00bfff;
    color: #000000;
}

.settings {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    width: 300px;
}

.setting {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 1rem;
}

select, input {
    padding: 0.5rem;
    background-color: #2a2a2a;
    color: #ffffff;
    border: none;
    border-radius: 3px;
}

#start-btn, #restart-btn, #menu-btn, #back-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background-color: #00bfff;
    color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

#start-btn:hover, #restart-btn:hover, #menu-btn:hover, #back-btn:hover {
    background-color: #00a0e0;
    transform: scale(1.05);
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#game-canvas {
    width: 100%;
    height: 100%;
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    font-size: 1.2rem;
}

#hud div {
    margin-bottom: 10px;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
}

#crosshair::before, #crosshair::after {
    content: '';
    position: absolute;
    background-color: #00bfff;
}

#crosshair::before {
    top: 9px;
    left: 0;
    width: 20px;
    height: 2px;
}

#crosshair::after {
    top: 0;
    left: 9px;
    width: 2px;
    height: 20px;
}

#back-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
}

#results {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 100;
    transition: opacity 0.5s;
}

#mode-select {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 100;
    transition: opacity 0.5s;
}

#mode-select.hidden {
    opacity: 0;
    pointer-events: none;
}

#next-btn, #back-to-select-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background-color: #00bfff;
    color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 1.5rem;
}

#next-btn:hover, #back-to-select-btn:hover {
    background-color: #00a0e0;
    transform: scale(1.05);
}

.result-item {
    font-size: 1.5rem;
    margin: 0.5rem 0;
}

#restart-btn, #menu-btn {
    margin-top: 1.5rem;
    margin-right: 1rem;
    margin-left: 1rem;
}

.hidden {
    display: none;
}