* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #111;
    font-family: 'Arial', 'Hiragino Sans', sans-serif;
    color: #fff;
    touch-action: none;
    overscroll-behavior: none;
}

#game-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    /* iOS Safari 等のURLバーやノッチ対策 */
    height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#hud {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 10;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

#gameCanvas {
    display: block;
    background: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
    touch-action: none;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 20;
}

#overlay.hidden {
    display: none;
}

#message {
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
    padding: 0 20px;
}

#startBtn {
    padding: 12px 36px;
    font-size: 18px;
    font-weight: bold;
    background: #00aaff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#startBtn:hover {
    background: #0088cc;
}

#startBtn:active {
    transform: scale(0.96);
}
