:root {
    --primary: #0056b3;
    --accent: #e91e63;
    --bg: #f8fafc;
    --card: #ffffff;
    --success: #22c55e;
    --warning: #f59e0b;
}

body {
    font-family: sans-serif;
    background-color: var(--bg);
    margin: 0;
    display: flex;
    justify-content: center;
    padding-top: 20px;
}

.app-container {
    background: var(--card);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.tab-btn {
    padding: 10px 20px; font-size: 15px; font-weight: bold; border: 2px solid var(--primary);
    border-radius: 12px; background: white; color: var(--primary); cursor: pointer;
}
.tab-btn.active { background: var(--primary); color: white; }

.question-box {
    background: #e8f5e9; padding: 15px; border-radius: 12px; margin-bottom: 20px;
    font-size: 17px; font-weight: bold; border-left: 5px solid #4caf50; text-align: left;
}

/* 時計 */
.clock {
    width: 180px; height: 180px; border: 6px solid var(--primary); border-radius: 50%;
    position: relative; margin: 0 auto; background: #fff;
}
.center-dot {
    position: absolute; top: 50%; left: 50%; width: 12px; height: 12px;
    background: #fff; border: 3px solid var(--accent); border-radius: 50%;
    transform: translate(-50%, -50%); z-index: 10;
}
.hand {
    position: absolute; bottom: 50%; left: 50%;
    transform-origin: bottom center; transition: transform 0.8s ease-in-out;
    border-radius: 10px;
}
.hour { width: 7px; height: 45px; background: var(--primary); margin-left: -3.5px; z-index: 5; }
.minute { width: 5px; height: 75px; background: var(--accent); margin-left: -2.5px; z-index: 6; }
.number { position: absolute; top: 50%; left: 50%; font-size: 15px; font-weight: bold; color: #334155; }

.digital-time { font-weight: bold; font-size: 22px; margin-top: 10px; color: var(--primary); }

/* 数直線 */
.timeline-container { background: #fdf2f2; padding: 20px; border-radius: 15px; margin-bottom: 20px; }
.timeline { display: flex; align-items: center; justify-content: space-between; }
.time-point { font-weight: bold; font-size: 13px; color: #475569; width: 65px; }

.arrow-box { flex-grow: 1; display: flex; flex-direction: column; align-items: center; }

.input-mini {
    width: 40px; padding: 5px; border: 2px solid #cbd5e1; border-radius: 8px;
    text-align: center; font-size: 15px; font-weight: bold; margin-bottom: 5px;
}
.input-mini.correct { background: #dcfce7; border-color: var(--success); color: var(--success); }

/* 逆向きの矢印（右から左へ） */
.arrow-line-left { width: 100%; height: 3px; background: var(--accent); position: relative; }
.arrow-line-left::before {
    content: ''; position: absolute; left: -2px; top: -5px;
    border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-right: 10px solid var(--accent);
}

.message-box { min-height: 24px; color: var(--primary); font-weight: bold; margin-bottom: 15px; font-size: 14px; }

/* ボタン */
.btn-check {
    background: var(--primary); color: white; border: none; padding: 6px 12px;
    border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 13px;
}
.btn-check:disabled { background: #cbd5e1; cursor: not-allowed; }

.answer-area { border: 3px solid #4caf50; padding: 15px; border-radius: 15px; background: #fff; }
.ans-input { width: 50px; padding: 5px; font-size: 18px; text-align: center; font-weight: bold; }

.btn-reset { background: #64748b; margin-top: 15px; font-size: 12px; color: white; border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; }