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

body {
    background: #0a1a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

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

#info {
    display: flex;
    justify-content: space-around;
    padding: 10px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 100%);
    color: #fff;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.info-label {
    font-size: 10px;
    letter-spacing: 2px;
    opacity: 0.6;
}

.info-item > span:last-child {
    font-size: 22px;
    font-weight: 800;
    font-family: 'Fredoka One', cursive;
}

#message {
    text-align: center;
    color: #fff;
    font-size: 36px;
    font-weight: 800;
    font-family: 'Fredoka One', cursive;
    text-shadow: 0 3px 16px rgba(0,0,0,0.8);
    padding-top: 80px;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s, transform 0.3s;
}

#message.show {
    opacity: 1;
    transform: scale(1);
}

/* Power bar */
#power-bar-container {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
}

#power-bar-bg {
    width: 200px;
    height: 12px;
    background: rgba(0,0,0,0.5);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

#power-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: background 0.1s;
}

/* Start screen */
#start-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 40%, #388e3c 100%);
    z-index: 10;
    animation: fadeIn 0.5s ease;
}

#start-screen.hidden {
    display: none;
}

#title-wrapper {
    text-align: center;
    margin-bottom: 40px;
}

#title {
    font-family: 'Fredoka One', cursive;
    font-size: 56px;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
    letter-spacing: 2px;
}

#subtitle {
    font-family: 'Fredoka One', cursive;
    font-size: 20px;
    color: #a5d6a7;
    letter-spacing: 12px;
    margin-top: -4px;
}

#start-btn, #replay-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 22px;
    padding: 14px 48px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff6f00, #ff8f00);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 111, 0, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
    letter-spacing: 2px;
    pointer-events: auto;
}

#start-btn:hover, #replay-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(255, 111, 0, 0.6);
}

#hint {
    margin-top: 20px;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    letter-spacing: 1px;
}

/* Scorecard */
#scorecard {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 26, 10, 0.95);
    z-index: 10;
    color: #fff;
    animation: fadeIn 0.4s ease;
}

#scorecard.hidden {
    display: none;
}

#scorecard h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 32px;
    margin-bottom: 24px;
    letter-spacing: 4px;
}

#scorecard-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, 80px);
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.score-hole {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
}

.score-hole .sh-label {
    font-size: 10px;
    opacity: 0.5;
    letter-spacing: 1px;
}

.score-hole .sh-score {
    font-family: 'Fredoka One', cursive;
    font-size: 24px;
    margin-top: 4px;
}

.score-hole .sh-par {
    font-size: 11px;
    opacity: 0.4;
}

.sh-score.eagle { color: #ffd600; }
.sh-score.birdie { color: #69f0ae; }
.sh-score.par { color: #fff; }
.sh-score.bogey { color: #ff8a65; }
.sh-score.over { color: #ef5350; }

#scorecard-total {
    font-family: 'Fredoka One', cursive;
    font-size: 22px;
    margin-bottom: 24px;
}

#replay-btn {
    font-size: 18px;
    padding: 12px 36px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 500px) {
    #title { font-size: 40px; }
    #subtitle { font-size: 16px; }
    #message { font-size: 28px; padding-top: 60px; }
    .info-item > span:last-child { font-size: 18px; }
}
