/* 
    Syntax Game Shell CSS
    Loaded by all syntax game pages
    --syntax-color is set by syntax-template.js from RULE_CONFIG.color
    --sc-rgb is set by syntax-template.js as the R,G,B values for rgba usage
*/
:root {
    --primary-gold: #ffd700;
    --bg-dark: #0d0d0d;
    --card-dark: #161616;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --text-white: #ffffff;
    --text-muted: #888;
    --accent-green: #4ade80;
    --accent-red: #f87171;
    --syntax-color: #34d399;
    --sc-rgb: 52, 211, 153;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Manakahthey', serif; background: var(--bg-dark); color: var(--text-white); min-height: 100vh; }

.header {
    background: linear-gradient(135deg, rgba(var(--sc-rgb), 0.1), rgba(13, 13, 13, 0.95));
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(var(--sc-rgb), 0.2);
    padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.back-btn { font-family: 'Manakahthey', serif; width: 36px; height: 36px; border-radius: 50%; background: rgba(var(--sc-rgb), 0.2); border: none; color: var(--syntax-color); font-size: 18px; cursor: pointer; }
.header-title { font-family: 'Manakahthey', serif; font-size: 1rem; font-weight: 600; color: var(--syntax-color); }
.header-score { font-family: 'Manakahthey', serif; background: rgba(var(--sc-rgb), 0.15); padding: 6px 14px; border-radius: 20px; font-size: 0.9rem; }
.header-score span { color: var(--syntax-color); font-weight: 600; }

.progress-bar { height: 4px; background: rgba(var(--sc-rgb), 0.1); }
.progress-fill { height: 100%; background: var(--syntax-color); transition: width 0.3s; }

.game-container { max-width: 500px; margin: 0 auto; padding: 25px 20px; }

.rule-reminder {
    font-family: 'Manakahthey', serif;
    background: rgba(var(--sc-rgb), 0.08);
    border: 1px solid rgba(var(--sc-rgb), 0.2);
    border-radius: 12px; padding: 15px; margin-bottom: 20px;
}

.question-card {
    background: var(--card-dark);
    border: 2px solid rgba(var(--sc-rgb), 0.3);
    border-radius: 20px; padding: 25px; text-align: center; margin-bottom: 20px;
    position: relative;
}
.question-type { font-family: 'Manakahthey', serif; font-size: 0.8rem; color: var(--syntax-color); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; }
.question-prompt { font-family: 'Manakahthey', serif; font-size: 1.1rem; color: var(--text-white); margin-bottom: 15px; line-height: 1.4; }
.question-word { font-family: 'Manakahthey', serif; font-size: 2rem; color: var(--primary-gold); direction: rtl; text-shadow: 0 0 30px rgba(255, 215, 0, 0.2); }
.question-english { font-family: 'Manakahthey', serif; font-size: 1.4rem; color: var(--text-white); margin-top: 8px; }

.audio-btn {
    position: absolute; top: 15px; right: 15px;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(var(--sc-rgb), 0.15); border: 1px solid rgba(var(--sc-rgb), 0.3);
    color: var(--syntax-color); font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.audio-btn:hover { background: rgba(var(--sc-rgb), 0.25); transform: scale(1.05); }
.audio-btn.playing { background: var(--syntax-color); color: var(--bg-dark); }

.options-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.options-grid.two-col { grid-template-columns: 1fr 1fr; }

.option-btn {
    font-family: 'Manakahthey', serif;
    background: var(--card-dark); border: 2px solid var(--border-subtle);
    border-radius: 14px; padding: 18px; text-align: center;
    cursor: pointer; transition: all 0.2s;
}
.option-btn:hover:not(.disabled) { border-color: rgba(var(--sc-rgb), 0.5); transform: translateY(-2px); }
.option-btn.correct { border-color: var(--accent-green); background: rgba(74, 222, 128, 0.15); }
.option-btn.wrong { border-color: var(--accent-red); background: rgba(248, 113, 113, 0.15); }
.option-btn.disabled { pointer-events: none; opacity: 0.6; }
.option-judean { font-family: 'Manakahthey', serif; font-size: 1.2rem; color: var(--primary-gold); direction: rtl; }
.option-english { font-family: 'Manakahthey', serif; font-size: 0.95rem; color: var(--text-white); }

.feedback { font-family: 'Manakahthey', serif; text-align: center; padding: 15px; margin-top: 15px; border-radius: 12px; display: none; }
.feedback.visible { display: block; }
.feedback.correct { background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.3); color: var(--accent-green); }
.feedback.wrong { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.3); color: var(--accent-red); }
.feedback-rule { font-family: 'Manakahthey', serif; font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }

.next-btn { font-family: 'Manakahthey', serif; width: 100%; padding: 16px; background: var(--syntax-color); border: none; border-radius: 12px; color: var(--bg-dark); font-size: 1.1rem; font-weight: 600; cursor: pointer; margin-top: 15px; display: none; }
.next-btn.visible { display: block; }

.results-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.95); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.results-overlay.active { display: flex; }

.results-card { font-family: 'Manakahthey', serif; background: var(--card-dark); border: 2px solid rgba(var(--sc-rgb), 0.3); border-radius: 24px; padding: 40px; text-align: center; max-width: 420px; width: 100%; }
.results-icon { font-size: 4rem; margin-bottom: 20px; }
.results-title { font-size: 1.8rem; color: var(--syntax-color); margin-bottom: 10px; }
.results-subtitle { color: var(--text-muted); margin-bottom: 30px; }
.results-stats { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; }
.result-stat { text-align: center; }
.result-stat-value { font-size: 2rem; font-weight: 700; color: var(--syntax-color); }
.result-stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; }
.results-btn { font-family: 'Manakahthey', serif; padding: 14px 30px; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; border: none; margin: 5px; width: 100%; }
.results-btn.primary { background: var(--syntax-color); color: var(--bg-dark); }
.results-btn.secondary { background: var(--card-dark); color: var(--syntax-color); border: 1px solid rgba(var(--sc-rgb), 0.3); margin-top: 10px; }

.no-words { font-family: 'Manakahthey', serif; text-align: center; padding: 60px 20px; }
.no-words-icon { font-size: 4rem; margin-bottom: 20px; }
.no-words-title { color: var(--syntax-color); margin-bottom: 15px; font-size: 1.5rem; }
.no-words-text { color: var(--text-muted); margin-bottom: 25px; }

.verse-ref {
    text-align: center;
    margin: -10px 0 14px;
    font-size: 0.85rem;
}
.verse-ref a {
    color: var(--primary-gold);
    opacity: 0.75;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    letter-spacing: 0.3px;
}
.verse-ref a:hover { opacity: 1; }

.reconstruction-box {
    margin: 14px 0 0;
    padding: 12px 16px;
    background: rgba(180, 120, 0, 0.12);
    border: 1px solid rgba(255, 180, 0, 0.35);
    border-left: 3px solid #ffb300;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
.reconstruction-box .recon-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffb300;
    font-weight: 700;
}
.reconstruction-box .recon-note {
    font-size: 0.82rem;
    color: #e5c98d;
    line-height: 1.6;
}
.reconstruction-box .recon-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: #ffb300;
    text-decoration: none;
    opacity: 0.85;
}
.reconstruction-box .recon-link:hover { opacity: 1; }
