body {
    margin: 0;
    overflow: hidden;
    background-color: #AADDDE;
}

canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

#gameCanvas {
    background-color: transparent;
    z-index: -1;
}

#waveCanvas {
    z-index: -2;
}

#hud {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #333333;
    z-index: 2;
}

#start-screen.hidden, #results-screen.hidden {
    display: none !important;
}

#wind-indicator {
    width: 100px;
    height: 100px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="48" stroke="#333333" stroke-width="2" fill="none"/><path d="M50 0 L50 10 M50 90 L50 100 M0 50 L10 50 M90 50 L100 50" stroke="#333333" stroke-width="2"/></svg>');
    background-size: contain;
    position: relative;
}

#wind-arrow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: center center;
}

#optimal-sail-angle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    opacity: 0.7;
}

#speed-reading {
    margin-top: 10px;
    font-size: 24px;
    position: relative;
    z-index: 10;
}

#laps {
    margin-top: 10px;
    font-size: 24px;
}

#mini-map {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 200px;
    height: 200px;
    border: 2px solid #333333;
    z-index: 2;
}

#touch-controls {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 2;
}

.control-area {
    display: flex;
    flex-direction: column;
}

.control-area button {
    width: 60px;
    height: 60px;
    margin: 10px;
    font-size: 24px;
    background-color: rgba(255, 255, 255, 0.5);
    color: #333333;
    border: 2px solid #333333;
    border-radius: 50%;
    pointer-events: auto;
}

#start-screen, #results-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #AADDDE;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

#start-screen h1, #results-screen h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

#start-screen .instructions, #results-screen #results-list {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    max-width: 600px;
}

#start-screen ul {
    list-style-type: none;
    padding: 0;
}

#start-screen ul li {
    margin-bottom: 10px;
}

#start-button, #play-again-btn {
    font-size: 1.5em;
    padding: 15px 30px;
    border-radius: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

#game-mode-selection {
    display: flex;
    gap: 10px;
}

#game-mode-selection button {
    font-size: 1.2em;
    padding: 10px 20px;
    border-radius: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

@media (max-width: 600px) {
    #start-screen h1, #results-screen h1 {
        font-size: 2em;
    }

    #start-button, #play-again-btn {
        font-size: 1.2em;
        padding: 10px 20px;
    }

    #game-mode-selection {
        flex-direction: column;
    }
}
