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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

#gameCanvas {
    flex: 1;
    display: block;
    background: #2d5a27;
    cursor: crosshair;
}

#ui {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    padding: 20px;
}

#header {
    background: linear-gradient(135deg, #1e3d1a 0%, #2d5a27 100%);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

#header h1 {
    color: white;
    font-size: 24px;
    margin-bottom: 10px;
    text-align: center;
}

#score {
    display: flex;
    justify-content: space-around;
    color: white;
    font-size: 16px;
}

#score span {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 8px;
}

#instructions {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    pointer-events: auto;
    margin: 0 auto;
}

.modal-content {
    background: white;
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    margin: 0 auto;
}

.modal-content h2 {
    color: #2d5a27;
    margin-bottom: 15px;
    font-size: 28px;
}

.modal-content p {
    color: #333;
    font-size: 18px;
    margin-bottom: 20px;
}

.modal-content button {
    background: linear-gradient(135deg, #4CAF50 0%, #2d5a27 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-content button:active {
    transform: translateY(0);
}

#hole-complete,
#game-complete {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    #header h1 {
        font-size: 20px;
    }
    
    #score {
        font-size: 14px;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    #score span {
        padding: 5px 10px;
    }
    
    .modal-content {
        padding: 20px 25px;
        margin: 20px;
    }
    
    .modal-content h2 {
        font-size: 24px;
    }
    
    .modal-content p {
        font-size: 16px;
    }
}