/* ==========================================================================
   BILIKIDS KIDS CLUB - EXTENDED UNITS STYLES (UNITS 9, 10, 11, 12)
   Rich Cambridge A2 Interactive Learning Environment
   ========================================================================== */

:root {
  --font-display: 'Fredoka', cursive, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --primary: #0284c7;
  --primary-dark: #0369a1;
  --secondary: #f59e0b;
  --accent: #8b5cf6;
  --success: #10b981;
  --danger: #ef4444;

  --card-bg: #ffffff;
  --border-subtle: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f8fafc 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav Header */
.unit-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 20px;
}

.unit-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-back-map {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.btn-back-map:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.unit-title-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unit-tag-pill {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}

.unit-name-head {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: #0f172a;
}

.unit-score-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  border: 1.5px solid #fde68a;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 800;
  color: #b45309;
}

/* Tabs Bar */
.activity-tabs-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 16px;
}

.tabs-track {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab-btn {
  background: transparent;
  border: 1.5px solid transparent;
  padding: 10px 20px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.tab-btn.active {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #0369a1;
}

/* Workspace */
.unit-workspace {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.25rem;
  width: 100%;
  flex: 1;
}

.activity-view {
  display: none;
}

.activity-view.active-view {
  display: block;
}

/* Cards & Content Layout */
.unit-game-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
}

.unit-card-header {
  margin-bottom: 1.5rem;
}

.unit-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: #0f172a;
}

.unit-card-subtitle {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Grid for Choices / Flashcards */
.kids-interactive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.kids-tile-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.25rem;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.kids-tile-btn:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.kids-tile-btn:disabled {
  cursor: default;
  opacity: 1;
}

.kids-tile-btn:disabled:hover {
  transform: none;
}

.kids-tile-btn:hover {
  background: #f0f9ff;
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.kids-tile-icon {
  font-size: 2.6rem;
}

.kids-tile-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.kids-tile-sub {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
}

.kids-tile-btn.correct {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
}

.kids-tile-btn.incorrect {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
}

/* Sound Button */
.kids-audio-play-btn {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

/* Question Banner */
.kids-clue-box {
  background: #fefce8;
  border: 2px dashed #fde047;
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.kids-clue-icon {
  font-size: 2.4rem;
}

.kids-clue-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: #713f12;
}

/* Feedback & Toast */
.kids-toast-feedback {
  margin-top: 1.25rem;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  display: none;
}

.kids-toast-feedback.good {
  display: block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.kids-toast-feedback.bad {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
