/**
 * components.css
 * 全局组件库 - 深色高保真 (DeepDcc Pro Theme)
 */

/* =========================================
   features.html / cases.html 详情页组件
   ========================================= */
.feature-detail-section {
  padding: 100px 0 40px;
}

.feature-detail-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  margin-bottom: 64px;
  box-shadow: 0 20px 40px var(--glass-shadow);
  backdrop-filter: blur(var(--blur-strength));
}

.feature-detail-card > *,
.detail-content {
  min-width: 0;
}

/* 交错排列逻辑 */
.feature-detail-card:nth-child(even) {
  direction: rtl;
}

.feature-detail-card:nth-child(even) > * {
  direction: ltr;
}

/* 统一处理详情页内的内容分割线 */
.feature-detail-card .detail-content:last-child {
  border-left: 1px solid var(--glass-border);
  padding-left: 40px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-detail-card:nth-child(even) .detail-content:last-child {
  border-left: none;
  padding-left: 0;
  border-right: 1px solid var(--glass-border);
  padding-right: 40px;
}

@media (max-width: 992px) {
  .feature-detail-card {
    grid-template-columns: 1fr;
    direction: ltr !important;
    padding: 32px;
    gap: 32px;
  }
  .feature-detail-card > * {
    direction: ltr !important;
  }
  .feature-detail-card .detail-content:last-child {
    border-left: none;
    border-right: none;
    padding-left: 0;
    padding-right: 0;
    border-top: 1px solid var(--glass-border);
    padding-top: 32px;
  }
}

.grid-3-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 64px;
}
.grid-2-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

.info-card {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--glass-border);
  padding: 32px;
  border-radius: var(--radius-md);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.code-snippet {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px;
  border-radius: var(--radius-sm);
  font-family: "JetBrains Mono", Consolas, monospace;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* =========================================
   feedback.html 支持与反馈组件 - 高级工单版 (Premium Issue Tracker)
   ========================================= */
.community-section {
  padding: 120px 0 80px;
  min-height: calc(100vh - 200px);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  max-width: 1300px;
  margin: 0 auto;
}

/* 提交表单区卡片 - 增强质感 */
.post-card {
  padding: 32px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  height: fit-content;
  position: sticky;
  top: 120px;
  backdrop-filter: blur(20px);
}

.post-card h2 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* 分段式选项卡 - 现代化重构 */
.segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}

.segment-item {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.segment-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.segment-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 统一输入框外观 - 扁平边框化 */
.glass-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-sm) !important;
  padding: 12px 16px !important;
  color: var(--text-primary) !important;
  font-size: 0.95rem !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  font-family: inherit;
}

.glass-input:focus {
  border-color: var(--accent-primary) !important;
  background: rgba(0, 0, 0, 0.3) !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* 列表展示区 */
.board-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 20px;
  margin-bottom: 4px;
}

.count-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  margin-left: 12px;
}

/* 列表项 (工单条目) - 极致精致化 */
.post-item {
  padding: 28px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

/* 状态指示线条 */
.post-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: background 0.3s ease;
}

.post-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

/* 不同类别的指示条颜色 */
.post-item[data-type="bug"]::before {
  background: #ef4444;
}
.post-item[data-type="feature"]::before {
  background: #3b82f6;
}
.post-item[data-type="discuss"]::before {
  background: #10b981;
}

.post-item.pinned {
  background: rgba(59, 130, 246, 0.03);
  border-color: rgba(59, 130, 246, 0.2);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.post-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-bug {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}
.badge-feature {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}
.badge-discuss {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.4;
}

.post-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 0;
  opacity: 0.9;
}

.post-time {
  font-family: "JetBrains Mono", monospace;
  opacity: 0.5;
  margin-left: auto;
}

.post-actions {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

.delete-btn {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.1);
  color: #f87171;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.delete-btn:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--text-secondary);
  opacity: 0.4;
  font-size: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.01);
}

@media (max-width: 992px) {
  .community-section {
    grid-template-columns: 1fr;
    padding: 120px 24px 60px;
  }
  .post-card {
    position: static;
    margin-bottom: 40px;
  }
  .post-item:hover {
    transform: none;
  }
}

/* =========================================
   pricing.html 版本对比组件
   ========================================= */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 64px;
}

.pricing-card {
  padding: 40px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  text-align: left;
  position: relative;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.04);
}

.pricing-card.pro {
  border: 1px solid var(--accent-primary);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.price-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 24px 0;
  color: var(--text-primary);
}

.price-value span {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.price-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--accent-primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.feature-list-price {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
  flex: 1;
}

.feature-list-price li {
  padding: 10px 0 10px 28px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  position: relative;
}

.feature-list-price li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

.feature-list-price li.disabled {
  opacity: 0.4;
  text-decoration: line-through;
}

.feature-list-price li.disabled::before {
  content: "×";
  color: #ef4444;
}

/* 核心对比表格 */
.feature-comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 40px;
  text-align: left;
  background: rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.feature-comparison-table th,
.feature-comparison-table td {
  padding: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.feature-comparison-table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  color: var(--text-primary);
}

.feature-comparison-table tr:last-child td {
  border-bottom: none;
}

.feature-comparison-table td {
  color: var(--text-secondary);
}

@media (max-width: 992px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .grid-3-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}


/* =========================================
   Hero Interactive Mockup 内部组件
   ========================================= */
.interactive-hero-window {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.bp-node {
  border-radius: 6px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.bp-node:hover {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.2);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.final-doc-preview h2,
.final-doc-preview p {
  margin-top: 0;
  color: #222;
}

/* 适配不同主题下的 Mockup 文字颜色 */
[data-theme="dark"] .mockup-body {
  color: var(--text-primary);
}
[data-theme="light"] .mockup-body {
  color: #1e293b;
}

/* ---------------- 文档透视标记 (Document Inspector) ---------------- */
.inspect-target {
    position: relative;
    cursor: help;
    transition: background 0.3s ease;
    border-bottom: 1px dashed rgba(59, 130, 246, 0.5);
    display: inline-block;
}

.inspect-target:hover {
    background: rgba(59, 130, 246, 0.1);
}

.inspect-target::before {
    content: attr(data-metadata);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-mono, monospace);
    pointer-events: none;
}

.inspect-target:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: 130%;
}

/* ---------------- Word 公式展示 ---------------- */
.word-equation-card {
  display: grid;
  gap: 14px;
}

.equation-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.equation-phase {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.equation-phase-title,
.word-equation-label {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.equation-source {
  margin: 0;
  font-family: "JetBrains Mono", Consolas, monospace;
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  word-break: normal;
  scrollbar-width: thin;
}

.equation-source-wrap {
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}

.latex-inline-source {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: nowrap;
  overflow-x: auto;
  max-width: 100%;
}

.word-formula-panel,
.word-equation {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.08)
  );
  color: rgba(33, 37, 58, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.word-formula-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.formula-panel-md {
  max-width: 320px;
  margin: 0 auto;
}

.formula-panel-sm {
  max-width: 320px;
  margin: 0 auto;
}

.word-equation-row,
.word-formula-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.45;
}

.word-formula-row.compact {
  font-size: 0.9rem;
}

.word-formula-row.display {
  font-size: 0.96rem;
  line-height: 1.42;
  min-height: 42px;
}

.math-nowrap {
  white-space: nowrap;
}

.math-fraction {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  vertical-align: middle;
  min-width: 40px;
}

.math-fraction .numerator,
.math-fraction .denominator {
  display: block;
  text-align: center;
  padding: 0 4px;
  line-height: 1.2;
}

.math-fraction .numerator {
  border-bottom: 1.2px solid currentColor;
  padding-bottom: 1px;
}

.math-fraction .denominator {
  padding-top: 1px;
}

.math-sup {
  font-size: 0.72em;
  vertical-align: super;
}

.word-equation-note,
.word-formula-note {
  margin: 0;
  color: rgba(71, 85, 105, 0.92);
  font-size: 0.78rem;
  line-height: 1.6;
  font-family: "Times New Roman", serif;
}

.word-formula-caption {
  color: rgba(100, 116, 139, 0.95);
  font-size: 0.72rem;
  font-family: "JetBrains Mono", Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.equation-flow-line {
  font-family: "JetBrains Mono", Consolas, monospace;
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.equation-flow-subline {
  font-family: "JetBrains Mono", Consolas, monospace;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.9rem;
}

.equation-result-flag {
  color: var(--accent-primary);
  font-weight: 700;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.equation-feature-card {
  grid-template-columns: minmax(280px, 0.72fr) minmax(470px, 1.18fr);
  align-items: start;
}

.equation-feature-card .detail-content:first-child {
  max-width: 440px;
}

.equation-feature-card .detail-content:last-child {
  padding-left: 24px;
}

.equation-flow-card {
  max-width: 620px;
  margin-left: 0;
  padding: 20px 22px !important;
}

.equation-flow-card .equation-phase {
  padding: 14px 16px;
}

.equation-flow-card .equation-phase-title,
.equation-flow-card .word-equation-label {
  margin-bottom: 8px;
}

