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

body {
    font-family: Arial, sans-serif;
    background-color: #222;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 95vmin;
    height: 95vmin;
    max-width: 95vw;
    max-height: 95vh;
    border: 4px solid #444;
    border-radius: 8px;
    overflow: hidden;
    background-color: #333;
    display: flex;
}

#gameCanvas {
    background-color: #4a4a4a;
    width: 100%;
    height: 100%;
}

#pause-button-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 50;
}

#pause-button {
    width: 40px;
    height: 40px;
    font-size: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid #ffcc00;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

#pause-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

#hud {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    font-size: 18px;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
}

#score {
    margin-bottom: 10px;
    font-weight: bold;
    color: #ffcc00;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    z-index: 100;
}

#final-score {
    color: #ffcc00;
    font-weight: bold;
    font-size: 24px;
}

#restart-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #ffcc00;
    color: #222;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#restart-btn:hover {
    background-color: #ffd633;
    transform: scale(1.05);
}

.hidden {
    display: none;
}

/* Speech bubble styles */
.speech-bubble {
    position: absolute;
    background-color: white;
    border: 2px solid black;
    border-radius: 10px;
    padding: 8px;
    max-width: 150px;
    text-align: center;
    font-size: 12px;
    color: black;
    z-index: 15;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: white transparent transparent;
}

/* Level up screen */
#level-up-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

#level-up-title {
    color: #ffcc00;
    font-size: 32px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

#level-up-quote {
    color: #ffffff;
    font-style: italic;
    margin-bottom: 30px;
    text-align: center;
    max-width: 80%;
}

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

.upgrade-card {
    width: 150px;
    height: 200px;
    background-color: #333;
    border: 2px solid #555;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-card:hover {
    transform: scale(1.05);
    border-color: #ffcc00;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
}

.upgrade-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #ffcc00;
}

.upgrade-title {
    font-weight: bold;
    color: #ffcc00;
    margin-bottom: 10px;
    text-align: center;
}

.upgrade-description {
    font-size: 12px;
    color: #ccc;
    text-align: center;
}

/* Pickup styles */
.pickup {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    z-index: 5;
}

.pickup-score {
    background-color: #0066ff;
    color: white;
    box-shadow: 0 0 10px #0099ff;
}

.pickup-reset {
    background-color: #ff3300;
    color: white;
    box-shadow: 0 0 10px #ff6600;
}

.pickup-points {
    background-color: #00cc66;
    color: white;
    box-shadow: 0 0 10px #00ff80;
}

.pickup-multiplier {
    background-color: #ffcc00;
    color: white;
    box-shadow: 0 0 10px #ffdd44;
}

.pickup-rocket {
    background-color: #ff00cc;
    color: white;
    box-shadow: 0 0 10px #ff66dd;
}

.pickup-blind {
    background-color: #9900cc;
    color: white;
    box-shadow: 0 0 10px #cc66ff;
}

/* Progress bar for level */
#level-progress-container {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 200px;
    height: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    z-index: 10;
}

#level-progress-bar {
    height: 100%;
    background-color: #ffcc00;
    width: 0%;
    transition: width 0.3s ease;
}

#level-indicator {
    position: absolute;
    bottom: 30px;
    left: 10px;
    font-size: 14px;
    color: #ffcc00;
    z-index: 10;
}

#speed-boost-indicator {
    position: absolute;
    top: 60px;
    left: 10px;
    background-color: #ff00cc;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
}

#speed-boost-indicator.active {
    opacity: 1;
}

#vision-reduction-indicator {
    position: absolute;
    top: 90px;
    left: 10px;
    background-color: #9900cc;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
}

#vision-reduction-indicator.active {
    opacity: 1;
}

/* Pause overlay styles */
#pause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 350;
}

.pause-content {
    background-color: rgba(50, 50, 50, 0.9);
    padding: 30px 50px;
    border-radius: 10px;
    border: 3px solid #ffcc00;
    text-align: center;
    color: white;
    max-width: 80%;
}

.pause-content h2 {
    color: #ffcc00;
    font-size: 32px;
    margin-bottom: 20px;
}

.pause-content p {
    font-size: 18px;
    margin-bottom: 10px;
}

.instructions {
    text-align: left;
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.instructions h3 {
    color: #ffcc00;
    margin-bottom: 10px;
}

.instructions ul {
    list-style-type: none;
    padding-left: 10px;
}

.instructions li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.instructions li::before {
    content: "•";
    color: #ffcc00;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Splash screen styles */
#splash-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #222;
    z-index: 300;
}

.splash-image-container {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.splash-image-container img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

#start-btn {
    position: absolute;
    padding: 15px 40px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffcc00;
    border: 3px solid #ffcc00;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 3px;
}

#start-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
}