/* ============================================================
 * FOLK ART BACKGROUND — GIẤY DÓ MỘC HOA VĂN IN CHÌM NHÃ NHẶN
 * Nền giấy Dó ngà thanh lịch, họa tiết hoa sen & sóng nước dân gian in chìm
 * Kèm hệ thống chữ Mực Nho (Ink) sắc nét, chuẩn tương phản cao trên nền sáng
 * ============================================================ */

:root {
  /* Ghi đè biến hệ thống sang tone Mực Nho & Nền Giấy Dó */
  --ink: #2A2421 !important;
  --muted: #5C544E !important;
  --panel: rgba(255, 254, 250, 0.94) !important;
  --panel-border: rgba(42, 36, 33, 0.14) !important;

  /* Bảng màu Giấy Dó & Mực Nho Nhã Nhặn */
  --folk-bg: #F7F3E9;
  --folk-bg-light: #FBF8F1;
  --folk-bg-warm: #F4EFE4;
  --folk-bg-deep: #EBE4D5;
  
  --folk-panel: rgba(255, 254, 250, 0.95);
  --folk-panel-border: rgba(42, 36, 33, 0.14);
  --folk-ink: #2A2421;
  --folk-ink-strong: #1A1412;
  --folk-muted: #5C544E;
  
  --folk-accent-cinnabar: #872E27; /* Son trầm mộc mạc */
  --folk-accent-gold: #B88928;     /* Vàng hoa hòe thanh nhã */

  /* 1. Họa tiết Dân Gian in chìm (Hoa sen, sóng thủy ba & hồi văn mây cuộn) */
  --folk-watermark-pattern: url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%235A4838' stroke-width='1.15' stroke-linecap='round' stroke-linejoin='round' opacity='0.06'%3E%3Cpath d='M80,38 C68,56 54,70 80,94 C106,70 92,56 80,38 Z'/%3E%3Cpath d='M80,94 C60,82 46,70 58,52 C70,64 76,82 80,94 Z'/%3E%3Cpath d='M80,94 C100,82 114,70 102,52 C90,64 84,82 80,94 Z'/%3E%3Cpath d='M80,94 Q82,112 80,130'/%3E%3Cpath d='M0,150 Q20,134 40,150 Q60,134 80,150 Q100,134 120,150 Q140,134 160,150'/%3E%3Cpath d='M-20,156 Q0,140 20,156 Q40,140 60,156 Q80,140 100,156 Q120,140 140,156 Q160,140 180,156'/%3E%3Cpath d='M10,18 C16,12 24,14 26,20 C28,26 22,30 16,26'/%3E%3Cpath d='M150,18 C144,12 136,14 134,20 C132,26 138,30 144,26'/%3E%3C/g%3E%3C/svg%3E");

  /* 2. Vân xơ giấy Dó tự nhiên mờ mịn */
  --paper-grain-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='1 0 0 0 0  0 0.96 0 0 0  0 0 0.88 0 0  0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================================
 * 1. MÀU NỀN BODY NHÃ NHẶN & HỌA TIẾT IN CHÌM
 * ============================================================ */
body {
  font-family: 'Lexend', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--folk-ink) !important;
  background-color: var(--folk-bg) !important;
  background-image: 
    var(--folk-watermark-pattern),
    var(--paper-grain-noise),
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.45) 0%, transparent 75%),
    linear-gradient(180deg, var(--folk-bg-light) 0%, var(--folk-bg-warm) 50%, var(--folk-bg-deep) 100%) !important;
  background-size: 160px 160px, 200px 200px, 100% 100%, 100% 100% !important;
  background-repeat: repeat, repeat, no-repeat, no-repeat !important;
  background-blend-mode: normal, multiply, normal, normal !important;
  background-attachment: fixed !important;
  min-height: 100vh;
}

/* ============================================================
 * 1.5. BUNG RỘNG MÀN HÌNH ĐỠ TRỐNG (RESPONSIVE WIDESCREEN CONTAINER)
 * ============================================================ */
.container,
.container:has(> #dashboard-screen),
.container:has(> #mode-screen),
.container:has(> #quiz-screen),
.container:has(> #sentence-completion-screen),
.container:has(> #flashcard-screen),
.container:has(> #boss-screen),
.container:has(> #results-screen) {
  width: min(1380px, 96vw) !important;
  max-width: 1440px !important;
  margin: 18px auto 36px !important;
}

/* ============================================================
 * 2. CÁC PANEL & KHUNG CHÍNH (ELEGANT PARCHMENT PANELS)
 * ============================================================ */
.glass-panel {
  background: var(--folk-panel) !important;
  padding: 32px 38px !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1.5px solid var(--folk-panel-border) !important;
  box-shadow: 0 16px 36px rgba(42, 36, 33, 0.07), 0 3px 0 rgba(42, 36, 33, 0.08) !important;
  color: var(--folk-ink) !important;
  border-radius: var(--radius);
  position: relative;
}

/* Chỉ viền son/vàng mờ thanh nhã trên đỉnh panel */
.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(184, 137, 40, 0.4) 50%, 
    transparent 100%);
  pointer-events: none;
}

/* Tiêu đề chính sắc nét, trang nhã */
.game-header h1 {
  background: linear-gradient(135deg, #1A1412 0%, #68352F 60%, #872E27 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--folk-muted) !important;
}

/* Khối thống kê tổng quan */
.global-stats {
  background: rgba(240, 233, 220, 0.65) !important;
  border: 1px solid rgba(42, 36, 33, 0.12) !important;
  border-radius: 16px;
}

.stat-val {
  color: var(--folk-ink-strong) !important;
  text-shadow: none !important;
  font-weight: 800 !important;
}

.stat-label {
  color: var(--folk-muted) !important;
}

/* Thanh điều hướng Header Actions */
.game-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.home-link {
  background: rgba(42, 36, 33, 0.04) !important;
  border: 1px solid rgba(42, 36, 33, 0.15) !important;
  color: var(--folk-ink) !important;
}

.home-link:hover {
  background: var(--folk-ink) !important;
  color: #FFF !important;
}

/* ============================================================
 * 3. THẺ CHỦ ĐỀ & EXTRA MATERIALS
 * ============================================================ */
.topics-heading {
  color: var(--folk-ink-strong) !important;
}

.topics-side {
  background: rgba(244, 238, 226, 0.55) !important;
  border: 1px solid rgba(42, 36, 33, 0.12) !important;
}

.topic-card {
  background: #FFFDF9 !important;
  border: 1.5px solid rgba(42, 36, 33, 0.12) !important;
  box-shadow: 0 4px 12px rgba(42, 36, 33, 0.04) !important;
}

.topic-card:hover:not(.locked) {
  border-color: rgba(135, 46, 39, 0.45) !important;
  box-shadow: 0 10px 22px rgba(42, 36, 33, 0.08) !important;
  background: #FFFAF0 !important;
}

.topic-title {
  color: var(--folk-ink-strong) !important;
  font-weight: 750 !important;
}

.topic-meta {
  color: var(--folk-muted) !important;
}

.stage-card-score {
  color: var(--folk-muted) !important;
}

/* ============================================================
 * 4. CHẾ ĐỘ CHƠI (MODE SELECTION) & NÚT QUAY LẠI
 * ============================================================ */
#mode-screen h2 {
  color: var(--folk-ink-strong) !important;
}

.mode-card {
  background: #FFFDF9 !important;
  border: 1.5px solid rgba(42, 36, 33, 0.12) !important;
  box-shadow: 0 4px 12px rgba(42, 36, 33, 0.04) !important;
}

.mode-card:hover {
  border-color: rgba(135, 46, 39, 0.45) !important;
  box-shadow: 0 10px 22px rgba(42, 36, 33, 0.08) !important;
  background: #FFFAF0 !important;
}

.mode-card-title {
  color: var(--folk-ink-strong) !important;
  font-weight: 750 !important;
}

.mode-card-desc {
  color: var(--folk-muted) !important;
}

.btn-back,
.btn-nav-card {
  background: rgba(42, 36, 33, 0.05) !important;
  border: 1px solid rgba(42, 36, 33, 0.18) !important;
  color: var(--folk-ink-strong) !important;
  font-weight: 600 !important;
}

.btn-back:hover,
.btn-nav-card:hover {
  background: var(--folk-ink) !important;
  color: #FFF !important;
}

/* ============================================================
 * 5. FLASHCARDS SCREEN
 * ============================================================ */
.game-play-header .game-title-text {
  color: var(--folk-ink-strong) !important;
  font-weight: 800 !important;
}

.card-progress-text {
  color: var(--folk-muted) !important;
  font-weight: 600 !important;
}

.card-filter-btn {
  background: #FFFDF9 !important;
  border: 1px solid rgba(42, 36, 33, 0.16) !important;
  color: var(--folk-muted) !important;
}

.card-filter-btn:hover:not(:disabled) {
  background: #FFFAF0 !important;
  color: var(--folk-ink-strong) !important;
  border-color: rgba(42, 36, 33, 0.3) !important;
}

.card-front,
.card-back {
  background: #FFFDF9 !important;
  border: 1.5px solid rgba(42, 36, 33, 0.16) !important;
  color: var(--folk-ink) !important;
  box-shadow: 0 14px 32px rgba(42, 36, 33, 0.08) !important;
}

.word-term {
  color: #872E27 !important;
  font-weight: 800 !important;
}

.word-type {
  color: var(--folk-muted) !important;
}

.word-ipa {
  color: var(--folk-muted) !important;
}

.word-meaning {
  color: #872E27 !important;
  font-weight: 800 !important;
}

.example-container {
  background: rgba(244, 238, 226, 0.6) !important;
  border: 1px solid rgba(42, 36, 33, 0.12) !important;
}

.example-title {
  color: #872E27 !important;
  font-weight: 700 !important;
}

.example-en {
  color: var(--folk-ink-strong) !important;
}

.example-vi {
  color: var(--folk-muted) !important;
}

.card-hint {
  color: var(--folk-muted) !important;
}

.srs-hint {
  color: var(--folk-muted) !important;
}

.btn-speak {
  background: rgba(42, 36, 33, 0.05) !important;
  border: 1px solid rgba(42, 36, 33, 0.16) !important;
  color: var(--folk-ink-strong) !important;
}

.btn-speak:hover {
  background: #FFFAF0 !important;
  border-color: #872E27 !important;
}

.btn-srs-review {
  background: #FFF3F0 !important;
  border: 1.5px solid rgba(135, 46, 39, 0.3) !important;
  color: #872E27 !important;
}

.btn-srs-mastered {
  background: #EDF7EE !important;
  border: 1.5px solid rgba(19, 115, 51, 0.3) !important;
  color: #137333 !important;
}

/* ============================================================
 * 6. MULTIPLE CHOICE QUIZ & SENTENCE COMPLETION (CỰC KỲ RÕ NÉT)
 * ============================================================ */
/* Khung câu hỏi nổi bật */
.quiz-question-box {
  background: rgba(244, 238, 226, 0.65) !important;
  border: 1.5px solid rgba(42, 36, 33, 0.14) !important;
  box-shadow: 0 4px 14px rgba(42, 36, 33, 0.04) !important;
  color: var(--folk-ink) !important;
}

/* Từ vựng câu hỏi nổi bật màu son gốm đậm */
.quiz-question-word {
  color: #7A2822 !important;
  font-weight: 850 !important;
  text-shadow: 0 1px 2px rgba(122, 40, 34, 0.1) !important;
}

.quiz-question-ipa {
  color: var(--folk-muted) !important;
  font-weight: 600 !important;
}

.quiz-question-hint {
  color: #6E655E !important;
}

/* Các nút lựa chọn đáp án: nền sáng mộc, viền rõ, chữ Mực Nho đậm */
.quiz-option-btn {
  background: #FFFDF9 !important;
  border: 1.5px solid rgba(42, 36, 33, 0.18) !important;
  color: var(--folk-ink-strong) !important;
  font-weight: 600 !important;
  box-shadow: 0 3px 10px rgba(42, 36, 33, 0.04) !important;
}

.quiz-option-btn:hover:not(.locked) {
  background: #FFF8EB !important;
  border-color: #872E27 !important;
  color: var(--folk-ink-strong) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(42, 36, 33, 0.08) !important;
}

.quiz-option-btn.correct {
  background: #E8F5E9 !important;
  border-color: #1B5E20 !important;
  color: #1B5E20 !important;
  font-weight: 750 !important;
  box-shadow: 0 4px 12px rgba(27, 94, 32, 0.15) !important;
}

.quiz-option-btn.correct::after {
  color: #1B5E20 !important;
}

.quiz-option-btn.wrong {
  background: #FFEBEE !important;
  border-color: #B71C1C !important;
  color: #B71C1C !important;
  font-weight: 750 !important;
  box-shadow: 0 4px 12px rgba(183, 28, 28, 0.15) !important;
}

.quiz-option-btn.wrong::after {
  color: #B71C1C !important;
}

/* Giải thích & Dịch nghĩa */
.game-explanation {
  background: rgba(244, 238, 226, 0.75) !important;
  border-left: 4px solid #872E27 !important;
  border-top: 1px solid rgba(42, 36, 33, 0.1) !important;
  border-right: 1px solid rgba(42, 36, 33, 0.1) !important;
  border-bottom: 1px solid rgba(42, 36, 33, 0.1) !important;
  color: var(--folk-ink) !important;
}

.game-explanation-title {
  color: #872E27 !important;
  font-weight: 800 !important;
}

.game-explanation-content {
  color: var(--folk-ink-strong) !important;
  line-height: 1.6 !important;
}

/* Nút Next chuyển câu */
.btn-game-next {
  background: #872E27 !important;
  color: #FFF !important;
  box-shadow: 0 4px 14px rgba(135, 46, 39, 0.3) !important;
}

.btn-game-next:hover {
  background: #68231E !important;
}

/* Sentence Completion */
.sentence-question-text {
  color: var(--folk-ink-strong) !important;
  font-weight: 600 !important;
  font-size: 1.2rem !important;
}

.instruction-banner {
  background: rgba(244, 235, 215, 0.75) !important;
  border-left: 4px solid #B88928 !important;
  border: 1px solid rgba(184, 137, 40, 0.25) !important;
  border-left-width: 4px !important;
  color: #614611 !important;
  font-weight: 500 !important;
}

/* ============================================================
 * 7. SPELLING, MATCHING & BOSS BATTLE
 * ============================================================ */
.spelling-box {
  background: rgba(244, 238, 226, 0.6) !important;
  border: 1.5px solid rgba(42, 36, 33, 0.12) !important;
}

.spelling-meaning {
  color: #872E27 !important;
  font-weight: 800 !important;
}

.spelling-ipa {
  color: var(--folk-muted) !important;
}

.spelling-example-fill {
  background: #FFFDF9 !important;
  border: 1px dashed rgba(42, 36, 33, 0.2) !important;
  color: var(--folk-ink-strong) !important;
}

.spelling-input {
  background: #FFFDF9 !important;
  border: 2px solid rgba(42, 36, 33, 0.25) !important;
  color: var(--folk-ink-strong) !important;
}

.matching-timer-row {
  background: rgba(244, 238, 226, 0.65) !important;
  border: 1px solid rgba(42, 36, 33, 0.12) !important;
  color: var(--folk-ink-strong) !important;
}

.matching-card {
  background: #FFFDF9 !important;
  border: 1.5px solid rgba(42, 36, 33, 0.15) !important;
  color: var(--folk-ink-strong) !important;
}

.matching-card:hover:not(.matched):not(.selected) {
  background: #FFF8EB !important;
  border-color: #872E27 !important;
}

.matching-card.selected {
  background: #FFF0EB !important;
  border-color: #872E27 !important;
  color: #872E27 !important;
}

.matching-card.matched {
  background: rgba(42, 36, 33, 0.05) !important;
  border-color: rgba(42, 36, 33, 0.15) !important;
  color: rgba(42, 36, 33, 0.35) !important;
}

/* ============================================================
 * 8. BOSS BATTLE & PATROL MODE (MỰC NHO ĐẬM NÉT TRÊN NỀN SÁNG)
 * ============================================================ */
.boss-header-title {
  color: var(--folk-ink-strong) !important;
  font-weight: 800 !important;
}

.btn-boss-icon {
  background: #FFFDF9 !important;
  border: 1.5px solid rgba(42, 36, 33, 0.16) !important;
  color: var(--folk-ink-strong) !important;
  box-shadow: 0 2px 6px rgba(42, 36, 33, 0.05) !important;
}

.btn-boss-icon:hover {
  background: #FFFAF0 !important;
  border-color: #872E27 !important;
}

/* Thanh thông số trận đánh */
.boss-question-head {
  color: var(--folk-ink-strong) !important;
  font-weight: 700 !important;
}

.boss-seal {
  color: var(--folk-muted) !important;
  font-weight: 700 !important;
}

/* Từ vựng câu hỏi Boss / Đi tuần tra (Word Prompt) */
.boss-q-main {
  color: #7A2822 !important; /* Son trầm đậm nổi bật tuyệt đối */
  font-weight: 850 !important;
  text-shadow: 0 1px 2px rgba(122, 40, 34, 0.08) !important;
}

.boss-q-main.is-meaning {
  color: #7A2822 !important;
  font-weight: 850 !important;
}

.boss-q-main.is-sentence {
  color: var(--folk-ink-strong) !important;
  font-weight: 600 !important;
}

.boss-q-sub {
  color: var(--folk-muted) !important;
  font-weight: 600 !important;
}

/* Nhãn chiêu thức Attack Label */
.boss-attack-label.tier-0 {
  color: #1E40AF !important;
  background: rgba(30, 64, 175, 0.1) !important;
  border-color: rgba(30, 64, 175, 0.35) !important;
  font-weight: 750 !important;
}

.boss-attack-label.tier-1 {
  color: #6B21A8 !important;
  background: rgba(107, 33, 168, 0.1) !important;
  border-color: rgba(107, 33, 168, 0.35) !important;
  font-weight: 750 !important;
}

.boss-attack-label.tier-2 {
  color: #92400E !important;
  background: rgba(146, 64, 14, 0.1) !important;
  border-color: rgba(146, 64, 14, 0.35) !important;
  font-weight: 750 !important;
}

/* Ô nhập phép chính tả trong trận Boss (Spell Input) */
.boss-spell .spelling-input {
  background: #FFFDF9 !important;
  border: 2px solid rgba(42, 36, 33, 0.25) !important;
  color: var(--folk-ink-strong) !important;
  box-shadow: 0 4px 12px rgba(42, 36, 33, 0.05) !important;
}

.boss-spell .spelling-input:focus {
  border-color: #872E27 !important;
  box-shadow: 0 0 15px rgba(135, 46, 39, 0.2) !important;
}

.boss-hint-pattern {
  color: #872E27 !important;
  font-weight: 800 !important;
}

/* Sảnh Boss Lobby (Thống kê & Danh sách Boss) */
.boss-stat {
  background: rgba(244, 238, 226, 0.65) !important;
  border: 1.5px solid rgba(42, 36, 33, 0.12) !important;
}

.boss-stat-val {
  color: var(--folk-ink-strong) !important;
  font-weight: 800 !important;
}

.boss-stat-label {
  color: var(--folk-muted) !important;
  font-weight: 600 !important;
}

.boss-section-title {
  color: var(--folk-ink-strong) !important;
  font-weight: 800 !important;
}

.boss-rules {
  background: rgba(244, 238, 226, 0.6) !important;
  border: 1.5px solid rgba(42, 36, 33, 0.12) !important;
}

.boss-rules summary {
  color: var(--folk-ink-strong) !important;
  font-weight: 750 !important;
}

.boss-rules li {
  color: #3D3530 !important;
  line-height: 1.6 !important;
}

.boss-word-chip {
  background: #FFFDF9 !important;
  border: 1.5px solid rgba(42, 36, 33, 0.15) !important;
  box-shadow: 0 2px 8px rgba(42, 36, 33, 0.04) !important;
}

.boss-chip-word {
  color: var(--folk-ink-strong) !important;
  font-weight: 800 !important;
}

.boss-chip-meta {
  color: var(--folk-muted) !important;
  font-weight: 600 !important;
}

.boss-empty {
  color: var(--folk-muted) !important;
  border: 1.5px dashed rgba(42, 36, 33, 0.22) !important;
  background: rgba(244, 238, 226, 0.4) !important;
}

.btn-boss-patrol {
  background: #FFFDF9 !important;
  border: 1.5px solid rgba(42, 36, 33, 0.2) !important;
  color: var(--folk-ink-strong) !important;
  font-weight: 750 !important;
  box-shadow: 0 4px 12px rgba(42, 36, 33, 0.04) !important;
}

.btn-boss-patrol:hover {
  background: #FFFAF0 !important;
  border-color: #872E27 !important;
  color: #872E27 !important;
}

/* Kết quả Boss Battle */
.boss-result-title {
  color: var(--folk-ink-strong) !important;
  font-weight: 800 !important;
}

.boss-result-row {
  background: #FFFDF9 !important;
  border: 1.5px solid rgba(42, 36, 33, 0.14) !important;
}

.boss-result-word {
  color: var(--folk-ink-strong) !important;
  font-weight: 750 !important;
}

/* Results screen */
.res-stat-card {
  background: rgba(244, 238, 226, 0.65) !important;
  border: 1.5px solid rgba(42, 36, 33, 0.12) !important;
}

.res-stat-val {
  color: var(--folk-ink-strong) !important;
}

.res-stat-label {
  color: var(--folk-muted) !important;
}

.btn-res-secondary {
  background: #FFFDF9 !important;
  border: 1.5px solid rgba(42, 36, 33, 0.18) !important;
  color: var(--folk-ink-strong) !important;
}

.btn-res-secondary:hover {
  background: var(--folk-ink) !important;
  color: #FFF !important;
}

/* ============================================================
 * 9. BOSS ARENA SPLIT-SCREEN (cảnh đấu bên trái, câu hỏi bên phải)
 * ============================================================ */
@media (min-width: 960px) {
  .boss-arena-split {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }

  .boss-arena-split .boss-stage {
    position: sticky;
    top: 16px;
    aspect-ratio: 4 / 3.4;
    min-height: 0;
    max-height: calc(100vh - 140px);
    margin-bottom: 0;
  }

  .boss-arena-split .boss-hud-enemy {
    min-width: 55%;
    max-width: 66%;
  }

  .boss-question-panel .quiz-question-box {
    padding: 22px 20px !important;
    margin-bottom: 18px !important;
  }

  .boss-question-panel .quiz-options-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .boss-question-panel .quiz-option-btn {
    font-size: 1.05rem !important;
    padding: 14px 18px !important;
  }
}

/* ============================================================
 * 10. TERMINOLOGY HUB & FIELD BADGES
 * ============================================================ */
.terminology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 14px;
}

.terminology-card {
  background: rgba(255, 253, 249, 0.85) !important;
  border: 1.5px solid rgba(42, 36, 33, 0.16) !important;
  border-radius: 16px !important;
  padding: 22px 20px !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(42, 36, 33, 0.05) !important;
  position: relative;
}

.terminology-card:hover {
  transform: translateY(-4px);
  border-color: #872E27 !important;
  background: #FFFDF9 !important;
  box-shadow: 0 12px 28px rgba(135, 46, 39, 0.14) !important;
}

.terminology-card .topic-title {
  color: #1A1412 !important;
  font-weight: 800 !important;
}

.terminology-card .topic-meta {
  color: #5C544E !important;
  line-height: 1.5 !important;
}

/* Badges for Terminology fields in Mode Header */
.badge-terminology {
  background: rgba(135, 46, 39, 0.12) !important;
  color: #872E27 !important;
  border: 1px solid rgba(135, 46, 39, 0.35) !important;
}

.badge-demographicTerms {
  background: rgba(2, 132, 199, 0.12) !important;
  color: #0369a1 !important;
  border: 1px solid rgba(2, 132, 199, 0.35) !important;
}

.badge-medicineTerms {
  background: rgba(225, 29, 72, 0.12) !important;
  color: #be123c !important;
  border: 1px solid rgba(225, 29, 72, 0.35) !important;
}

.badge-economicTerms {
  background: rgba(217, 119, 6, 0.12) !important;
  color: #b45309 !important;
  border: 1px solid rgba(217, 119, 6, 0.35) !important;
}

.badge-technologyTerms {
  background: rgba(13, 148, 136, 0.12) !important;
  color: #0f766e !important;
  border: 1px solid rgba(13, 148, 136, 0.35) !important;
}
