/* 文案提取 — 哥特风红黑 */
* { box-sizing: border-box; }

:root {
  --blood: #a80000;
  --blood-bright: #c8102e;
  --ink: #0a0a0a;
  --panel: rgba(18, 18, 18, 0.72);
  --panel-border: rgba(255, 255, 255, 0.14);
  --text: #e8e4de;
  --muted: #9a958e;
}

html, body { margin: 0; padding: 0; }

body {
  background: #050505 url('/assets/venom-bg.png') center top / cover fixed no-repeat;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  min-height: 100vh;
  position: relative;
}

/* 做旧噪点底 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
}

.snake-decor {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 64px;
  height: auto;
  z-index: 2;
  border-radius: 4px;
  opacity: 0.95;
}
@media (min-width: 640px) { .snake-decor { width: 80px; } }

.app {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

.hero h1 { margin: 8px 0 22px; text-align: center; padding-right: 76px; }
@media (min-width: 640px) { .hero h1 { padding-right: 104px; } }
.title-line {
  display: block;
  font-family: "Archivo", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
  font-size: clamp(14px, 3.9vw, 34px);
  letter-spacing: 0;
  white-space: nowrap;
  color: #000;
}
.emoji-line {
  display: block;
  font-size: clamp(16px, 3.4vw, 24px);
  margin-top: 10px;
  letter-spacing: 2px;
}

/* 半透明磨砂悬浮窗 + 细噪点 */
.frost-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.frost-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
}

.panel { padding: 18px; margin-bottom: 16px; }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab {
  flex: 1;
  padding: 12px 0;
  background: rgba(20, 20, 20, 0.7);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 0;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.tab.active {
  background: var(--blood);
  border-color: var(--blood);
  color: #fff;
}

textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 12px;
  font-size: 15px;
  resize: vertical;
  outline: none;
}
textarea:focus { border-color: var(--blood-bright); }

.link-actions { display: flex; gap: 10px; margin-top: 12px; align-items: stretch; }
.link-actions .btn-blood { flex: 1; width: auto; margin-top: 0; }
.link-actions .btn-ghost { padding: 13px 16px; font-size: 15px; }

.btn-blood {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 13px 0;
  background: var(--blood);
  color: #fff;
  border: none;
  border-radius: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
}
.btn-blood:disabled { opacity: 0.5; cursor: wait; }
.btn-blood:hover:not(:disabled) { background: var(--blood-bright); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 0;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--blood-bright); color: #fff; }

.hint { color: var(--muted); font-size: 13px; margin: 10px 2px 0; line-height: 1.6; }
.hidden { display: none !important; }

.file-label {
  display: block;
  padding: 16px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  cursor: pointer;
  color: var(--text);
}
.file-name { margin-top: 10px; font-size: 14px; color: var(--muted); word-break: break-all; }

/* 结果窗口 */
.result-window { border: 1px solid rgba(200, 16, 46, 0.5); }
.result-head, .history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.result-title, .history-title {
  font-weight: 900;
  font-size: 17px;
  color: #fff;
  border-left: 4px solid var(--blood-bright);
  padding-left: 8px;
}
.result-actions { display: flex; gap: 8px; }
#result-body { font-size: 15px; line-height: 1.9; }
#result-body h3 { color: var(--blood-bright); margin: 14px 0 6px; font-size: 15px; }
#result-body h3:first-child { margin-top: 0; }
#result-body p { margin: 0 0 8px; white-space: pre-wrap; word-break: break-word; }
.result-seg { margin-bottom: 14px; }
.result-seg .seg-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.result-seg .seg-head span { font-weight: 700; color: var(--blood-bright); font-size: 14px; }
.processing { color: var(--muted); }
.error-text { color: #ff6b6b; white-space: pre-wrap; }

/* 历史 */
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
  border: 1px solid var(--panel-border);
  padding: 10px 12px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.35);
}
.history-item:hover { border-color: var(--blood-bright); }
.history-item .h-title { font-weight: 700; font-size: 14px; }
.history-item .h-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.history-item .h-actions { margin-top: 8px; display: flex; gap: 8px; }
.empty { color: var(--muted); font-size: 14px; }
.kv-note { color: var(--muted); font-size: 12px; }
/* 视频下载结果 */
.video-cover {
  display: block;
  max-width: 100%;
  max-height: 320px;
  margin: 0 auto 12px;
  border-radius: 4px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.5);
}
.video-title { font-weight: 800; font-size: 16px; color: #fff; margin-bottom: 6px; word-break: break-word; }
.video-meta { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.video-download-btn { text-align: center; text-decoration: none; }
.video-actions { display: flex; gap: 8px; margin-top: 12px; }

.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 8px; }

@media (max-width: 560px) {
  .snake-decor { width: 64px; }
}
