:root {
  --bg: #1a1a2e;
  --card: #16213e;
  --accent: #0f3460;
  --highlight: #e94560;
  --text: #eee;
  --sub: #aaa;
  --border: #2a2a4a;
  --success: #00c853;
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 20px;
}
.info-panel {
  width: 100%;
  max-width: 1100px;
  background: var(--card);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.info-panel h3 {
  color: var(--highlight);
  margin-bottom: 10px;
  font-size: .95em;
  letter-spacing: 1px;
}
.info-wrap { overflow-x: auto; }
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .72em;
  white-space: nowrap;
}
.info-table th {
  color: var(--highlight);
  font-weight: 600;
  padding: 5px 8px;
  border-bottom: 2px solid var(--border);
  text-align: left;
  position: sticky;
  top: 0;
  background: var(--card);
}
.info-table td { padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.04); }
.info-table tr:hover td { background: rgba(255,255,255,.03); }
.info-table .algo-name { color: var(--text); font-weight: 500; }
.info-table .algo-impl { color: var(--sub); }
.info-table .algo-bits { color: var(--success); }
.container {
  width: 100%;
  max-width: 1100px;
  background: var(--card);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
h1 {
  text-align: center;
  font-size: 1.6em;
  margin-bottom: 8px;
  letter-spacing: 2px;
}
.subtitle {
  text-align: center;
  color: var(--sub);
  font-size: .85em;
  margin-bottom: 28px;
}

/* 模式切换 */
.mode-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}
.mode-tab {
  padding: 8px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--sub);
  cursor: pointer;
  font-size: .9em;
  transition: .2s;
  font-family: inherit;
}
.mode-tab:hover { border-color: var(--highlight); color: var(--text); }
.mode-tab.active {
  background: var(--highlight);
  border-color: var(--highlight);
  color: #fff;
}

/* 拖拽区域 */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: .25s;
  margin-bottom: 24px;
  position: relative;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--highlight);
  background: rgba(233,69,96,.06);
}
.drop-zone .icon { font-size: 2.8em; margin-bottom: 10px; }
.drop-zone p { color: var(--sub); font-size: .9em; margin-top: 6px; }
.drop-zone .file-name {
  color: var(--success);
  font-weight: 600;
  margin-top: 8px;
  word-break: break-all;
}
.drop-zone .file-size { color: var(--sub); font-size: .82em; }

/* 文本输入 */
.text-wrap {
  margin-bottom: 24px;
}
.text-wrap textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: rgba(0,0,0,.25);
  color: var(--text);
  font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
  font-size: .92em;
  line-height: 1.6;
  resize: vertical;
  transition: .25s;
  outline: none;
}
.text-wrap textarea:focus {
  border-color: var(--highlight);
  background: rgba(0,0,0,.35);
}
.text-wrap textarea::placeholder { color: #555; }
.text-info {
  text-align: right;
  font-size: .75em;
  color: var(--sub);
  margin-top: 6px;
}

/* 算法选择 */
.algo-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: .85em;
}
.algo-table td { padding: 6px 8px; vertical-align: middle; }
.algo-table .cat {
  color: var(--highlight);
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
  padding-right: 12px;
  font-size: .88em;
  width: 90px;
}
.algo-table .btns { display: flex; flex-wrap: wrap; gap: 6px; }
.algo-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: .85em;
  transition: .2s;
  font-family: inherit;
}
.algo-btn:hover { border-color: var(--highlight); }
.algo-btn.active {
  background: var(--highlight);
  border-color: var(--highlight);
}

/* 结果显示 */
.result-box {
  background: var(--accent);
  border-radius: 10px;
  padding: 20px;
  display: none;
}
.result-box.show { display: block; }
.result-label {
  font-size: .8em;
  color: var(--sub);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.result-hash {
  font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
  font-size: 1.05em;
  word-break: break-all;
  background: rgba(0,0,0,.3);
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  user-select: all;
  line-height: 1.6;
}
.copy-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: .85em;
  transition: .2s;
  font-family: inherit;
}
.copy-btn:hover { border-color: var(--highlight); }
.copy-btn.copied { border-color: var(--success); color: var(--success); }

/* 进度条 */
.progress-wrap {
  margin-top: 12px;
  display: none;
}
.progress-wrap.show { display: block; }
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--highlight);
  width: 0%;
  transition: width .15s;
  border-radius: 3px;
}
.progress-text {
  text-align: center;
  font-size: .78em;
  color: var(--sub);
  margin-top: 6px;
}