/**
 * WELL AP 学习教程 — 专用样式
 * 左右分栏布局 + 侧边导航 + Tab切换 + Feature详情
 * WELL品牌色: #6CCE9F (薄荷绿)
 */

/* ====== 主布局: 左右分栏 — 整体居中 ====== */
.well-layout {
  display: flex;
  min-height: calc(100vh - 60px);
  background: #f8fafb;
  max-width: 1160px;
  margin: 0 auto;
}

/* ====== 左侧导航栏 — 统一深青色调 ====== */
.well-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #1e3d3a, #152b28);
  border-right: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s ease;
  z-index: 50;
}

.well-sidebar::-webkit-scrollbar { width: 5px; }
.well-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* 侧边栏标题 */
.well-sidebar-title {
  padding: 20px 20px 12px;
  color: rgba(255,255,255,0.82);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* 导航项 */
.well-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.88);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  user-select: none;
}
.well-nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.well-nav-item.active {
  color: #fff;
  background: rgba(108,206,159,0.12);
  border-left-color: #6CCE9F;
}

/* 导航图标 */
.well-nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}
.well-nav-item.active .well-nav-icon { opacity: 1; }
.well-nav-icon svg { width: 22px; height: 22px; }

/* 导航文字 */
.well-nav-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.well-nav-text .en {
  font-size: 11px;
  opacity: 0.75;
  margin-left: 4px;
}

/* 导航计数 */
.well-nav-count {
  font-size: 11px;
  background: rgba(255,255,255,0.15);
  padding: 2px 7px;
  border-radius: 10px;
  color: rgba(255,255,255,0.85);
}
.well-nav-item.active .well-nav-count {
  background: rgba(108,206,159,0.25);
  color: #6CCE9F;
}

/* Concept下的Feature列表 */
.well-nav-features {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: rgba(0,0,0,0.2);
}
.well-nav-item.expanded + .well-nav-features {
  max-height: 800px;
}

.well-feature-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px 7px 50px;
  color: rgba(255,255,255,0.82);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.well-feature-row:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.well-feature-row.active {
  color: #6CCE9F;
  background: rgba(108,206,159,0.08);
  border-left-color: #6CCE9F;
}

/* P/O 标签 */
.well-tag-po {
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 4px;
  flex-shrink: 0;
}
.well-tag-po.p { background: rgba(231,76,60,0.35); color: #ff8a80; }
.well-tag-po.o { background: rgba(52,152,219,0.35); color: #7ec8f5; }

.well-feature-row .feature-id {
  font-weight: 600;
  min-width: 36px;
}
.well-feature-row .feature-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ====== 右侧内容区 ====== */
.well-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 0;
}

/* 内容头部 Banner — 与左侧导航同色系 */
.well-content-header {
  background: linear-gradient(135deg, #1e3d3a, #244b45);
  color: #fff;
  padding: 28px 32px;
  border-bottom: 3px solid #6CCE9F;
}
.well-content-header .breadcrumb {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 8px;
}
.well-content-header .breadcrumb a {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
}
.well-content-header .breadcrumb a:hover { color: #6CCE9F; }
.well-content-header .breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

.well-content-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}
.well-content-header .subtitle {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 4px;
}

/* 标签行 */
.well-header-tags {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.well-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  background: rgba(255,255,255,0.15);
}
.well-header-tag.po-p { background: rgba(231,76,60,0.35); color: #ff8a80; }
.well-header-tag.po-o { background: rgba(108,206,159,0.35); color: #81C995; }
.well-header-tag.points { background: rgba(241,196,15,0.35); color: #ffe066; }

/* ====== Tab 栏 ====== */
.well-tabs {
  display: flex;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 20;
  overflow-x: auto;
}
.well-tab {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  user-select: none;
}
.well-tab:hover { color: #333; }
.well-tab.active {
  color: #1e3d3a;
  border-bottom-color: #6CCE9F;
  font-weight: 600;
}
.well-tab .badge {
  font-size: 11px;
  background: #eee;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 6px;
}
.well-tab.active .badge { background: #e0f5ec; color: #2e7d32; }

/* ====== Tab 内容区 ====== */
.well-tab-content {
  padding: 24px 32px;
}
.well-tab-panel { display: none; }
.well-tab-panel.active { display: block; }

/* ====== 统计卡片 ====== */
.well-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.well-stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #eee;
  transition: transform 0.2s;
}
.well-stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.well-stat-number {
  font-size: 26px;
  font-weight: 700;
  color: #1a3a2e;
}
.well-stat-number .unit { font-size: 12px; font-weight: 400; opacity: 0.5; margin-left: 4px; }
.well-stat-label {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* ====== Concept 概览卡片 ====== */
.well-concept-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #eee;
  cursor: pointer;
  transition: all 0.2s;
}
.well-concept-card:hover {
  border-color: #6CCE9F;
  box-shadow: 0 4px 16px rgba(108,206,159,0.12);
  transform: translateY(-1px);
}
.well-concept-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}
.well-concept-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.well-concept-icon svg { width: 28px; height: 28px; }
.well-concept-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.well-concept-card .desc {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
.well-concept-card .meta {
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
}
.well-concept-card .meta .count {
  font-size: 16px;
  font-weight: 700;
  color: #1a3a2e;
}
.well-concept-card .meta .label {
  font-size: 12px;
  color: #aaa;
}

/* ====== Feature 详情区块 ====== */
.well-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #eee;
}
.well-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1a3a2e;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.well-section p { line-height: 1.8; color: #444; }

/* Part 卡片 */
.well-part {
  background: #f8fafb;
  border-left: 4px solid #6CCE9F;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 12px;
}
.well-part-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a3a2e;
  margin-bottom: 8px;
}
.well-part-detail {
  font-size: 13px;
  color: #666;
  line-height: 1.7;
}

/* ====== 背景知识版块 ====== */
.well-bg-section {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #eee;
  cursor: pointer;
  transition: all 0.2s;
}
.well-bg-section:hover {
  border-color: #6CCE9F;
  box-shadow: 0 4px 16px rgba(108,206,159,0.12);
}
.well-bg-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1a3a2e;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.well-bg-section .summary {
  font-size: 14px;
  color: #777;
  line-height: 1.7;
}
.well-bg-section .arrow {
  margin-left: auto;
  color: #ccc;
  font-size: 20px;
  transition: transform 0.2s;
}
.well-bg-section:hover .arrow { transform: translateX(4px); color: #6CCE9F; }

/* ====== 搜索框 ====== */
.well-search-bar {
  margin-bottom: 20px;
  position: relative;
}
.well-search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.well-search-bar input:focus { border-color: #6CCE9F; }
.well-search-bar svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #aaa;
}

/* ====== 搜索结果高亮 ====== */
.well-feature-row.search-hidden { display: none; }
.well-nav-item.search-hidden { display: none; }

/* ====== WELL Core 标记 ====== */
.well-core-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(108,206,159,0.15);
  color: #2e7d32;
  font-weight: 600;
}

/* ====== 移动端适配 ====== */
.well-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1e3d3a;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 60;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

@media (max-width: 900px) {
  .well-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    transform: translateX(-100%);
    z-index: 55;
  }
  .well-sidebar.open { transform: translateX(0); }
  .well-sidebar-toggle { display: flex; }
  .well-content-header { padding: 24px 20px; }
  .well-tabs { padding: 0 20px; }
  .well-tab-content { padding: 20px; }
}

@media (max-width: 600px) {
  .well-content-header h1 { font-size: 22px; }
  .well-stat-number { font-size: 26px; }
  .well-concept-card-header { flex-wrap: wrap; }
  .well-concept-card .meta { margin-left: 0; }
}

/* ====== 过渡动画 ====== */
.well-fade-in {
  animation: wellFadeIn 0.3s ease-out;
}
@keyframes wellFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== 条文内容格式化样式 ====== */

/* Option 标签 */
.well-opt-label {
  background: rgba(108,206,159,0.1);
  border-left: 3px solid #6CCE9F;
  padding: 6px 12px;
  margin: 8px 0 6px;
  font-size: 13px;
  border-radius: 0 4px 4px 0;
}
.well-opt-label strong { color: #1e3d3a; font-weight: 600; }

/* 适用范围标签 */
.well-scope-label {
  background: rgba(21,101,192,0.08);
  border-left: 3px solid #1565c0;
  padding: 6px 12px;
  margin: 8px 0 6px;
  font-size: 13px;
  border-radius: 0 4px 4px 0;
}
.well-scope-label strong { color: #1565c0; font-weight: 600; }

/* Note 提示框 */
.well-note {
  background: rgba(230,81,0,0.06);
  border: 1px solid rgba(230,81,0,0.15);
  padding: 8px 14px;
  margin: 8px 0;
  font-size: 12.5px;
  color: #666;
  border-radius: 6px;
  line-height: 1.7;
}
.well-note strong { color: #e65100; font-weight: 600; }

/* 字母列表 */
.well-part-detail ul.well-letter-list {
  list-style: none;
  padding: 0;
  margin: 6px 0;
}
.well-part-detail ul.well-letter-list li {
  padding: 3px 0 3px 24px;
  position: relative;
  font-size: 13px;
  line-height: 1.7;
  color: #555;
}
.well-part-detail ul.well-letter-list li::before {
  content: attr(data-letter);
  position: absolute;
  left: 0;
  font-weight: 600;
  color: #1e3d3a;
}

/* 数字列表 */
.well-part-detail ol.well-number-list {
  padding-left: 24px;
  margin: 6px 0;
}
.well-part-detail ol.well-number-list li {
  padding: 2px 0;
  font-size: 13px;
  line-height: 1.7;
  color: #555;
}

/* 段落 */
.well-part-detail p {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.7;
  color: #555;
}

/* ====== 表格样式 ====== */

/* 表格容器 */
.well-table-wrapper {
  margin: 10px 0;
  overflow-x: auto;
}

/* 表格标题 */
.well-table-title {
  font-size: 12px;
  font-weight: 600;
  color: #1e3d3a;
  margin-bottom: 6px;
  padding: 4px 10px;
  background: rgba(108,206,159,0.1);
  border-radius: 4px;
  display: inline-block;
}

/* 评分表（阈值+得分） */
.well-score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 4px 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.well-score-table thead {
  background: linear-gradient(135deg, #1e3d3a, #244b45);
}
.well-score-table thead th {
  color: #fff;
  padding: 8px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12.5px;
}
.well-score-table thead th:last-child {
  text-align: center;
  width: 80px;
}
.well-score-table tbody td {
  padding: 8px 14px;
  border-bottom: 1px solid #eee;
  color: #555;
  line-height: 1.6;
}
.well-score-table tbody td:last-child {
  text-align: center;
  font-weight: 700;
  color: #6CCE9F;
  font-size: 15px;
}
.well-score-table tbody tr:last-child td {
  border-bottom: none;
}
.well-score-table tbody tr:hover {
  background: rgba(108,206,159,0.04);
}

/* 阈值参数表 */
.well-threshold-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 6px 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.well-threshold-table td {
  padding: 7px 14px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12.5px;
  line-height: 1.6;
}
.well-threshold-table td.param-name {
  width: 40%;
  color: #1e3d3a;
  font-weight: 500;
  background: rgba(108,206,159,0.04);
}
.well-threshold-table td.param-value {
  color: #555;
}
.well-threshold-table tr:last-child td {
  border-bottom: none;
}
.well-threshold-table tr:hover td {
  background: rgba(108,206,159,0.06);
}
