* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #2c3e50;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    color: #fff;
}

#game-container {
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 8px;
    overflow: hidden;
}

#ui-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: rgba(20, 20, 20, 0.8);
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border-bottom: 2px solid #27ae60;
    z-index: 10;
}

#golfCanvas {
    background-color: #27ae60;
    display: block;
}

#power-bar-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
    border-radius: 10px;
    overflow: hidden;
    display: none; /* Show dynamically via JS */
}

#power-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f1c40f, #e74c3c);
    transition: width 0.05s linear;
}

#screen-overlay {
    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: 20;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

#screen-overlay.hidden {
    display: none;
    opacity: 0;
}

#overlay-title {
    font-size: 3rem;
    color: #f1c40f;
    margin-bottom: 10px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

#overlay-subtitle {
    font-size: 1.2rem;
    color: #bdc3c7;
}