* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; background: #f5f3ee; }
#app { min-height: 700px; }

/* ===== MENU ===== */
#menu-screen { padding: 2rem 1rem; display: flex; flex-direction: column; align-items: center; }
#menu-screen h1 { font-size: 26px; font-weight: 500; color: #222; margin-bottom: 6px; text-align: center; }
#menu-screen > p { font-size: 15px; color: #555; margin-bottom: 2rem; text-align: center; }
.game-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; width: 100%; max-width: 900px; }
.game-card { background: #fff; border-radius: 12px; border: 0.5px solid #ccc; padding: 1.25rem 1rem; cursor: pointer; transition: transform 0.12s, border-color 0.12s; display: flex; flex-direction: column; align-items: center; text-align: center; }
.game-card:hover { transform: translateY(-3px); border-color: #534AB7; }
.game-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.game-card h2 { font-size: 15px; font-weight: 500; color: #222; margin-bottom: 6px; }
.game-card p { font-size: 12px; color: #666; line-height: 1.5; margin-bottom: 12px; flex: 1; }
.game-card button { padding: 8px 16px; border-radius: 8px; border: none; font-size: 13px; font-weight: 500; cursor: pointer; width: 100%; }

/* ===== GAME SCREEN ===== */
#game-screen { display: none; padding: 0; }
.back-bar { padding: 10px 1rem; display: flex; align-items: center; gap: 8px; background: #fff; border-bottom: 0.5px solid #ddd; }
.back-bar button { padding: 6px 14px; border-radius: 8px; border: 1.5px solid #AFA9EC; background: #fff; color: #534AB7; font-size: 13px; font-weight: 500; cursor: pointer; }
.back-bar button:hover { background: #EEEDFE; }
.back-bar span { font-size: 14px; font-weight: 500; color: #222; }
#game-container { padding: 1rem; }

/* ===== SHARED ===== */
.scoreboard { display: flex; justify-content: center; gap: 16px; margin-bottom: 1rem; flex-wrap: wrap; }
.team-card { background: #fff; border-radius: 8px; padding: 8px 20px; text-align: center; border: 0.5px solid #ccc; min-width: 110px; }
.team-card.active { border: 2px solid #1D9E75; }
.team-name { font-size: 13px; color: #555; }
.team-score { font-size: 22px; font-weight: 500; color: #222; }
.game-title-h1 { text-align: center; font-size: 20px; font-weight: 500; margin-bottom: 4px; color: #222; }
.game-sub { text-align: center; font-size: 13px; color: #666; margin-bottom: 1rem; }
.turn-msg { text-align: center; font-size: 14px; color: #666; margin-bottom: 8px; }
.controls-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.controls-row button { padding: 10px 22px; border-radius: 8px; border: none; background: #534AB7; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
.controls-row button:hover { background: #3C3489; }
.next-btn { padding: 10px 28px; border-radius: 8px; border: none; background: #534AB7; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
.next-btn:hover { background: #3C3489; }
.game-wrap { display: none; }

/* ===== MEMORIA ===== */
#level-select { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
#level-select button { padding: 7px 14px; border-radius: 8px; border: 1.5px solid #AFA9EC; background: #fff; color: #534AB7; font-size: 13px; font-weight: 500; cursor: pointer; }
#level-select button.active-btn { background: #534AB7; color: #fff; border-color: #534AB7; }
#win-msg-m { text-align: center; font-size: 18px; font-weight: 500; color: #0F6E56; margin: 1rem 0; display: none; }
.card { width: 100px; height: 100px; border-radius: 8px; cursor: pointer; border: 0.5px solid #ccc; display: flex; align-items: center; justify-content: center; transition: transform 0.12s; user-select: none; font-size: 12px; text-align: center; padding: 6px; line-height: 1.3; font-weight: 500; flex-shrink: 0; }
.card:hover:not(.flipped):not(.matched) { transform: scale(1.04); }
.card.back { background: #534AB7; color: #CECBF6; font-size: 22px; }
.card.pair-a { background: #E1F5EE; color: #085041; border-color: #5DCAA5; }
.card.pair-b { background: #E6F1FB; color: #0C447C; border-color: #378ADD; }
.card.matched { opacity: 0.45; transform: scale(0.96); cursor: default; }
.card.wrong { background: #FCEBEB !important; color: #791F1F !important; border-color: #E24B4A !important; }
#card-modal-backdrop { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(30,20,70,0.60); z-index: 9999; align-items: center; justify-content: center; cursor: pointer; }
#card-modal-backdrop.open { display: flex; }
#card-modal { background: #fff; border-radius: 16px; padding: 2rem 2.5rem; max-width: 480px; width: 90%; text-align: center; border: 2px solid #AFA9EC; position: relative; cursor: default; }
#card-modal.type-a { background: #E1F5EE; border-color: #5DCAA5; }
#card-modal.type-b { background: #E6F1FB; border-color: #378ADD; }
#card-modal-label { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: #888; margin-bottom: 10px; }
#card-modal-text { font-size: 22px; font-weight: 500; color: #222; line-height: 1.4; }
#card-modal-bar-wrap { height: 5px; background: #ddd; border-radius: 4px; overflow: hidden; }
#card-modal-bar { height: 5px; background: #534AB7; border-radius: 4px; width: 100%; }

/* ===== RULETA ===== */
#wheel-wrap { display: flex; justify-content: center; align-items: center; margin-bottom: 1rem; position: relative; }
#pointer { width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 30px solid #26215C; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); z-index: 10; }
#spin-btn { display: block; margin: 0 auto 1rem; padding: 11px 32px; border-radius: 8px; border: none; background: #534AB7; color: #fff; font-size: 15px; font-weight: 500; cursor: pointer; }
#spin-btn:disabled { background: #AFA9EC; cursor: not-allowed; }
#spin-btn:hover:not(:disabled) { background: #3C3489; }
#question-box { background: #fff; border-radius: 12px; border: 0.5px solid #ccc; padding: 1rem 1.25rem; max-width: 560px; margin: 0 auto 1rem; display: none; }
#q-category { font-size: 12px; font-weight: 500; color: #534AB7; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
#q-text { font-size: 15px; color: #222; margin-bottom: 12px; line-height: 1.5; }
#q-answer-btn { padding: 8px 16px; border-radius: 8px; border: 1.5px solid #AFA9EC; background: #fff; color: #534AB7; font-size: 13px; font-weight: 500; cursor: pointer; }
#q-answer-btn:hover { background: #EEEDFE; }
#q-answer { font-size: 13px; color: #085041; background: #E1F5EE; border-radius: 8px; padding: 8px 12px; margin-top: 10px; display: none; line-height: 1.5; }
#point-btns { display: none; gap: 8px; margin-top: 12px; }
.pt-btn { padding: 8px 16px; border-radius: 8px; border: none; font-size: 13px; font-weight: 500; cursor: pointer; }
#btn-correct { background: #1D9E75; color: #fff; }
#btn-wrong { background: #E24B4A; color: #fff; }

/* ===== BIBLIA SPEED ===== */
#bs-statement-box { background: #EEEDFE; border-radius: 10px; padding: 1.25rem 1.5rem; margin-bottom: 1rem; text-align: center; }
#bs-phrase-display { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 1.5rem; min-height: 60px; align-items: center; }
.letter-box { width: 32px; height: 40px; border-bottom: 3px solid #534AB7; display: flex; align-items: flex-end; justify-content: center; font-size: 20px; font-weight: 500; color: #222; padding-bottom: 2px; }
.letter-box.space { border-bottom: none; width: 16px; }
.letter-box.revealed { color: #1D9E75; }
.letter-box.wrong-reveal { color: #E24B4A; }
.timer-row { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; }
.timer-bar-wrap { flex: 1; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.timer-bar { height: 8px; border-radius: 4px; width: 100%; }
.wrong-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: #eee; margin: 0 3px; }
.wrong-dot.hit { background: #E24B4A; }
#bs-keyboard { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 1rem; }
.key { width: 36px; height: 36px; border-radius: 6px; border: 1.5px solid #AFA9EC; background: #fff; color: #534AB7; font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.key:hover:not(:disabled) { background: #EEEDFE; }
.key:disabled { background: #f0f0f0; color: #bbb; border-color: #ddd; cursor: not-allowed; }
.key.hit-wrong { background: #FCEBEB; color: #A32D2D; border-color: #E24B4A; }
.key.hit-right { background: #E1F5EE; color: #085041; border-color: #5DCAA5; }
#bs-guess-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(30,20,70,0.6); z-index: 9999; align-items: center; justify-content: center; }
#bs-guess-modal.open { display: flex; }
#bs-welcome-modal.open { display: flex !important; }
#bs-guess-box { background: #fff; border-radius: 16px; padding: 1.5rem 2rem; max-width: 420px; width: 90%; text-align: center; border: 2px solid #BA7517; }
#bs-guess-input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1.5px solid #AFA9EC; font-size: 15px; margin-bottom: 12px; outline: none; }
#bs-guess-input:focus { border-color: #534AB7; }

/* ===== ORDEN BIBLICO ===== */
#ob-items-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1.25rem; min-height: 160px; }
.item-card { border-radius: 10px; padding: 12px 16px; display: flex; align-items: flex-start; gap: 12px; border: 1.5px solid #ccc; cursor: grab; user-select: none; }
.item-card:active { cursor: grabbing; }
.item-card.dragging { opacity: 0.4; }
.item-card.drag-over { border-color: #534AB7; background: #dddcfc; }
.item-card.ob-default { background: #EEEDFE; border-color: #AFA9EC; }
.item-card.correct { background: #E1F5EE; border-color: #5DCAA5; cursor: default; }
.item-card.wrong { background: #FCEBEB; border-color: #E24B4A; cursor: default; }
.item-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; flex-shrink: 0; background: #534AB7; color: #fff; }
.item-num.correct { background: #1D9E75; }
.item-num.wrong { background: #E24B4A; }
.item-text { font-size: 14px; font-weight: 500; line-height: 1.4; flex: 1; color: #3C3489; }
.item-text.correct { color: #085041; }
.item-text.wrong { color: #791F1F; }
#ob-correct-order { font-size: 13px; color: #555; background: #f5f3ee; border-radius: 8px; padding: 10px; text-align: left; display: none; margin-bottom: 12px; }

/* ===== VERDADERO O FALSO ===== */
#vf-statement-box { background: #EEEDFE; border-radius: 10px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; text-align: center; }
#vf-statement-text { font-size: 18px; font-weight: 500; color: #26215C; line-height: 1.5; margin-bottom: 8px; }
#vf-bet-controls { display: flex; align-items: center; justify-content: center; gap: 12px; }
.bet-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: #534AB7; color: #fff; font-size: 20px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bet-btn:hover { background: #3C3489; }
.bet-btn:disabled { background: #ccc; cursor: not-allowed; }
#vf-bet-display { font-size: 28px; font-weight: 500; color: #534AB7; min-width: 48px; text-align: center; }
#vf-answer-btns { display: flex; gap: 12px; justify-content: center; margin-bottom: 1rem; }
#vf-btn-true { padding: 14px 36px; border-radius: 10px; border: none; background: #1D9E75; color: #fff; font-size: 16px; font-weight: 500; cursor: pointer; }
#vf-btn-true:hover { background: #0F6E56; }
#vf-btn-false { padding: 14px 36px; border-radius: 10px; border: none; background: #E24B4A; color: #fff; font-size: 16px; font-weight: 500; cursor: pointer; }
#vf-btn-false:hover { background: #A32D2D; }
#vf-answer-btns button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== QUIEN SOY YO ===== */
#qsy-clues-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1.5rem; min-height: 160px; }
.clue-card { border-radius: 10px; padding: 14px 18px; display: flex; align-items: flex-start; gap: 12px; border: 1.5px solid #ccc; }
.clue-card.hidden { background: #f0eef8; border-color: #AFA9EC; }
.clue-card.revealed { background: #EEEDFE; border-color: #7F77DD; }
.clue-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; flex-shrink: 0; }
.clue-card.hidden .clue-num { background: #AFA9EC; color: #fff; }
.clue-card.revealed .clue-num { background: #534AB7; color: #fff; }
.clue-text { font-size: 15px; font-weight: 500; line-height: 1.4; }
.clue-card.hidden .clue-text { color: #AFA9EC; font-style: italic; }
.clue-card.revealed .clue-text { color: #3C3489; }
#qsy-points-badge { display: inline-block; padding: 6px 20px; border-radius: 20px; font-size: 15px; font-weight: 500; background: #FAEEDA; color: #633806; }
#qsy-answer-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
#qsy-correct-btn { padding: 11px 28px; border-radius: 8px; border: none; background: #1D9E75; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
#qsy-wrong-btn { padding: 11px 28px; border-radius: 8px; border: none; background: #E24B4A; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
#qsy-pass-btn { padding: 11px 20px; border-radius: 8px; border: 1.5px solid #ccc; background: #fff; color: #555; font-size: 14px; font-weight: 500; cursor: pointer; }

/* ===== COMPLETA EL VERSICULO ===== */
#cv-verse-box { background: #f5f3ee; border-radius: 10px; padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; text-align: center; font-size: 18px; color: #222; line-height: 1.8; }
.blank { display: inline-block; background: #534AB7; color: transparent; border-radius: 4px; min-width: 80px; padding: 0 6px; user-select: none; vertical-align: middle; font-size: 18px; }
.blank.revealed-correct { background: #1D9E75; color: #fff; }
.blank.revealed-wrong { background: #E24B4A; color: #fff; }
#cv-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 1rem; }
.opt-btn { padding: 14px 12px; border-radius: 10px; border: 1.5px solid #9FE1CB; background: #E1F5EE; color: #085041; font-size: 15px; font-weight: 500; cursor: pointer; text-align: center; }
.opt-btn:hover:not(:disabled) { background: #9FE1CB; border-color: #5DCAA5; }
.opt-btn:disabled { cursor: not-allowed; opacity: 0.7; }
.opt-btn.correct { background: #1D9E75; border-color: #0F6E56; color: #fff; }
.opt-btn.wrong { background: #FCEBEB; border-color: #E24B4A; color: #791F1F; }
#cv-full-verse { font-size: 13px; color: #555; background: #f5f3ee; border-radius: 8px; padding: 10px 14px; margin: 8px 0; line-height: 1.6; font-style: italic; text-align: left; }

/* ===== RESULT SHARED ===== */
.result-area { text-align: center; margin-top: 1rem; }
.result-icon { font-size: 32px; margin-bottom: 6px; }
.result-msg { font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.result-msg.win { color: #0F6E56; }
.result-msg.lose { color: #A32D2D; }
.result-msg.pass { color: #888; }
.explanation { font-size: 13px; color: #555; background: #f5f3ee; border-radius: 8px; padding: 10px 14px; margin: 8px 0; line-height: 1.5; text-align: left; }
.category-badge { display: inline-block; font-size: 11px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 12px; border-radius: 20px; margin-bottom: 10px; }
