/* ZoeBIBLE — Sacred Editorial & Deliberate Mastery Styles */
:root {
  --zoe-bg: #faf8f5;
  --zoe-surface: #ffffff;
  --zoe-surface-soft: #f4f1ea;
  --zoe-surface-high: #ebe6dc;
  --zoe-text: #1e293b;
  --zoe-text-muted: #526071;
  --zoe-gold: #d97706;
  --zoe-gold-light: #fef3c7;
  --zoe-emerald: #059669;
  --zoe-emerald-light: #d1fae5;
  --zoe-indigo: #1e293b;
  --zoe-crimson: #dc2626;
  --zoe-border: rgba(30, 41, 59, 0.09);
}

html.dark {
  --zoe-bg: #0f172a;
  --zoe-surface: #1e293b;
  --zoe-surface-soft: #162032;
  --zoe-surface-high: #283548;
  --zoe-text: #f1f5f9;
  --zoe-text-muted: #94a3b8;
  --zoe-gold: #f59e0b;
  --zoe-gold-light: rgba(245, 158, 11, 0.18);
  --zoe-emerald: #10b981;
  --zoe-emerald-light: rgba(16, 185, 129, 0.18);
  --zoe-indigo: #38bdf8;
  --zoe-border: rgba(255, 255, 255, 0.1);
}

html.dark body {
  background-color: var(--zoe-bg) !important;
  color: var(--zoe-text) !important;
}

html.dark header {
  background-color: rgba(15, 23, 42, 0.9) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html.dark .bg-surface {
  background-color: var(--zoe-bg) !important;
}

html.dark .bg-surface-container-lowest {
  background-color: var(--zoe-surface) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .bg-surface-container-low {
  background-color: var(--zoe-surface-soft) !important;
}

html.dark .bg-surface-container,
html.dark .bg-surface-container-high {
  background-color: var(--zoe-surface-high) !important;
}

html.dark .text-on-surface {
  color: var(--zoe-text) !important;
}

html.dark .text-on-surface-variant {
  color: var(--zoe-text-muted) !important;
}

/* Smooth view transitions */
.view-section {
  animation: fadeSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Duolingo-Plus Tactile Word Tiles */
.word-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.95rem;
  border-radius: 0.65rem;
  background: var(--zoe-surface);
  border: 1.5px solid #dcd3c6;
  border-bottom-width: 4px;
  color: var(--zoe-text);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

html.dark .word-tile {
  border-color: #334155;
  background: #1e293b;
}

.word-tile:hover:not(:disabled):not(.tile-used) {
  transform: translateY(-2px);
  border-color: #d97706;
  background-color: #fffbeb;
}

html.dark .word-tile:hover:not(:disabled):not(.tile-used) {
  background-color: #283548;
  border-color: #f59e0b;
}

.word-tile:active:not(:disabled):not(.tile-used) {
  transform: translateY(1px);
  border-bottom-width: 2px;
}

.word-tile.tile-used {
  opacity: 0.32;
  border-style: dashed;
  border-bottom-width: 1.5px;
  pointer-events: none;
  transform: none;
}

.word-tile.tile-correct {
  background-color: #ecfdf5 !important;
  border-color: #059669 !important;
  color: #065f46 !important;
  animation: pulseSuccess 0.35s ease;
}

html.dark .word-tile.tile-correct {
  background-color: rgba(16, 185, 129, 0.2) !important;
  color: #6ee7b7 !important;
}

.word-tile.tile-wrong {
  background-color: #fef2f2 !important;
  border-color: #dc2626 !important;
  color: #991b1b !important;
  animation: shakeError 0.38s ease;
}

@keyframes pulseSuccess {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

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

/* Mastery Tree Node Styling */
.mastery-node {
  position: relative;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.mastery-node:hover {
  transform: translateY(-3px) scale(1.03);
}

.mastery-node-active {
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.22), 0 10px 25px -5px rgba(217, 119, 6, 0.25);
}

/* Verse Highlight Colors in Bible Reader */
.verse-item {
  transition: background-color 0.18s ease, border-left-color 0.18s ease;
  border-left: 3px solid transparent;
}

.verse-item:hover {
  background-color: rgba(217, 119, 6, 0.06);
}

.verse-item.verse-selected {
  background-color: rgba(217, 119, 6, 0.11);
  border-left-color: #d97706;
}

.hl-gold { background-color: rgba(251, 191, 36, 0.24) !important; border-left-color: #d97706 !important; }
.hl-emerald { background-color: rgba(16, 185, 129, 0.20) !important; border-left-color: #059669 !important; }
.hl-sky { background-color: rgba(56, 189, 248, 0.20) !important; border-left-color: #0284c7 !important; }
.hl-rose { background-color: rgba(244, 63, 94, 0.18) !important; border-left-color: #e11d48 !important; }

/* Custom subtle scrollbars for internal panels */
.custom-scroll::-webkit-scrollbar {
  display: block;
  width: 6px;
  height: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

/* First-letter memorization token */
.first-letter-word {
  display: inline-flex;
  align-items: baseline;
  margin: 0.25rem 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: 0.45rem;
  font-family: 'Merriweather', serif;
  transition: all 0.18s ease;
}

.first-letter-word.active-target {
  background-color: #fef3c7;
  box-shadow: 0 0 0 2px #d97706;
  color: #92400e;
  transform: scale(1.05);
}

html.dark .first-letter-word.active-target {
  background-color: rgba(245, 158, 11, 0.25);
  color: #fde68a;
}

.first-letter-word.solved-word {
  background-color: rgba(16, 185, 129, 0.14);
  color: #065f46;
  font-weight: 600;
}

html.dark .first-letter-word.solved-word {
  color: #6ee7b7;
}
