:root {
    --brown:   #d4a373;
    --brown-dk:#ab8361;
    --cream:   #f7f4ef; 
    --green:   #206e42;
    --danger:  #cd395b;
}
body { background: var(--cream); margin: 0; padding: 0; font-family: sans-serif; }

/* ── header ── */
.game-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 12px;
    background: white; border-bottom: 1px solid #f0e8df;
    position: sticky; top: 0; z-index: 10;
}
.game-title { font-size: 1.1rem; font-weight: 700; color: var(--brown-dk); }
.game-stat  { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 1.1rem; }
.stat-score { color: var(--brown-dk); }
.stat-timer { color: #888; font-variant-numeric: tabular-nums; }

/* ── 計時條 ── */
.timer-bar-wrap { height: 7px; background: #f7f4ef;}
.timer-bar { height: 100%; background: #d4a373; transition: width 1s linear; width: 100%; }
.timer-bar.danger { background: var(--danger); }

.icon-clock {
    align-self: flex-end;  /* 或 flex-start 試試看 */
    margin-bottom: 3px;    /* 微調 */
}

/* ── 提示區 ── */
.play-hint {
    text-align: center; padding: 10px 16px 4px;
    font-size: 0.95rem; color: #aaa; margin-top: 6px;
}
.play-word-display {
    text-align: center; padding: 4px 16px 10px;
    font-size: 1.5rem; font-weight: 700;
    color: #906f51; min-height: 50px;
}

/* ── 洞格 ── */
.holes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 16px 20px;
    max-width: 500px;
    margin: 0 auto;
}

/* ── 單個洞 ── */
.hole-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    min-height: 140px;
    justify-content: flex-end;
}

/* 中文字從頭頂冒出 */
.mole-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #8d6c50;
    background: white;
    border: 2px solid var(--brown);
    border-radius: 10px;
    padding: 4px 8px;
    text-align: center;
    white-space: nowrap;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease 0.25s, transform 0.2s ease 0.25s;
    z-index: 2;
}
.hole-wrap.up .mole-text {
    opacity: 1;
    transform: translateY(0);
}
.mole-text.correct { border-color: #57a077; color: var(--green); background: #e8f5ee; }
.mole-text.wrong   { border-color: #d86a6f; color: var(--danger); background: #fff0ef; }

/* 地鼠圖片 */
.mole-img {
    width: 76px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: block;
}
.hole-wrap.up .mole-img {
    opacity: 1;
    transform: translateY(0);
}

/* ── 完成畫面 ── */
.finish-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    align-items: center; justify-content: center;
    z-index: 999;
}
.finish-box {
    background: white; border-radius: 24px;
    padding: 36px 28px; text-align: center;
    width: 85%; max-width: 320px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: popUp 0.3s ease-out;
}
@keyframes popUp {
    0%   { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}
.finish-emoji  { font-size: 3rem; margin-bottom: 12px; }
.finish-title  { font-size: 1.5rem; font-weight: 700; color: var(--brown-dk); margin-bottom: 16px; }
.finish-score  { font-size: 4rem; font-weight: 700; color: var(--brown); line-height: 1; }
.finish-label  { font-size: 0.9rem; color: #aaa; margin-bottom: 24px; }
.finish-btn {
    width: 100%; padding: 16px; border-radius: 14px; border: none;
    background: var(--brown); color: white;
    font-size: 1.1rem; font-weight: 700; cursor: pointer; margin-bottom: 10px;
}
.finish-btn-outline {
    width: 100%; padding: 14px; border-radius: 14px;
    border: 2px solid #eee; background: white;
    color: #888; font-size: 1rem; font-weight: 700; cursor: pointer;
}

/* ── 底部按鈕 ── */
.fixed-buttons {
    position: fixed; bottom: 0; left: 0; right: 0;
    display: flex; gap: 8px; padding: 12px 10px;
    background: white; border-top: 1px solid #f0e8df; z-index: 10;
}
.fixed-buttons button {
    padding: 12px; border-radius: 36px; border: none;
    font-size: 1rem; font-weight: 600; cursor: pointer;
}
.btn-back   { background: #dae0f4; color:#666; flex: 1; transition: border: 1px solid #afb4c4}
.btn-replay { background: var(--brown); color: white; flex: 1;}
.btn-back.is-active   { background: #bac7ef; transform: scale(0.99); }
.btn-replay.is-active { background: #b8864f; transform: scale(0.99); }

/* ── 地鼠動畫 ── */
@keyframes moleJump {
    0%   { transform: translateY(0); }
    40%  { transform: translateY(-18px); }
    100% { transform: translateY(0); }
}
@keyframes moleShake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-10px); }
    75%       { transform: translateX(10px); }
}
.mole-jump  { animation: moleJump  0.4s ease; }
.mole-shake { animation: moleShake 0.4s ease; }

/* 這是30秒按鈕 */
.btn-five { background:#d6efb6; color:#666; flex: 1; border: 1px solid #afb4c4}
.btn-five.is-active { background: #afda7a; transform: scale(0.99); }