@charset "UTF-8";

body { margin: 0; overflow: hidden; background-color: #2e7d32; font-family: 'Noto Sans JP', sans-serif; user-select: none; }

.game-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1;
    background: radial-gradient(circle, #66bb6a 0%, #2e7d32 100%);
}

#input-video {
    position: fixed; bottom: 10px; right: 10px; width: 160px; height: 120px;
    z-index: 5; border-radius: 10px; border: 2px solid white; opacity: 0.5; transform: scaleX(-1);
}

.ui-layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; pointer-events: none; }

.header-bar {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 15px 20px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: space-between;
    z-index: 9999; pointer-events: auto;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}
.btn-menu {
    background: rgba(255, 255, 255, 0.95); border: none; border-radius: 30px;
    padding: 8px 16px; color: #333; font-weight: bold; font-size: 0.9rem;
    cursor: pointer; display: flex; align-items: center; gap: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); pointer-events: auto;
}
.header-title { color: #fff; font-weight: bold; font-size: 1.2rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

#game-field {
    position: absolute; top: 10%; left: 5%; width: 90%; height: 80%;
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
    gap: 20px; z-index: 5;
}
.mole-hole {
    position: relative; display: flex; justify-content: center; align-items: flex-end;
    overflow: hidden;
}
.hole-base {
    position: absolute; bottom: 0; width: 80%; height: 40px;
    background: #3e2723; border-radius: 50%;
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.5);
}

/* キャラクター */
.character {
    position: absolute; bottom: -100%; width: 100px; height: 100px;
    transition: bottom 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; justify-content: center; align-items: center;
    font-size: 4rem; filter: drop-shadow(0 5px 5px rgba(0,0,0,0.3));
}
.character.active { bottom: 20px; }
.character.hit { 
    transform: scale(1.2); 
    filter: brightness(1.2); 
    transition: transform 0.05s;
    color: #ff1744;
}

/* ハンマーカーソル */
#hand-cursor {
    position: fixed; width: 60px; height: 60px;
    font-size: 3rem;
    pointer-events: none; z-index: 100;
    transform: translate(-30%, -70%) rotate(-30deg); /* 指先っぽく配置 */
    transition: left 0.05s, top 0.05s; /* キビキビ動く */
    display: none;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}
#hand-cursor.swing {
    transform: translate(-30%, -70%) rotate(-60deg) scale(0.9);
}

.game-info {
    position: absolute; top: 70px; right: 20px; text-align: right; color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.info-label { font-size: 0.8rem; font-weight: bold; }
.info-val { font-family: 'Orbitron'; font-size: 2rem; font-weight: 900; color: #ffeb3b; }

.overlay-screen {
    position: fixed; 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: 50; pointer-events: auto; text-align: center;
}
.hidden { display: none !important; }

.setup-card {
    background: white; padding: 40px; border-radius: 20px; width: 90%; max-width: 480px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.card-title { font-size: 2rem; color: #2e7d32; margin-bottom: 20px; font-weight: 900; }
.card-desc { color: #555; margin-bottom: 20px; text-align: left; line-height: 1.6; }

.settings-list { text-align: left; background: #f1f8e9; padding: 20px; border-radius: 10px; margin-bottom: 25px; }
.s-row { margin-bottom: 15px; }
.s-row label { font-weight: bold; color: #33691e; }
select { width: 100%; padding: 10px; border-radius: 5px; border: 1px solid #ccc; font-size: 1rem; margin-top: 5px; }

.start-btn {
    background: #4caf50; color: white; border: none; padding: 15px 0; border-radius: 50px;
    font-size: 1.3rem; font-weight: bold; cursor: pointer; width: 100%; display: block;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
}
.btn-sub { background: transparent; border: 2px solid #ccc; color: #777; padding: 10px; border-radius: 50px; cursor: pointer; width: 100%; margin-top: 10px; }

.res-score { font-size: 4rem; font-weight: 900; color: #4caf50; font-family: 'Orbitron'; margin: 20px 0; }

#loading-msg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000;
    display: flex; justify-content: center; align-items: center; color: white; z-index: 200;
}