* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: #000;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
    cursor: crosshair;
}

#ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#healthBar {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 300px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #fff;
    border-radius: 5px;
    overflow: hidden;
}

#healthFill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ff0000, #ff4444);
    transition: width 0.3s ease;
}

#healthText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

#levelDisplay {
    position: absolute;
    top: 70px;
    left: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 5px;
}

#fruitDisplay {
    position: absolute;
    top: 110px;
    left: 20px;
    color: #ffd700;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 5px;
}

#islandDisplay {
    position: absolute;
    top: 150px;
    left: 20px;
    color: #00ffff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 5px;
}

#questDisplay {
    position: absolute;
    top: 190px;
    left: 20px;
    color: #ffff00;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 5px;
    max-width: 400px;
}

#message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 30px;
    border-radius: 10px;
    border: 2px solid #ffff00;
    display: none;
    z-index: 200;
}

#instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
}

#instructions p {
    margin: 0;
}

#startScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    pointer-events: auto !important;
    cursor: pointer;
    user-select: none;
}

#startScreen h1 {
    color: #ffd700;
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
    animation: pulse 2s infinite;
}

#startScreen h2 {
    color: #00ff00;
    font-size: 32px;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

#startInstructions {
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #ffd700;
    max-width: 600px;
    color: #fff;
    text-align: left;
    line-height: 1.8;
}

#startInstructions p {
    margin: 10px 0;
    font-size: 16px;
}

#startInstructions strong {
    color: #ffd700;
    font-size: 18px;
}

#startScreen.hidden {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden;
}
