/* CSS: 見た目の設定 */
body {
    font-family: sans-serif;
    text-align: center;
    background: linear-gradient(#a8e6cf, #dcedc1);
    margin: 0;
    padding: 15px;
    /* テキスト選択を無効化し、誤タップを防ぐ */
    user-select: none;
    -webkit-user-select: none;
}

h1 {
    margin-top: 10px;
    font-size: 1.8em;
    color: #333;
}

.info-panel {
    display: flex;
    justify-content: space-around;
    max-width: 400px;
    margin: 10px auto;
}

#score, #time, #highScore {
    font-size: 1.1em;
    margin: 5px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.5);
    padding: 5px 10px;
    border-radius: 8px;
}

.game {
    display: grid;
    /* 画面サイズに応じて穴の大きさを調整 */
    grid-template-columns: repeat(3, minmax(80px, 25vw));
    max-width: 400px; /* PCでの最大幅 */
    grid-gap: 15px;
    justify-content: center;
    margin: 20px auto;
}

.hole {
    width: 100%;
    /* 正方形を維持 */
    aspect-ratio: 1 / 1;
    background: #654321;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 5px solid #543210;
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.4);
}

.mole, .bomb {
    width: 80%;
    height: 80%;
    position: absolute;
    bottom: -100%;
    left: 10%;
    transition: bottom 0.15s ease-out;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.mole {
    background-image: url('images/animal_mogura_kouji.png');
}

.bomb {
    background-image: url('images/bakudan.png');
}

/* モグラや爆弾が飛び出すアニメーション */
.up {
    bottom: 5% !important;
}

#countdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5em;
    font-weight: bold;
    color: rgba(255, 0, 0, 0.8);
    -webkit-text-stroke: 2px white;
    text-stroke: 2px white;
    pointer-events: none; /* カウントダウン表示がクリックを妨げないように */
    /* ★修正点: z-indexを追加して最前面に表示 */
    z-index: 100;
}

#startBtn {
    font-size: 1.2em;
    padding: 12px 25px;
    margin-top: 15px;
    border: none;
    border-radius: 10px;
    background: #ff9800;
    color: white;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px #e68900;
    transition: all 0.1s;
}

#startBtn:active {
    background: #e68900;
    box-shadow: 0 2px #e68900;
    transform: translateY(2px);
}