/* ── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Assistant', 'Segoe UI', system-ui, sans-serif;
    background: #f4f7f2;
    color: #2c3e50;
    direction: rtl;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Layout ───────────────────────────────────── */
.container {
    width: 100%;
    max-width: 600px;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0,0,0,.08);
}

/* ── Header ───────────────────────────────────── */
.header {
    background: #2e5a27;
    color: #fff;
    padding: 20px 20px 16px;
    text-align: center;
}
.header h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}
.header .subtitle {
    font-size: 13px;
    opacity: .8;
}

/* ── Riddle card ──────────────────────────────── */
.riddle-card {
    padding: 20px 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.riddle-image {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 10px;
}

.riddle-text {
    font-size: 19px;
    line-height: 1.6;
    color: #1a3a17;
    font-weight: 600;
}

/* ── Answer buttons ───────────────────────────── */
.answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.answer-btn {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    text-align: right;
    background: #fff;
    color: #1a3a17;
    border: 2px solid #2e7d32;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    line-height: 1.4;
}
.answer-btn:active,
.answer-btn:hover {
    background: #e8f5e9;
}

/* אחרי בחירה */
.answer-btn:disabled { cursor: default; }
.answer-btn.correct  { background: #2e7d32; color: #fff; border-color: #1b5e20; }
.answer-btn.wrong    { background: #c62828; color: #fff; border-color: #b71c1c; }
.answer-btn.dimmed   { opacity: .4; background: #f5f5f5; border-color: #ccc; color: #888; }

/* ── Result panel (hidden until answer) ──────── */
#result-panel {
    display: none;
    padding: 0 16px 24px;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn .3s ease-out;
}
#result-panel.visible { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-verdict {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    padding: 10px 0 4px;
}
.result-verdict.correct { color: #2e7d32; }
.result-verdict.wrong   { color: #c62828; }

.result-explanation {
    font-size: 15px;
    line-height: 1.65;
    color: #333;
    background: #f9fbe7;
    border-right: 3px solid #8bc34a;
    padding: 12px 14px;
    border-radius: 0 8px 8px 0;
}

.trail-context {
    font-size: 14px;
    color: #2e5a27;
    background: #e8f5e9;
    padding: 10px 14px;
    border-radius: 8px;
    text-align: center;
}

/* ── כפתורי פעולה (שיתוף + חזרה) ─────────────── */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.action-share {
    flex: 1;
    min-height: 52px;
    background: #1877f2;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.action-share:active { background: #1558b0; }

.action-back {
    flex: 1;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4ee;
    color: #2e5a27;
    border: 2px solid #2e7d32;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: background .15s;
}
.action-back:active { background: #d9ebd5; }

/* ── No-riddle state ──────────────────────────── */
.no-riddle {
    padding: 40px 24px;
    text-align: center;
    font-size: 17px;
    color: #666;
    line-height: 1.6;
}
