body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f8ff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    user-select: none;
}

.game-wrapper { text-align: center; }

/* --- ステータスボード --- */
.status-board {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 320px;
    margin: 0 auto 10px;
}
.info-group { display: flex; gap: 15px; }
.level-box { font-size: 20px; font-weight: bold; color: #4682b4; }
.score-box { font-size: 20px; font-weight: bold; }
.meter-box { display: flex; align-items: center; gap: 5px; font-weight: bold; font-size: 14px; }
.meter-frame { width: 100px; height: 15px; border: 2px solid #333; border-radius: 10px; background-color: #eee; overflow: hidden; }
.meter-fill { width: 0%; height: 100%; background-color: #ffcc00; transition: width 0.2s, background-color 0.2s; }

/* --- ゲームエリア --- */
.game-area {
    position: relative;
    width: 320px;
    height: 400px;
    background-color: #fff;
    border: 2px solid #333;
    border-radius: 10px;
    margin: 0 auto 20px;
    overflow: hidden;
}

.game-over-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); color: white;
    display: none; flex-direction: column; justify-content: center; align-items: center;
    z-index: 100;
}
.game-over-screen h2 { margin: 0; font-size: 32px; color: #ff4444; }

.level-up-text {
    position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) scale(0);
    font-size: 40px; font-weight: bold; color: #ffcc00; text-shadow: 2px 2px 0 #000;
    z-index: 50; pointer-events: none; transition: transform 0.3s;
}
.level-up-text.show { transform: translate(-50%, -50%) scale(1); }

/* --- キャラクター --- */
.uncle {
    position: absolute; bottom: 0; left: 110px; 
    width: 100px; height: 120px; background-color: #d8c2a3;
    border-radius: 50px 50px 0 0; border: 2px solid #5a4a3a; border-bottom: none;
    z-index: 10; transition: background-color 0.3s;
}
.uncle.angry { background-color: #b22222 !important; border-color: #000; }

.wrinkles { position: absolute; top: 25px; left: 20%; width: 60%; height: 15px; border-top: 2px solid rgba(0,0,0,0.1); border-bottom: 2px solid rgba(0,0,0,0.1); }
.eyes { display: flex; justify-content: center; gap: 20px; margin-top: 45px; position: relative; z-index: 2; }
.eye { width: 8px; height: 8px; background-color: #333; border-radius: 50%; box-shadow: 0 3px 0 rgba(80, 50, 50, 0.3); }
.beard-area { position: absolute; bottom: 0; width: 100%; height: 50px; background-color: rgba(60, 80, 100, 0.15); z-index: 1; }
.mouth { position: relative; width: 24px; height: 12px; border-bottom: 3px solid #5a4a3a; border-radius: 0 0 20px 20px; margin: 15px auto 0; }
.mouth::after { content: ''; position: absolute; top: 10px; right: -2px; width: 5px; height: 12px; background-color: #cceeff; border-radius: 0 0 5px 5px; opacity: 0.7; }

/* --- カツラ --- */
.wig {
    position: absolute; top: -60px; left: 0;
    width: 80px; height: 45px; background-color: #222;
    border-radius: 40px 40px 0 0; z-index: 5;
}
.wig::after { content: ''; position: absolute; top: 8px; right: 15px; width: 20px; height: 2px; background-color: #555; transform: rotate(-20deg); }

/* --- UI --- */
button { padding: 10px 20px; font-size: 16px; cursor: pointer; background-color: #ff6347; color: white; border: none; border-radius: 5px; }
button:hover { background-color: #ff4500; }
.move-buttons { display: flex; justify-content: center; gap: 20px; margin-top: 10px; }
.move-btn { background-color: #4682b4; width: 100px; font-weight: bold; }
.move-btn:active { background-color: #315f85; transform: translateY(2px); }

/* サウンドボタン */
.sound-btn {
    margin-top: 15px;
    background-color: #aaa;
    font-size: 14px;
    padding: 8px 16px;
}
.sound-btn.active {
    background-color: #20b2aa; /* ONのときは明るい色 */
}

/* --- 金色のカツラ（レアアイテム） --- */
.wig.gold {
    background-color: #ffd700; /* ゴールド */
    box-shadow: 0 0 15px #ffd700; /* 光るエフェクト */
    border: 2px solid #fff;
    z-index: 6;
}

.wig.gold::after {
    background-color: #fff; /* ツヤも白く */
}