/**
 * BookNoy – Design Tokens & Theme (Jungle Treasure / Tamagotchi UI)
 * ----------------------------------------------------------------
 * PALETTE
 *   Brand:  brand-gold #F6D34A, brand-goldDeep #D9A11D, brand-lime #8DEB3B,
 *           brand-green #2FBF4A, brand-forest #0B5B2B, brand-night #05351A
 *   UI:     ui-cream #FFF7E6, ui-card #F4F0E6, ui-border #E6D7B8, ui-ink #0F172A
 *   Wood:   wood-light #D1A06A, wood-mid #A56A3A, wood-dark #6A3E22
 * GRADIENTS
 *   brand-gradient: 90deg #F6D34A → #8DEB3B (55%) → #2FBF4A
 *   gold-cta:       180deg #F6D34A → #D9A11D
 *   jungle-wash:     radial top rgba(141,235,59,0.18) → transparent 55%
 */

:root {
  /* Brand */
  --bn-gold: #F6D34A;
  --bn-goldDeep: #D9A11D;
  --bn-lime: #8DEB3B;
  --bn-green: #2FBF4A;
  --bn-forest: #0B5B2B;
  --bn-night: #05351A;
  /* UI */
  --bn-cream: #FFF7E6;
  --bn-card: #F4F0E6;
  --bn-border: #E6D7B8;
  --bn-ink: #0F172A;
  /* Wood (box only) */
  --bn-wood-light: #D1A06A;
  --bn-wood-mid: #A56A3A;
  --bn-wood-dark: #6A3E22;
}

/* Page background: cream + jungle glow */
.bn-page {
  background-color: var(--bn-cream);
  background-image: radial-gradient(circle at 50% 0%, rgba(141, 235, 59, 0.18), transparent 55%);
  min-height: 100vh;
}

/* Cards */
.bn-card {
  background-color: var(--bn-card);
  border: 1px solid var(--bn-border);
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(11, 91, 43, 0.06);
  padding: 1rem 1.25rem;
}
@media (min-width: 640px) {
  .bn-card { padding: 1.25rem 1.5rem; }
}

/* Primary CTA – gold gradient */
.bn-btn-primary {
  background: linear-gradient(180deg, #F6D34A 0%, #D9A11D 100%);
  color: var(--bn-night);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: 2px solid var(--bn-forest);
  box-shadow: 0 4px 12px rgba(11, 91, 43, 0.2);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.bn-btn-primary:hover {
  box-shadow: 0 6px 16px rgba(11, 91, 43, 0.25);
}
.bn-btn-primary:active {
  transform: scale(0.98);
}
.bn-btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(141, 235, 59, 0.5);
}

/* Secondary button */
.bn-btn-secondary {
  background-color: var(--bn-card);
  color: var(--bn-forest);
  border: 2px solid var(--bn-forest);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: background-color 0.2s, transform 0.15s;
}
.bn-btn-secondary:hover {
  background-color: rgba(141, 235, 59, 0.15);
}
.bn-btn-secondary:active {
  transform: scale(0.98);
}

/* Chips / small labels */
.bn-chip {
  background-color: rgba(47, 191, 74, 0.15);
  color: var(--bn-forest);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(47, 191, 74, 0.4);
}

/* Badge (stage, etc.) */
.bn-badge {
  background: linear-gradient(90deg, var(--bn-gold) 0%, var(--bn-lime) 100%);
  color: var(--bn-night);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--bn-forest);
}

/* Inputs – forest border, lime focus glow */
.bn-input {
  width: 100%;
  border: 2px solid var(--bn-border);
  background-color: var(--bn-cream);
  color: var(--bn-ink);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bn-input::placeholder {
  color: #64748b;
}
.bn-input:focus,
.bn-input:focus-visible {
  outline: none;
  border-color: var(--bn-forest);
  box-shadow: 0 0 0 3px rgba(141, 235, 59, 0.35);
}

/* Modal base */
.bn-modal {
  background-color: var(--bn-card);
  border: 3px solid var(--bn-wood-mid);
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(5, 53, 26, 0.35);
  overflow: hidden;
}

/* Wooden box header */
.bn-modal-box-header {
  background: linear-gradient(180deg, var(--bn-wood-dark) 0%, var(--bn-wood-mid) 100%);
  color: var(--bn-cream);
  padding: 1rem 1.25rem;
  border-bottom: 3px solid var(--bn-wood-dark);
}

/* Hero gradient text / underline */
.bn-hero-gradient {
  background: linear-gradient(90deg, #F6D34A 0%, #8DEB3B 55%, #2FBF4A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bn-hero-underline {
  background: linear-gradient(90deg, #F6D34A 0%, #8DEB3B 55%, #2FBF4A 100%);
  height: 4px;
  border-radius: 2px;
  margin-top: 0.25rem;
}

/* Progress bar – green */
.bn-progress-track {
  background-color: rgba(11, 91, 43, 0.15);
  border-radius: 9999px;
  overflow: hidden;
  height: 0.5rem;
}
.bn-progress-fill {
  background-color: var(--bn-green);
  border-radius: 9999px;
  height: 100%;
  transition: width 0.5s ease;
}

/* Mood dot – lime pulse */
.bn-mood-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--bn-lime);
  box-shadow: 0 0 0 2px rgba(141, 235, 59, 0.4);
  animation: bn-pulse 2s ease-in-out infinite;
}
@keyframes bn-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* Info / warning card (not harsh red) */
.bn-info-card {
  background-color: rgba(47, 191, 74, 0.08);
  border: 1px solid rgba(47, 191, 74, 0.3);
  border-radius: 0.75rem;
  padding: 1rem;
  color: var(--bn-ink);
  font-size: 0.875rem;
}

/* Scroll-style lesson panel */
.bn-scroll-card {
  background-color: var(--bn-card);
  border: 2px solid var(--bn-border);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Tile in box – cream face, lime hover */
.bn-tile {
  background-color: var(--bn-cream);
  border: 2px solid var(--bn-border);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.bn-tile:hover {
  border-color: var(--bn-lime);
  box-shadow: 0 0 0 3px rgba(141, 235, 59, 0.3);
}
.bn-tile:active {
  transform: scale(0.97);
}
.bn-tile:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(141, 235, 59, 0.4);
}
.bn-tile-completed {
  opacity: 0.7;
  background-color: rgba(47, 191, 74, 0.08);
  border-color: rgba(47, 191, 74, 0.4);
}
.bn-tile-recommended {
  box-shadow: 0 0 0 3px rgba(141, 235, 59, 0.5);
  animation: bn-glow-ring 1.5s ease-in-out infinite;
}
@keyframes bn-glow-ring {
  0%, 100% { box-shadow: 0 0 0 3px rgba(141, 235, 59, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(141, 235, 59, 0.25); }
}

/* Receipt-style history row */
.bn-receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bn-border);
  font-size: 0.875rem;
  color: var(--bn-ink);
}
.bn-receipt-row:last-child {
  border-bottom: none;
}

/* Status pill (Tamagotchi top-right) */
.bn-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bn-card);
  border: 2px solid var(--bn-border);
  border-radius: 9999px;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bn-forest);
}

/* Link that uses brand green */
.bn-link {
  color: var(--bn-forest);
  font-weight: 500;
}
.bn-link:hover {
  text-decoration: underline;
}

/* Wood border + soft shadow (tiles, modal) */
.bn-wood-border {
  border: 2px solid var(--bn-wood-mid);
  box-shadow: 0 4px 12px rgba(106, 62, 34, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.bn-tile-wood {
  background-color: var(--bn-cream);
  border: 2px solid var(--bn-wood-mid);
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(106, 62, 34, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.bn-tile-wood:hover:not(:disabled):not(.bn-tile-completed):not(.bn-tile-pending) {
  border-color: var(--bn-lime);
  box-shadow: 0 0 0 3px rgba(141, 235, 59, 0.35), 0 4px 12px rgba(106, 62, 34, 0.15);
  transform: translateY(-2px);
}
.bn-tile-wood:active:not(:disabled):not(.bn-tile-completed):not(.bn-tile-pending) {
  transform: translateY(0) scale(0.98);
}
.bn-tile-wood:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(141, 235, 59, 0.5);
}
/* Lime glow ring (focus / recommended) */
.bn-glow-ring {
  box-shadow: 0 0 0 3px rgba(141, 235, 59, 0.4);
}
.bn-glow-ring:hover {
  box-shadow: 0 0 0 4px rgba(141, 235, 59, 0.35), 0 4px 12px rgba(11, 91, 43, 0.1);
}
