/* ===== KIDS SIKHO — SHARED STYLES ===== */

:root {
  --primary: #FF6B6B;
  --secondary: #4ECDC4;
  --accent: #FFE66D;
  --purple: #A855F7;
  --green: #22C55E;
  --orange: #F97316;
  --blue: #3B82F6;
  --pink: #EC4899;
  --bg: #FFF9F0;
  --card-shadow: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 20px;
  --font: 'Segoe UI', 'Arial Rounded MT Bold', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== TOP BAR ===== */
.top-bar {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.top-bar .back-btn {
  background: rgba(255,255,255,0.25);
  border: none;
  color: white;
  font-size: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background 0.2s;
}
.top-bar .back-btn:hover { background: rgba(255,255,255,0.4); }
.top-bar h1 { font-size: 1.3rem; flex: 1; }
.top-bar .score-badge {
  background: var(--accent);
  color: #333;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.95rem;
}

/* ===== GAME CONTAINER ===== */
.game-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ===== CARDS ===== */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 20px;
  margin-bottom: 16px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-family: var(--font);
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:active { transform: scale(0.95); }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(255,107,107,0.4); }
.btn-secondary { background: var(--secondary); color: white; box-shadow: 0 4px 12px rgba(78,205,196,0.4); }
.btn-accent { background: var(--accent); color: #333; box-shadow: 0 4px 12px rgba(255,230,109,0.4); }
.btn-green { background: var(--green); color: white; box-shadow: 0 4px 12px rgba(34,197,94,0.4); }
.btn-purple { background: var(--purple); color: white; box-shadow: 0 4px 12px rgba(168,85,247,0.4); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }

/* ===== OPTION BUTTONS (MCQ) ===== */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.option-btn {
  padding: 18px 12px;
  border: 3px solid #E5E7EB;
  border-radius: var(--radius);
  background: white;
  font-size: 1.1rem;
  font-family: var(--font);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.option-btn:hover { border-color: var(--primary); background: #FFF0F0; transform: scale(1.03); }
.option-btn.correct { border-color: var(--green); background: #F0FFF4; color: var(--green); }
.option-btn.wrong { border-color: var(--primary); background: #FFF0F0; color: var(--primary); }
.option-btn:disabled { cursor: default; }

/* ===== SCORE / PROGRESS ===== */
.progress-bar-wrap {
  background: #E5E7EB;
  border-radius: 50px;
  height: 14px;
  overflow: hidden;
  margin: 10px 0;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  border-radius: 50px;
  transition: width 0.4s ease;
}

/* ===== RESULT SCREEN ===== */
.result-screen {
  text-align: center;
  padding: 40px 20px;
}
.result-screen .trophy { font-size: 80px; }
.result-screen h2 { font-size: 2rem; margin: 16px 0 8px; }
.result-screen .stars { font-size: 40px; letter-spacing: 4px; }

/* ===== GAME TILE (Hub page) ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.game-tile {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.game-tile:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.18); }
.game-tile .icon { font-size: 44px; margin-bottom: 8px; display: block; }
.game-tile .name { font-size: 0.9rem; font-weight: bold; line-height: 1.3; }
.game-tile .name-hi { font-size: 0.75rem; color: #888; margin-top: 3px; }

/* ===== CATEGORY HEADER ===== */
.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0 8px;
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
}
.category-header .cat-icon { font-size: 28px; }
.category-header .cat-bar {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: 0.3;
}

/* ===== ANIMATIONS ===== */
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.bounce { animation: bounce 0.6s ease; }
.pop { animation: pop 0.3s ease; }
.shake { animation: shake 0.4s ease; }
.fade-in { animation: fadeIn 0.4s ease; }

/* ===== HINT BOX ===== */
.hint-box {
  background: #FFFBEB;
  border: 2px dashed var(--accent);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 12px 0;
  font-size: 0.95rem;
  display: none;
}
.hint-box.show { display: block; animation: fadeIn 0.3s ease; }

/* ===== TIMER ===== */
.timer-circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(255,107,107,0.4);
}

/* ===== STAR REWARD ===== */
.star-pop {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  pointer-events: none;
  z-index: 9999;
  animation: pop 0.6s ease forwards;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .games-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .game-tile { padding: 14px 8px; }
  .game-tile .icon { font-size: 34px; }
  .options-grid { grid-template-columns: 1fr 1fr; }
  .top-bar h1 { font-size: 1.1rem; }
}
