/**
 * Stylesheet Cao Cấp cho Phân Hệ Mô Phỏng 3D Châm Cứu & 14 Đường Kinh Lạc YHCT
 * Version: 3.3.16 - Mobile-First & Unobstructed Ergonomics
 * Chuẩn màu sắc Ngũ Hành, Bottom Sheet không che thân thể, Tối ưu cảm ứng 100%
 */

.thyh-3d-wrapper {
  position: relative;
  width: 100%;
  height: 720px;
  background: radial-gradient(circle at 50% 32%, #0d262e 0%, #071720 50%, #030a0e 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.thyh-3d-canvas-container {
  width: 100%;
  height: 100%;
  outline: none;
}
.thyh-3d-canvas-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Loading Overlay */
.thyh-3d-loader {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 10, 14, 0.94);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: opacity 0.4s ease;
}
.thyh-3d-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(16, 185, 129, 0.2);
  border-top-color: #10b981;
  border-radius: 50%;
  animation: thyhSpin 0.9s infinite linear;
  margin-bottom: 14px;
}
@keyframes thyhSpin {
  to { transform: rotate(360deg); }
}
.thyh-3d-loader-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 5px;
}
.thyh-3d-loader-sub {
  font-size: 0.82rem;
  color: #94a3b8;
}

/* TOP SMART BAR */
.thyh-3d-top-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 30;
  pointer-events: none;
}
.thyh-3d-top-bar > * {
  pointer-events: auto;
}

/* Search Box */
.thyh-3d-search-box {
  position: relative;
  min-width: 220px;
  max-width: 320px;
  flex: 1;
  z-index: 60;
}
.thyh-3d-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.thyh-3d-search-icon {
  position: absolute;
  left: 10px;
  font-size: 0.88rem;
  color: #94a3b8;
  pointer-events: none;
}
.thyh-3d-search-input {
  width: 100%;
  background: rgba(13, 38, 46, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 7px 32px 7px 32px;
  color: #ffffff;
  font-size: 0.82rem;
  outline: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
}
.thyh-3d-search-input:focus {
  border-color: #10b981;
  background: rgba(13, 38, 46, 0.98);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45);
}
.thyh-3d-search-clear {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
}
.thyh-3d-search-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: rgba(11, 30, 36, 0.98);
  backdrop-filter: blur(16px);
  border: 1.5px solid #10b981;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
  max-height: 280px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}
.thyh-3d-search-dropdown.open {
  display: block;
}
.thyh-3d-search-item {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  color: #f8fafc;
}
.thyh-3d-search-item:hover {
  background: rgba(16, 185, 129, 0.22);
}

/* Header Action Pills */
.thyh-3d-header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding: 2px;
}
.thyh-3d-action-pill {
  background: rgba(13, 38, 46, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  transition: all 0.2s;
}
.thyh-3d-action-pill:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
}
.thyh-3d-action-pill.highlight {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border-color: #6ee7b7;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}
.thyh-3d-action-pill.highlight.active {
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.85);
}
.thyh-3d-action-pill.clock.active {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
  border-color: #fde047;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.55);
}
.thyh-3d-action-pill.extra.active {
  background: rgba(251, 191, 36, 0.2);
  border-color: #fbbf24;
  color: #fbbf24;
}
.thyh-3d-action-pill.tour.active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border-color: #d8b4fe;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
}

/* Camera Presets */
.thyh-3d-camera-presets {
  display: flex;
  background: rgba(13, 38, 46, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 3px;
  gap: 2px;
}
.thyh-3d-cam-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
}
.thyh-3d-cam-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Floating Controls Dock */
.thyh-3d-controls-dock {
  position: absolute;
  top: 70px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(13, 38, 46, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 5px;
  z-index: 25;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.thyh-3d-btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.thyh-3d-btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
.thyh-3d-btn-icon.active {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #34d399;
}

/* ==============================================================================
   BOTTOM SHEET ARCHITECTURE (Chuẩn Công Thái Học Di Động & Desktop)
   Không che chắn tầm nhìn thân thể 3D, thao tác mượt mà
   ============================================================================== */
.thyh-3d-bottom-sheet {
  position: absolute;
  bottom: -600px;
  left: 12px;
  right: 12px;
  max-height: 48vh;
  min-height: 200px;
  background: rgba(9, 24, 30, 0.97);
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.7);
  transition: bottom 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.thyh-3d-bottom-sheet.open {
  bottom: 0;
}
.thyh-3d-sheet-handle-bar {
  display: flex;
  justify-content: center;
  padding: 8px 0 3px;
  cursor: grab;
}
.thyh-3d-sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
}
.thyh-3d-sheet-header {
  padding: 6px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.thyh-3d-sheet-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.thyh-3d-sheet-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.thyh-3d-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px 16px;
  -webkit-overflow-scrolling: touch;
}

/* Nội dung Phối Huyệt trong Bottom Sheet */
.thyh-3d-combo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}
.thyh-3d-combo-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.thyh-3d-combo-card:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: #34d399;
}
.thyh-3d-combo-card-cat {
  font-size: 0.7rem;
  color: #34d399;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}
.thyh-3d-combo-card-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 4px;
}
.thyh-3d-combo-card-points {
  font-size: 0.76rem;
  color: #94a3b8;
}
.thyh-3d-combo-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}
.thyh-3d-combo-point-chip {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #6ee7b7;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
}
.thyh-3d-combo-point-chip:hover {
  background: #10b981;
  color: #ffffff;
}
.thyh-3d-combo-back-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}

/* Nội dung Tý Ngọ Lưu Chú trong Bottom Sheet */
.thyh-3d-clock-now-btn,
.thyh-3d-clock-play-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.thyh-3d-clock-play-btn.active {
  background: #f59e0b;
  color: #ffffff;
  border-color: #fde047;
}
.thyh-3d-clock-hours-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.thyh-3d-clock-hour-btn {
  flex: 1;
  min-width: 72px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 5px 3px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.thyh-3d-clock-hour-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}
.thyh-3d-clock-hour-btn.active {
  background: linear-gradient(180deg, #b45309 0%, #f59e0b 100%);
  border-color: #fde047;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
.thyh-3d-clock-hour-branch {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
}
.thyh-3d-clock-hour-time {
  font-size: 0.65rem;
  color: #cbd5e1;
}
.thyh-3d-clock-hour-organ {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fde047;
}
.thyh-3d-clock-info-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
}

/* Thẻ Huyệt Vị trong Bottom Sheet */
.thyh-3d-card-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.thyh-3d-card-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}
.thyh-3d-card-hanzi {
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
  margin-left: 4px;
}
.thyh-3d-card-code {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}
.thyh-3d-card-voice-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
}
.thyh-3d-card-badge-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.thyh-3d-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}
.thyh-3d-card-badge.element {
  color: #fde047;
  border-color: rgba(253, 224, 71, 0.3);
}
.thyh-3d-card-badge.role {
  color: #67e8f9;
  border-color: rgba(103, 232, 249, 0.3);
}
.thyh-3d-card-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 7px 9px;
  margin-bottom: 6px;
}
.thyh-3d-card-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #10b981;
  margin-bottom: 2px;
}
.thyh-3d-card-section-content {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #e2e8f0;
}
.thyh-3d-btn-link {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 6px;
}

/* BOTTOM DOCK (Thanh Lọc Huyệt & 14 Đường Kinh) */
.thyh-3d-bottom-controls {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 20;
  pointer-events: none;
}
.thyh-3d-bottom-controls > * {
  pointer-events: auto;
}
.thyh-3d-role-filter-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  align-items: center;
  background: rgba(13, 38, 46, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 4px 10px;
}
.thyh-3d-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}
.thyh-3d-role-chip {
  background: transparent;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.thyh-3d-role-chip.active {
  background: rgba(253, 224, 71, 0.22);
  border-color: #fde047;
  color: #fde047;
  font-weight: 700;
}
.thyh-3d-meridians-bar {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  background: rgba(13, 38, 46, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 5px 10px;
}
.thyh-3d-meridian-pill {
  background: transparent;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.thyh-3d-meridian-pill.active {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #ffffff;
  font-weight: 700;
}
.thyh-3d-meridian-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

/* ==============================================================================
   TỐI ƯU HÓA ĐẶC BIỆT CHO MÀN HÌNH DI ĐỘNG (MOBILE SPECIFIC < 768px)
   ============================================================================== */
@media screen and (max-width: 768px) {
  .thyh-3d-wrapper {
    height: 640px;
    border-radius: 12px;
  }
  .desktop-only {
    display: none !important;
  }

  /* Header trên điện thoại xếp gọn trên 1 hàng */
  .thyh-3d-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    top: 8px;
    left: 8px;
    right: 8px;
  }
  .thyh-3d-search-box {
    max-width: 100%;
    min-width: 100%;
  }
  .thyh-3d-search-input {
    font-size: 0.78rem;
    padding: 6px 28px 6px 28px;
  }
  .thyh-3d-header-actions {
    justify-content: flex-start;
  }
  .thyh-3d-action-pill {
    padding: 5px 9px;
    font-size: 0.72rem;
  }

  /* Dock controls góc trái thu nhỏ */
  .thyh-3d-controls-dock {
    top: 95px;
    left: 8px;
    padding: 3px;
    gap: 4px;
  }
  .thyh-3d-btn-icon {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }

  /* Bottom sheet trên điện thoại chiếm tối đa 44% màn hình */
  .thyh-3d-bottom-sheet {
    max-height: 44vh;
    left: 4px;
    right: 4px;
    border-radius: 16px 16px 0 0;
  }
  .thyh-3d-combo-list {
    grid-template-columns: 1fr;
  }

  /* Bottom bar thu nhỏ vừa tầm ngón tay cái */
  .thyh-3d-bottom-controls {
    bottom: 6px;
    left: 6px;
    right: 6px;
    gap: 4px;
  }
  .thyh-3d-role-filter-row,
  .thyh-3d-meridians-bar {
    padding: 3px 6px;
  }
  .thyh-3d-meridian-pill {
    font-size: 0.7rem;
    padding: 2px 6px;
  }
}


/* ==============================================================================
   ATLAS 3D STYLES: X-RAY, FAVORITES, SYMPTOMS, NEEDLE DEPTH & SAFETY BADGES
   ============================================================================== */
.thyh-3d-action-pill.fav {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fbbf24;
}
.thyh-3d-action-pill.fav:hover {
  background: rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.thyh-3d-btn-icon.xray-btn.active {
  background: #0284c7 !important;
  color: #38bdf8 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.8) !important;
}

.thyh-3d-symptom-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  align-items: center;
  scrollbar-width: none;
}
.thyh-3d-symptom-row::-webkit-scrollbar { display: none; }

.thyh-3d-symptom-chip {
  background: rgba(30, 41, 59, 0.9);
  color: #e9d5ff;
  border: 1px solid rgba(192, 132, 252, 0.3);
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.thyh-3d-symptom-chip:hover {
  background: rgba(147, 51, 234, 0.3);
  border-color: #c084fc;
  color: #ffffff;
}
.thyh-3d-symptom-chip.active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: #ffffff;
  border-color: #e9d5ff;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

.thyh-3d-card-fav-toggle {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.thyh-3d-card-fav-toggle:hover {
  background: rgba(245, 158, 11, 0.3);
}
.thyh-3d-card-fav-toggle.saved {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 800;
}

.thyh-3d-safety-box {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}


/* ==============================================================================
   DONG SHI ACUPOINTS (ĐỔNG THỊ KỲ HUYỆT) & DAO MA STYLES
   ============================================================================== */
.thyh-3d-system-switcher {
  display: flex;
  background: rgba(15, 23, 42, 0.9);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid rgba(192, 132, 252, 0.4);
  gap: 4px;
}

.thyh-3d-sys-tab {
  background: transparent;
  color: #94a3b8;
  border: none;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.thyh-3d-sys-tab.active {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.thyh-3d-sys-tab.dongshi-tab.active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.7) !important;
}

.thyh-3d-action-pill.highlight.dongshi-active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
  border-color: #c084fc !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.6) !important;
}

.thyh-3d-dongshi-regions-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 20px;
  align-items: center;
  scrollbar-width: none;
}
.thyh-3d-dongshi-regions-row::-webkit-scrollbar { display: none; }

.thyh-3d-ds-region-chip {
  background: rgba(30, 41, 59, 0.9);
  color: #e9d5ff;
  border: 1px solid rgba(192, 132, 252, 0.3);
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.thyh-3d-ds-region-chip:hover {
  background: rgba(147, 51, 234, 0.35);
  border-color: #c084fc;
  color: #ffffff;
}
.thyh-3d-ds-region-chip.active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: #ffffff;
  border-color: #fde047;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
}

/* ĐẢO MÃ CHÂM DRAWER STYLES */
.thyh-3d-bottom-sheet.daoma-sheet {
  border-top: 2px solid #a855f7;
}

.thyh-3d-daoma-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.thyh-3d-daoma-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.thyh-3d-daoma-card:hover {
  border-color: #c084fc;
  background: #1e1b4b;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.25);
}

.thyh-3d-combo-point-chip.dongshi-chip {
  background: #581c87;
  color: #f3e8ff;
  border-color: #c084fc;
}
.thyh-3d-combo-point-chip.dongshi-chip:hover {
  background: #7c3aed;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.6);
}

/* ==============================================================================
   ĐỔNG THỊ BƯỚC 2: BIỆN CHỨNG LÂM SÀNG (CLINICAL SYNDROMES STYLES)
   ============================================================================== */
.thyh-3d-bottom-sheet.syndrome-sheet {
  border-top: 2px solid #ea580c;
  box-shadow: 0 -8px 30px rgba(234, 88, 12, 0.35);
}

.thyh-3d-action-pill.dongshi-syndrome-pill {
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.5);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.thyh-3d-action-pill.dongshi-syndrome-pill:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(234, 88, 12, 0.8);
}

.thyh-3d-syndrome-card {
  user-select: none;
}

.thyh-3d-syndrome-card:hover {
  border-color: #ea580c !important;
  box-shadow: 0 0 14px rgba(234, 88, 12, 0.4);
}

.thyh-3d-ds-cat-chip.active {
  background: #ea580c !important;
  border-color: #fb923c !important;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.5);
}


/* ==============================================================================
   ĐỔNG THỊ BƯỚC 2: BIỆN CHỨNG LÂM SÀNG (CLINICAL SYNDROMES DETAILED STYLES)
   ============================================================================== */
.thyh-3d-bottom-sheet.syndrome-sheet {
  border-top: 2px solid #ea580c;
  box-shadow: 0 -8px 30px rgba(234, 88, 12, 0.35);
}

.thyh-3d-action-pill.dongshi-syndrome-pill {
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.5);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.thyh-3d-action-pill.dongshi-syndrome-pill:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(234, 88, 12, 0.8);
}

.thyh-3d-syndromes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.thyh-3d-syndrome-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
}

.thyh-3d-syndrome-card:hover {
  border-color: #ea580c !important;
  background: #1c1917;
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(234, 88, 12, 0.4);
}

.thyh-3d-ds-cat-chip {
  background: #0f172a;
  border: 1px solid #334155;
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.thyh-3d-ds-cat-chip.active {
  background: #ea580c !important;
  border-color: #fb923c !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.5);
}

.thyh-3d-syndrome-detail {
  animation: fadeIn 0.2s ease;
}


/* ==============================================================================
   ATLAS 3D V3.4.0: 5 TRỤ CỘT CHIẾN LƯỢC (CUNTOMETER, SAFETY, AI, QUIZ, ADAPTIVE)
   ============================================================================== */

/* Action Pills V3.4.0 */
.thyh-3d-action-pill.cuntometer-pill {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  color: #ffffff;
  border-color: #38bdf8;
}
.thyh-3d-action-pill.cuntometer-pill:hover {
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.7);
  transform: scale(1.05);
}

.thyh-3d-action-pill.ai-copilot-pill {
  background: linear-gradient(135deg, #6b21a8 0%, #9333ea 100%);
  color: #ffffff;
  border-color: #c084fc;
}
.thyh-3d-action-pill.ai-copilot-pill:hover {
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.7);
  transform: scale(1.05);
}

.thyh-3d-action-pill.quiz-pill {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
  color: #ffffff;
  border-color: #34d399;
}
.thyh-3d-action-pill.quiz-pill:hover {
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.7);
  transform: scale(1.05);
}

/* FPS Counter Badge */
.thyh-3d-fps-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  margin-left: auto;
  user-select: none;
  transition: all 0.2s ease;
}
.thyh-3d-fps-badge:hover {
  border-color: #38bdf8;
  color: #fff;
}
.thyh-3d-fps-badge .fps-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* Bottom Sheets V3.4.0 */
.thyh-3d-bottom-sheet.cuntometer-sheet {
  border-top: 2px solid #0284c7;
  box-shadow: 0 -8px 30px rgba(2, 132, 199, 0.35);
}

.thyh-3d-bottom-sheet.ai-copilot-sheet {
  border-top: 2px solid #a855f7;
  box-shadow: 0 -8px 30px rgba(168, 85, 247, 0.35);
}

.thyh-3d-bottom-sheet.quiz-sheet {
  border-top: 2px solid #10b981;
  box-shadow: 0 -8px 30px rgba(16, 185, 129, 0.35);
}

/* Cuntometer Chips */
.thyh-3d-cun-chip {
  background: #0f172a;
  border: 1px solid #334155;
  color: #cbd5e1;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}
.thyh-3d-cun-chip.active {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Low Power / Adaptive Mode */
#thyh3dViewer.low-power-mode .thyh-3d-bottom-sheet {
  backdrop-filter: none !important;
  background: rgba(9, 24, 30, 0.98) !important;
}
#thyh3dViewer.low-power-mode .thyh-3d-fps-badge .fps-dot {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

/* Safety Gateway Styles */
.thyh-3d-safety-gateway.red-alert {
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.4);
  animation: pulseRed 2s infinite ease-in-out;
}
@keyframes pulseRed {
  0%, 100% { border-color: #dc2626; }
  50% { border-color: #f87171; }
}


/* ==============================================================================
   MOBILE SMART TOUCH & NEARBY ACUPOINTS DOCK
   ============================================================================== */
.thyh-3d-nearby-dock {
  position: absolute;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 42;
  max-width: 92vw;
  overflow-x: auto;
  scrollbar-width: none;
  animation: slideUpFade 0.22s ease-out;
}
.thyh-3d-nearby-dock::-webkit-scrollbar {
  display: none;
}
.thyh-3d-nearby-chip {
  background: #1e293b;
  border: 1px solid #475569;
  color: #f8fafc;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.thyh-3d-nearby-chip:hover, .thyh-3d-nearby-chip.active {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}
@keyframes slideUpFade {
  from { opacity: 0; transform: translate(-50%, 15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
