body {
    text-align: center;
    font-family: 'Courier New', monospace;
    background-color: lightSkyBlue;
    color: white;
    margin: 0;
    padding: 5px;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.main-wrapper {
    display: flex;
    width: 95%;
    margin-left: -250px;
    margin-top: 10px;
    max-width: 880px;
    height: calc(100vh - 20px);
    justify-content: center;
}

#game-container {
    width: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 0 10px;
    width: 100%;
    max-width: 600px;
}

#creator-info {
    font-weight: bold;
    font-size: 20px;
    color: black;
    margin-top: 50px;
    padding-bottom: 1px;
    text-align: center;
}

#timer {
    font-size: 18px;
    font-weight: bold;
    color: black;
}

#game-area {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

#instructions {
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid white;
    border-radius: 10px;
    padding: 10px 15px;
    width: 180px;
    text-align: left;
    color: white;
    font-size: 14px;
    height: auto;
    max-height: 350px;
    margin-right: 8px;
    align-self: flex-start;
}

#instructions h3 {
    margin: 0 0 3px 0;
    text-align: center;
    border-bottom: 1px solid white;
    padding-bottom: 2px;
    font-size: 16px;
}

#instructions p {
    margin: 4px 0;
}

#instructions ul {
    padding-left: 20px;
    margin: 3px 0;
}

#instructions li {
    margin-bottom: 2px;
    font-size: 13px;
}

canvas {
    border: 3px solid white;
    background-color: green;
    height: 400px;
    width: 600px;
    display: block;
    margin: 0 auto;
}

#controls {
    display: flex;
    justify-content: center;
    margin: 5px auto;
    width: 100%;
    max-width: 600px;
}

button {
    padding: 8px 20px;
    font-size: 16px;
    background-color: darkblue;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #4169E1; 
}

#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: background-color 0.5s;
}

#game-over.player-lost {
    background-color: rgba(255, 0, 0, 0.9);
}

#game-over.player-won {
    background: linear-gradient(45deg, 
        rgba(255,0,0,0.7), 
        rgba(255,165,0,0.7), 
        rgba(255,255,0,0.7), 
        rgba(0,128,0,0.7), 
        rgba(0,0,255,0.7), 
        rgba(75,0,130,0.7), 
        rgba(238,130,238,0.7));
    background-size: 400% 400%;
    animation: rainbow 10s ease infinite;
}

@keyframes rainbow {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}

.hidden {
    display: none !important;
}

#result-message, #time-taken {
    font-size: 28px;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hidden {
    display: none !important;
}

#game-title {
    font-size: 32px;
    font-weight: bold;
    margin: 5px auto 10px auto;
    background: linear-gradient(45deg, 
        #ff0000, 
        #ffa500, 
        #ffff00, 
        #008000, 
        #0000ff, 
        #4b0082, 
        #ee82ee);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow-text 6s ease infinite;
}

@keyframes rainbow-text {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}

.spacer {
    flex: 1;
}
