/* =============================================
   TNTT THÁI HÀ — Tin Mừng Hôm Nay
   Color concept: Navy Blue #1A3A5C / #1B4F8A
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600;700;800;900&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --navy:        #1A3560;
  --navy-dark:   #0F2240;
  --navy-mid:    #1E4080;
  --navy-light:  #2A5298;
  --navy-soft:   #D6E4F7;
  --navy-pale:   #EBF2FC;
  --accent:      #F0C040;
  --accent-dark: #C89A10;
  --accent-pale: #FDF6DC;
  --white:       #FFFFFF;
  --off-white:   #F4F8FF;
  --text-dark:   #0D1F3C;
  --text-mid:    #2E4A6E;
  --text-light:  #6B87AB;
  --success:     #16A34A;
  --success-bg:  #DCFCE7;
  --danger:      #DC2626;
  --danger-bg:   #FEE2E2;
  --radius:      18px;
  --radius-sm:   10px;
  --shadow:      0 6px 28px rgba(26,53,96,0.13);
  --shadow-lg:   0 16px 56px rgba(26,53,96,0.22);
  --shadow-btn:  0 6px 20px rgba(26,53,96,0.30);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--navy-dark);
  min-height: 100vh;
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ---- BACKGROUND LAYERS ---- */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 10% 20%, rgba(42,82,152,0.5) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(15,34,64,0.7) 0%, transparent 60%),
    linear-gradient(160deg, #0F2240 0%, #1A3560 50%, #0D1A35 100%);
  pointer-events: none; z-index: 0;
}

/* Subtle cross pattern overlay */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none; z-index: 0;
}

/* ---- WRAPPER ---- */
.wrapper {
  position: relative; z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 72px;
}

/* =============================================
   HEADER
   ============================================= */

.header {
  text-align: center;
  margin-bottom: 32px;
  animation: fadeDown 0.7s ease;
}

/* LOGO CONTAINER - KHÔNG BOX */
.header-logo {
  margin: 0 auto 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* LOGO IMAGE */
.header-logo img {
  height: 70px;
  width: auto;
  object-fit: contain;
  display: block;

  /* đẹp hơn */
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35));
  transition: transform 0.25s ease;
}

.header-logo img:hover {
  transform: scale(1.05);
}

/* TITLE */
.header-title {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.header-title span {
  color: var(--accent);
}

/* SUBTEXT */
.header-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
  letter-spacing: 0.3px;
}

/* BADGE */
.header-badge {
  display: inline-block;
  margin-top: 12px;
  background: rgba(240,192,64,0.15);
  border: 1px solid rgba(240,192,64,0.35);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* =============================================
   START SCREEN
   ============================================= */
.start-screen {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px 28px 36px;
  text-align: center;
  animation: fadeUp 0.6s ease;
  border: 1px solid rgba(42,82,152,0.12);
}

.start-icon {
  width: 90px; height: 90px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 40px;
  box-shadow: 0 10px 32px rgba(26,53,96,0.35);
}

.start-screen h2 {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(19px, 4vw, 24px);
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 10px;
}

.start-screen > p {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 400px;
  margin: 0 auto 24px;
}

.rules-list {
  background: var(--navy-pale);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 28px;
  text-align: left;
  border-left: 4px solid var(--navy);
}

.rules-list li {
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 9px;
  display: flex; align-items: flex-start; gap: 10px;
  line-height: 1.5;
}

.rules-list li:last-child { margin-bottom: 0; }

.rules-list .rule-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.start-btn {
  width: 100%; max-width: 340px;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Baloo 2', cursive;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.start-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.12) 100%);
  pointer-events: none;
}

.start-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 36px rgba(26,53,96,0.42);
}

.start-btn:active { transform: scale(0.98); }

/* =============================================
   DAY SELECTOR
   ============================================= */
.day-selector {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
  animation: fadeUp 0.5s ease 0.1s both;
}

.day-selector h3 {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.day-tab {
  padding: 10px 4px;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
}

.day-tab:hover {
  border-color: rgba(240,192,64,0.5);
  background: rgba(240,192,64,0.1);
  color: var(--accent);
  transform: translateY(-2px);
}

.day-tab.active {
  border-color: var(--accent);
  background: rgba(240,192,64,0.18);
  color: var(--accent);
  box-shadow: 0 4px 16px rgba(240,192,64,0.22);
}

.day-tab .day-abbr {
  display: block;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.7;
  margin-bottom: 3px;
}

.day-tab .day-num {
  display: block;
  font-family: 'Baloo 2', cursive;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

/* =============================================
   SCRIPTURE CARD
   ============================================= */
.scripture-card {
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 20px;
  border-top: 4px solid var(--navy);
  animation: fadeUp 0.5s ease 0.15s both;
  position: relative;
  overflow: hidden;
}

.scripture-card::before {
  content: '✝';
  position: absolute;
  right: 18px; top: 14px;
  font-size: 56px;
  color: rgba(26,53,96,0.05);
  line-height: 1;
  pointer-events: none;
}

.scripture-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--navy);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}

.scripture-label::before {
  content: '';
  display: inline-block;
  width: 16px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

.scripture-card h2 {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(16px, 3.5vw, 20px);
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 10px;
  line-height: 1.35;
}

.scripture-card p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.75;
  font-style: italic;
}

.scripture-ref {
  display: inline-block;
  margin-top: 12px;
  background: var(--navy-pale);
  color: var(--navy);
  font-weight: 800;
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--navy-soft);
}

/* =============================================
   SCORE HUD
   ============================================= */
.score-hud {
  display: flex; justify-content: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  animation: fadeUp 0.5s ease 0.2s both;
}

.hud-chip {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  display: flex; align-items: center; gap: 7px;
}

.hud-dot {
  width: 9px; height: 9px; border-radius: 50%;
}

.hud-dot-score  { background: var(--accent); }
.hud-dot-ok     { background: #4ADE80; }
.hud-dot-bad    { background: #F87171; }

/* =============================================
   PROGRESS BAR
   ============================================= */
.progress-wrap {
  margin-bottom: 20px;
}

.progress-track {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  height: 7px;
  margin-bottom: 7px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #FF9D00);
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.34,1.56,0.64,1);
}

.progress-labels {
  display: flex; justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
}

/* =============================================
   QUESTION CARD
   ============================================= */
.question-card {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  animation: cardIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
  border: 1px solid rgba(42,82,152,0.1);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.q-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--navy);
  color: var(--white);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.q-badge span {
  font-family: 'Baloo 2', cursive;
  font-size: 15px;
  font-weight: 900;
}

.question-text {
  font-size: clamp(16px, 3vw, 18px);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 22px;
}

/* ---- OPTIONS ---- */
.options {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 4px;
}

.option-btn {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #DDE6F4;
  border-radius: var(--radius-sm);
  background: var(--off-white);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: left;
  cursor: pointer;
  transition: all 0.18s;
  display: flex; align-items: center; gap: 12px;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--navy-light);
  background: var(--navy-pale);
  color: var(--navy);
  transform: translateX(5px);
}

.option-btn.correct {
  border-color: var(--success);
  background: var(--success-bg);
  color: #14532D;
  animation: popCorrect 0.35s ease;
}

.option-btn.wrong {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: #7F1D1D;
  animation: shakeWrong 0.4s ease;
}

.option-btn.reveal-correct {
  border-color: var(--success);
  background: var(--success-bg);
  color: #14532D;
}

.option-btn:disabled { cursor: not-allowed; opacity: 0.85; }

.option-letter {
  width: 32px; height: 32px; min-width: 32px;
  border-radius: 8px;
  background: var(--navy-soft);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px;
  color: var(--navy);
  transition: all 0.18s;
  flex-shrink: 0;
}

.option-btn.correct .option-letter {
  background: var(--success);
  color: var(--white);
  border-radius: 50%;
}

.option-btn.wrong .option-letter {
  background: var(--danger);
  color: var(--white);
  border-radius: 50%;
}

.option-btn.reveal-correct .option-letter {
  background: var(--success);
  color: var(--white);
  border-radius: 50%;
}

@keyframes popCorrect {
  0% { transform: scale(1); }
  45% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@keyframes shakeWrong {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-7px); }
  40%     { transform: translateX(7px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}

/* ---- FEEDBACK ---- */
.feedback {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  display: none;
}

.feedback.show { display: block; animation: fadeUp 0.28s ease; }

.feedback.fb-correct {
  background: var(--success-bg);
  color: #14532D;
  border-left: 4px solid var(--success);
}

.feedback.fb-wrong {
  background: var(--danger-bg);
  color: #7F1D1D;
  border-left: 4px solid var(--danger);
}

/* ---- NEXT BUTTON ---- */
.next-btn {
  display: none;
  width: 100%;
  padding: 14px;
  margin-top: 14px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Baloo 2', cursive;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.next-btn.show { display: block; animation: fadeUp 0.28s ease; }

.next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(26,53,96,0.42);
}

.next-btn:active { transform: scale(0.98); }

/* =============================================
   RESULT SCREEN
   ============================================= */
#result-screen { display: none; }

.result-hero {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 44px 28px 36px;
  text-align: center;
  margin-bottom: 20px;
  border-top: 5px solid var(--navy);
  animation: fadeUp 0.6s ease;
  position: relative;
  overflow: hidden;
}

.result-hero::before {
  content: '✝';
  position: absolute;
  right: -8px; bottom: -16px;
  font-size: 120px;
  color: rgba(26,53,96,0.04);
  pointer-events: none;
}

.result-trophy {
  font-size: 82px;
  display: block;
  margin-bottom: 12px;
  animation: trophyIn 0.8s cubic-bezier(0.34,1.56,0.64,1);
  line-height: 1;
}

@keyframes trophyIn {
  from { transform: scale(0.3) rotate(-25deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);    opacity: 1; }
}

.result-score-row {
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
  margin-bottom: 4px;
}

.result-score {
  font-family: 'Baloo 2', cursive;
  font-size: 68px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
}

.result-max {
  font-family: 'Baloo 2', cursive;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-light);
}

.result-title {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(18px, 4.5vw, 25px);
  font-weight: 900;
  color: var(--navy-dark);
  margin: 10px 0 8px;
}

.result-message {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 400px;
  margin: 0 auto 20px;
}

.reward-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 26px;
  border-radius: 999px;
  font-family: 'Baloo 2', cursive;
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  box-shadow: var(--shadow-btn);
  animation: badgePulse 2.5s ease-in-out infinite;
}

@keyframes badgePulse {
  0%,100% { box-shadow: 0 6px 20px rgba(26,53,96,0.3); }
  50%      { box-shadow: 0 8px 32px rgba(26,53,96,0.52); }
}

/* ---- STATS ROW ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(255,255,255,0.09);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 18px 10px;
  text-align: center;
}

.stat-num {
  font-family: 'Baloo 2', cursive;
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.45);
}

.stat-ok   .stat-num { color: #4ADE80; }
.stat-bad  .stat-num { color: #F87171; }
.stat-pct  .stat-num { color: var(--accent); }

/* ---- REVIEW SECTION ---- */
.review-section {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
  border-top: 3px solid var(--navy-soft);
}

.review-section h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 17px;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

.review-item {
  padding: 13px 0;
  border-bottom: 1px solid #EEF2F8;
}

.review-item:last-child { border-bottom: none; padding-bottom: 0; }

.review-q {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.45;
}

.review-ans {
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: flex-start; gap: 6px;
  line-height: 1.45;
}

.review-ans.ok   { color: #15803D; }
.review-ans.bad  { color: #B91C1C; }

.review-correct {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
  padding-left: 18px;
}

/* ---- RESTART BUTTON ---- */
.restart-btn {
  width: 100%;
  padding: 16px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-family: 'Baloo 2', cursive;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.22s;
  letter-spacing: 0.3px;
}

.restart-btn:hover {
  background: rgba(255,255,255,0.18);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* =============================================
   CONFETTI
   ============================================= */
.confetti-wrap {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

.confetti-piece {
  position: absolute;
  opacity: 0;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0%   { opacity: 1; transform: translateY(-30px) rotate(0deg) scale(1); }
  80%  { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(105vh) rotate(800deg) scale(0.5); }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 480px) {
  .day-tabs { grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .day-tab .day-num { font-size: 15px; }
  .day-tab .day-abbr { font-size: 9px; }
  .result-score { font-size: 52px; }
  .stats-row { gap: 8px; }
  .question-card { padding: 22px 16px; }
  .scripture-card { padding: 18px 16px; }
}
