@charset "UTF-8";

/* ==========================================================================
   Project: Connect Station HOME
   File: css/wakamaru.css
   Description: わかまるの防災トライアル！専用デザイン
   ========================================================================== */

/* --- 全体ラッパー --- */
.trial-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #a5d6a7, #e8f5e9);
    padding: 2rem;
    padding-top: var(--header-height);
}

/* --- ゲームコンテナ --- */
.trial-container {
    width: 100%;
    max-width: 800px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 3rem;
    text-align: center;
    border: 5px solid #fff;
}

/* --- 各画面の制御 --- */
.trial-screen {
    display: none; /* JSで表示を切り替える */
}
.trial-screen.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- スタート画面 --- */
.start-screen img {
    height: 150px;
    margin-bottom: 1rem;
}
.start-screen h1 {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}
.start-screen p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
}

/* --- ゲーム画面 --- */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.question-counter {
    font-size: 1.2rem;
    font-weight: bold;
}
.score-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-secondary);
}

/* タイマーバー */
.timer-bar {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-bottom: 2rem;
    overflow: hidden;
}
#timer-bar-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #66bb6a, #a5d6a7);
    border-radius: 5px;
    transition: width 0.1s linear;
}

.situation-box {
    background: #f0f4f8;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}
.situation-box h2 {
    font-size: 1.5rem;
    color: #c62828;
    margin-bottom: 1rem;
}
.question-text {
    font-size: 1.2rem;
    font-weight: bold;
}

/* 選択肢ボタン */
.choices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.choice-btn {
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}
.choice-btn:hover {
    border-color: var(--color-secondary);
    background-color: #fff8e1;
}

/* 正解・不正解時のスタイル */
.choice-btn.correct {
    background-color: #c8e6c9;
    border-color: #4caf50;
    color: #2e7d32;
}
.choice-btn.incorrect {
    background-color: #ffcdd2;
    border-color: #f44336;
    color: #c62828;
}

/* フィードバック */
.feedback-box {
    margin-top: 2rem;
    min-height: 80px;
    opacity: 0;
    transition: opacity 0.5s;
}
.feedback-box.visible {
    opacity: 1;
}
.feedback-box .dialogue-turn {
    max-width: 100%;
    background: #fafafa;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: none;
    border: 1px solid #eee;
}

/* --- 結果画面 --- */
.result-screen h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.final-score {
    font-size: 4rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 1rem;
}
.final-rank {
    font-size: 2.5rem;
    font-family: var(--font-serif);
    margin-bottom: 2rem;
}
.result-screen .cta-button {
    margin-top: 2rem;
}