/* =================================================================
 * ストループテスト (style.css)
 * スコープは #app-brain-stroop に限定
 * ================================================================= */

/* --- ルール説明の見本 --- */
#app-brain-stroop .stroop-example {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}
#app-brain-stroop .stroop-example .ex-word {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1.1;
}
#app-brain-stroop .stroop-example .ex-note {
    font-size: 0.78rem;
    color: #495057;
    margin-top: 0.4rem;
    line-height: 1.5;
}

/* --- 提示ステージ ---
 * テーマに依存しない固定の明るい背景。色の見え方を安定させる。 */
#app-brain-stroop .stroop-stage {
    min-height: 240px;
    background-color: #f6f7f9;
    overflow: hidden;
}

/* 提示語（大きく・太く） */
#app-brain-stroop .stroop-word {
    font-size: clamp(3rem, 16vw, 6.5rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
}

/* 開始前・段階間メッセージ（明るい背景前提の暗い文字） */
#app-brain-stroop .stroop-message-text {
    color: #1c1f23;
}
#app-brain-stroop .stroop-message-sub {
    color: #495057;
    font-size: 0.92rem;
}

/* 練習の正誤フィードバック */
#app-brain-stroop .stroop-feedback {
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    white-space: nowrap;
}
#app-brain-stroop .stroop-feedback.is-correct {
    background-color: #d1e7dd;
    color: #0f5132;
}
#app-brain-stroop .stroop-feedback.is-wrong {
    background-color: #f8d7da;
    color: #842029;
}

/* --- 進捗バー --- */
#app-brain-stroop .stroop-progress {
    border-radius: 0;
    background-color: rgba(0, 0, 0, 0.12);
}

/* --- 回答パネル（4色ボタン 2x2） --- */
#app-brain-stroop .stroop-answer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    max-width: 460px;
    margin: 0 auto;
}
#app-brain-stroop .stroop-ans-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 60px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    border: 3px solid transparent;
    border-radius: 0.75rem;
    transition: transform 0.08s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
#app-brain-stroop .stroop-ans-btn .stroop-key {
    position: absolute;
    top: 4px;
    left: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 4px;
    padding: 0 5px;
    line-height: 1.4;
}
#app-brain-stroop .stroop-ans-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
#app-brain-stroop .stroop-ans-btn:not(:disabled):hover,
#app-brain-stroop .stroop-ans-btn:not(:disabled):focus-visible {
    filter: brightness(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    outline: none;
}
#app-brain-stroop .stroop-ans-btn:not(:disabled):active,
#app-brain-stroop .stroop-ans-btn.stroop-press {
    transform: scale(0.95);
}

/* 各色の塗り。きいろのみ視認性のため文字を暗く */
#app-brain-stroop .stroop-ans-btn[data-color="red"]    { background-color: #e5484d; }
#app-brain-stroop .stroop-ans-btn[data-color="blue"]   { background-color: #2570e8; }
#app-brain-stroop .stroop-ans-btn[data-color="yellow"] { background-color: #e0a800; color: #1c1f23; }
#app-brain-stroop .stroop-ans-btn[data-color="yellow"] .stroop-key { background: rgba(0, 0, 0, 0.18); color: #1c1f23; }
#app-brain-stroop .stroop-ans-btn[data-color="green"]  { background-color: #2f9e44; }

/* =================================================================
 * モバイル対応
 * ================================================================= */
@media (max-width: 576px) {
    #app-brain-stroop .stroop-stage {
        min-height: 200px;
    }
    #app-brain-stroop .stroop-ans-btn {
        min-height: 56px;
        font-size: 1.15rem;
    }
}

/* =================================================================
 * ダークモード時の SEO コンテンツ（比較表）の視認性
 * 提示ステージ・回答ボタンは固定色なのでテーマ非依存
 * ================================================================= */
[data-bs-theme="dark"] #app-brain-stroop .seo-table .table-light,
[data-bs-theme="dark"] #app-brain-stroop .seo-table .table-light th {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
    border-color: #495057 !important;
}
[data-bs-theme="dark"] #app-brain-stroop .seo-table th.bg-body-tertiary {
    background-color: #2b3035 !important;
    color: #e9ecef !important;
}
