/* === 功能层样式 (覆层/面板) === */

/* Overlay */
.func-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: _fadeIn .25s ease;
}
@keyframes _fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Panel */
.func-panel {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 28px 24px 24px;
  width: 100%; max-width: 400px;
  max-height: 85vh; overflow-y: auto;
  position: relative;
  color: #fff;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  box-shadow: 0 32px 64px rgba(0,0,0,0.6);
  animation: _slideUp .3s cubic-bezier(0.16,1,0.3,1);
}
@keyframes _slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* Close button */
.func-close {
  position: absolute; top: 12px; right: 16px;
  font-size: 22px; color: rgba(255,255,255,0.4);
  cursor: pointer; line-height: 1;
  transition: color .2s;
}
.func-close:hover { color: #fff; }

/* Label */
.func-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4); margin-bottom: 16px; text-align: center;
}

/* Result word */
.func-word {
  font-size: 52px; font-weight: 700;
  letter-spacing: -0.035em; text-align: center;
  margin: 8px 0 16px; line-height: 1.1;
}

/* Confidence bar */
.func-bar {
  width: 100%; height: 3px;
  background: rgba(255,255,255,0.06); border-radius: 2px;
  overflow: hidden; margin-bottom: 6px;
}
.func-bar-fill {
  height: 100%; background: #4D61FC; border-radius: 2px;
  transition: width .6s cubic-bezier(0.16,1,0.3,1);
}
.func-conf { font-size: 13px; color: rgba(255,255,255,0.5); text-align: center; margin-bottom: 12px; }

/* Candidates */
.func-candidates {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px;
}
.func-cand-tag {
  padding: 5px 14px; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px; font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.55); cursor: pointer; transition: all .2s;
}
.func-cand-tag:hover { background: rgba(77,97,252,0.10); border-color: #4D61FC; color: #fff; }

/* Button row */
.func-btns { display: flex; gap: 10px; justify-content: center; }

/* Buttons */
.func-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; font-size: 14px; font-weight: 600;
  font-family: 'Poppins', sans-serif; border: none;
  border-radius: 100px; cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.func-btn-primary { background: #4D61FC; color: #fff; box-shadow: 0 4px 16px rgba(77,97,252,0.25); }
.func-btn-primary:hover { background: #344BFB; box-shadow: 0 8px 24px rgba(77,97,252,0.3); }
.func-btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.12); color: #fff; }
.func-btn-outline:hover { background: rgba(255,255,255,0.05); }
.func-btn-sm { padding: 8px 16px; font-size: 13px; }

/* Input */
.func-input {
  flex: 1; padding: 12px 18px;
  font-size: 14px; font-family: 'Poppins', sans-serif;
  background: #000; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px; color: #fff; outline: none;
  transition: border-color .2s;
}
.func-input:focus { border-color: #4D61FC; }
.func-input::placeholder { color: rgba(255,255,255,0.3); }

/* Badge */
.func-badge {
  display: inline-block;
  background: rgba(77,97,252,0.12); color: #4D61FC;
  font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 100px;
  margin-bottom: 14px;
}

/* Upload zone */
.func-upload-zone {
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: 14px; padding: 28px 16px;
  text-align: center; cursor: pointer;
  transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 14px; color: rgba(255,255,255,0.55);
}
.func-upload-zone:hover { border-color: #4D61FC; background: rgba(77,97,252,0.03); }
.func-upload-icon { font-size: 28px; opacity: .8; }

/* Status */
.func-status { text-align: center; margin-top: 10px; font-size: 13px; }

/* Word list */
.func-word-list { list-style: none; }
.func-word-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.func-word-item:last-child { border-bottom: none; }
.func-word-name { font-size: 16px; font-weight: 600; }
.func-word-meta { font-size: 12px; color: rgba(255,255,255,0.35); }
.func-word-actions { display: flex; gap: 6px; }

/* Status colors */
.fs-ok { color: #4BCA81; font-weight: 600; }
.fs-err { color: #EF4444; font-weight: 600; }
.fs-load { color: #F59E0B; font-weight: 600; }

/* Toast */
.func-toast {
  position: fixed; top: 28px; left: 50%; transform: translateX(-50%);
  background: #1c1c1c; color: #fff; padding: 12px 24px;
  border-radius: 100px; font-size: 13px; font-weight: 500;
  z-index: 99999; border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  animation: _tIn .35s cubic-bezier(0.16,1,0.3,1);
}
@keyframes _tIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================
   TECH SECTION — 强制深色覆盖 CDN 白底
   ============================================ */
#tech-section,
#tech-section * {
  color: #fff !important;
  background-color: transparent !important;
  border-color: rgba(255,255,255,0.06) !important;
}
#tech-section table,
#tech-section td,
#tech-section th {
  background-color: transparent !important;
  color: #fff !important;
  border-bottom-color: rgba(255,255,255,0.06) !important;
}
#tech-section thead tr,
#tech-section th {
  background-color: rgba(77,97,252,0.08) !important;
  color: #4D61FC !important;
}
#tech-section td:first-child {
  color: rgba(255,255,255,0.6) !important;
}
#tech-section pre,
#tech-section code {
  background-color: transparent !important;
  color: rgba(255,255,255,0.6) !important;
}
#tech-section li {
  color: rgba(255,255,255,0.65) !important;
  background-color: transparent !important;
}
#tech-section li strong {
  color: #fff !important;
}
#tech-section .flowchart-box,
#tech-section .flow-node,
#tech-section .flow-diamond,
#tech-section .flow-arrow,
#tech-section .flow-branch,
#tech-section .flow-branch-item {
  background-color: transparent !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.08) !important;
}
#tech-section ol,
#tech-section ul {
  color: rgba(255,255,255,0.65) !important;
}
#tech-section h2,
#tech-section h3,
#tech-section h4 {
  color: #4D61FC !important;
  background-color: transparent !important;
}
#tech-section .card-title {
  color: #fff !important;
}
