:root {
    --bg-color: #1e222b;
    --card-bg: #282c34;
    --text-main: #f8f9fa;
    --text-sub: #abb2bf;
    --accent-blue: #61afef;
    --accent-green: #98c379;
    --accent-red: #e06c75;
    --accent-gold: #e5c07b;
}

body {
    margin: 0; padding: 0;
    background-color: var(--bg-color); color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex; justify-content: center; align-items: flex-start;
    min-height: 100vh; min-height: 100dvh; /* スマホブラウザバー対策 */
    box-sizing: border-box;
}

.container {
    width: 92%; max-width: 420px;
    margin: 20px auto;
    display: flex; flex-direction: column;
    box-sizing: border-box;
}

.score-board {
    display: flex; justify-content: space-between;
    font-size: 13px; font-weight: bold;
    color: var(--text-sub); margin-bottom: 12px;
    letter-spacing: 1px; align-items: center;
}

.life-area {
    font-size: 13px; letter-spacing: 1px;
    white-space: nowrap;
}

.combo-badge {
    color: var(--accent-gold); opacity: 0;
    transition: opacity 0.2s;
}

.combo-badge.active {
    opacity: 1;
}

.card {
    background-color: var(--card-bg); border-radius: 16px;
    padding: 35px 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    min-height: 220px; display: flex; flex-direction: column;
    justify-content: center; align-items: center; margin-bottom: 20px;
    position: relative; border: 2px solid transparent;
    box-sizing: border-box; transition: border-color 0.2s;
}

.command {
    font-size: 24px; font-weight: 800; color: var(--accent-blue);
    margin-bottom: 15px; word-break: break-all; line-height: 1.3;
    text-align: center;
}

.meaning {
    font-size: 16px; color: var(--text-main); font-weight: 500;
    line-height: 1.5; text-align: center;
}

.tip-area {
    font-size: 13px; color: var(--accent-gold); font-weight: bold;
    margin-top: 20px; min-height: 20px; text-align: center; line-height: 1.5;
    opacity: 0; transform: translateY(5px); transition: all 0.2s ease-out;
    border-top: 1px solid rgba(171, 178, 191, 0.15); padding-top: 15px; width: 100%;
}

.tip-area.show {
    opacity: 1; transform: translateY(0);
}

.judge-overlay {
    position: absolute; font-size: 36px; font-weight: 900; opacity: 0;
    transform: scale(0.5); pointer-events: none; z-index: 10;
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center; width: 100%;
}

.judge-correct {
    color: var(--accent-green); text-shadow: 0 0 20px rgba(152, 195, 121, 0.6);
}

.judge-wrong {
    color: var(--accent-red); text-shadow: 0 0 20px rgba(224, 108, 117, 0.6);
}

.show-judge {
    opacity: 1; transform: scale(1.1);
}

.btn-group {
    display: flex; gap: 12px; width: 100%;
}

.btn {
    flex: 1; padding: 18px; font-size: 16px; font-weight: bold;
    border: none; border-radius: 14px; cursor: pointer; color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); -webkit-tap-highlight-color: transparent;
    transition: transform 0.05s;
}

.btn:active {
    transform: scale(0.96);
}

.btn-false { background-color: var(--accent-red); }
.btn-true { background-color: var(--accent-green); }

.effect-correct { animation: flash-green 0.4s ease-out; }
.effect-wrong { animation: flash-red 0.6s ease-out; }

@keyframes flash-green { 0% { border-color: var(--accent-green); } 100% { border-color: transparent; } }
@keyframes flash-red { 0%, 50% { border-color: var(--accent-red); } 100% { border-color: transparent; } }

.keyboard-tip {
    text-align: center; font-size: 11px; color: var(--text-sub);
    margin-top: 15px; opacity: 0.6;
}

@media (max-width: 600px) {
    .keyboard-tip { display: none; }
}