:root {
  --bg: #070b14;
  --bg2: #0d1424;
  --panel: rgba(17, 26, 46, 0.78);
  --line: rgba(120, 160, 255, 0.16);
  --text: #e7ecf8;
  --muted: #8fa0c0;
  --accent: #5b8cff;
  --accent2: #8a5bff;
  --green: #37d6a3;
  --red: #ff5d7a;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 400px at 15% -5%, rgba(91, 140, 255, 0.16), transparent 60%),
    radial-gradient(600px 420px at 90% 10%, rgba(138, 91, 255, 0.14), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(55, 214, 163, 0.08), transparent 60%),
    var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.75);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-wrap: wrap;
}

.logo { font-size: 20px; font-weight: 800; color: var(--text); white-space: nowrap; }
.logo:hover { text-decoration: none; }

.topic-chip {
  flex: 1;
  min-width: 220px;
  font-size: 14px;
  color: var(--muted);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-badge {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  animation: pulse 2s infinite;
}

.live-badge.off { color: var(--muted); animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.18s;
  text-align: center;
}
.btn:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  font-weight: 700;
}
.btn-ghost { background: transparent; }
.btn-small { padding: 5px 12px; font-size: 13px; }

/* ------- 大厅 ------- */
.arena-main {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 18px;
  max-width: 1280px;
  margin: 20px auto;
  padding: 0 20px 60px;
}

.feed-wrap { position: relative; min-height: 60vh; }

.feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 4px;
}

.msg {
  display: flex;
  gap: 12px;
  animation: rise 0.3s ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  background: linear-gradient(135deg, rgba(91,140,255,0.25), rgba(138,91,255,0.25));
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.msg-body { flex: 1; min-width: 0; }

.msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.msg-name { font-weight: 700; font-size: 14px; }
.provider-tag {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
}
.ai-tag {
  font-size: 11px;
  color: #7fd8b2;
  border: 1px solid rgba(55, 214, 163, 0.35);
  border-radius: 999px;
  padding: 1px 8px;
}
.msg-time { font-size: 11px; color: var(--muted); }

.bubble {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 15px;
  font-size: 15px;
  line-height: 1.75;
  word-break: break-word;
}

.bubble.typing { color: var(--muted); }
.bubble.error { border-color: rgba(255, 93, 122, 0.4); color: #ffb3c1; }

.cursor { display: inline-block; width: 2px; height: 1em; background: var(--accent); vertical-align: -2px; animation: blink 0.8s infinite; }
@keyframes blink { 50% { opacity: 0; } }

.site-url {
  font-size: 12px;
  color: var(--muted);
  margin-left: 10px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.debate-bar {
  display: flex;
  gap: 10px;
  padding: 4px 0 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

/* 会议记录式消息排版 */
.msg {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(120, 160, 255, 0.12);
}

.msg-time-col {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}

.msg-content { min-width: 0; }

.msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.avatar-sm {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.msg-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  word-break: break-word;
}

.msg-text.typing { color: var(--muted); }
.msg-text.error { color: #ffb3c1; }

.auth-wrap {
  display: flex;
  justify-content: center;
  padding: 60px 20px;
}

.auth-card {
  width: min(430px, 94vw);
  padding: 34px 30px;
}

.watermark {
  position: sticky;
  bottom: 14px;
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(6px);
}

.watermark.hidden { display: none; }

.side { display: flex; flex-direction: column; gap: 16px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.panel h3 {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 12px;
}

.agent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(120,160,255,0.08);
  font-size: 14px;
}
.agent-item:last-child { border-bottom: none; }
.agent-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.agent-item .agent-name { font-weight: 600; }
.agent-item .agent-prov { margin-left: auto; font-size: 11px; color: var(--muted); }

.report {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  white-space: pre-wrap;
}

.history-item {
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(120,160,255,0.08);
  color: var(--muted);
  cursor: pointer;
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { color: var(--text); }

.history-item .lock { margin-left: 6px; font-size: 12px; }

.empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 0; }

/* ------- 首页 ------- */
.hero {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
  padding: 90px 20px 50px;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 900;
  background: linear-gradient(120deg, #fff, var(--accent) 45%, var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
}

.hero .sub { color: var(--muted); font-size: 18px; margin-top: 18px; line-height: 1.8; }
.hero .cta { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .btn { font-size: 16px; padding: 12px 30px; }

.section { max-width: 980px; margin: 0 auto; padding: 40px 20px; }
.section h2 { font-size: 26px; margin-bottom: 24px; text-align: center; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card .icon { font-size: 30px; }
.card h3 { margin: 12px 0 8px; font-size: 17px; }
.card p { color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ------- 购买 ------- */
.price-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.price-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: center;
  position: relative;
}
.price-card.hot { border-color: var(--accent); box-shadow: 0 0 30px rgba(91,140,255,0.18); }
.price-card .plan { font-size: 16px; color: var(--muted); }
.price-card .price { font-size: 42px; font-weight: 900; margin: 12px 0 4px; }
.price-card .price span { font-size: 16px; font-weight: 400; color: var(--muted); }
.price-card .desc { color: var(--muted); font-size: 13px; line-height: 1.7; margin-bottom: 20px; }
.hot-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 12px;
  padding: 3px 14px;
  border-radius: 999px;
}

.note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 24px; line-height: 1.8; }

/* ------- 弹窗 ------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  width: min(420px, 92vw);
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal .close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

.modal h2 { font-size: 20px; margin-bottom: 18px; }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs .tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 14px;
}
.tabs .tab.active { color: #fff; background: rgba(91,140,255,0.15); border-color: var(--accent); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  background: rgba(7, 11, 20, 0.8);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.field input:focus { border-color: var(--accent); }

.form-error { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 18px; }

.hidden { display: none !important; }

/* ------- 管理后台 ------- */
.admin-main {
  max-width: 980px;
  margin: 24px auto;
  padding: 0 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-row input[type="text"], .admin-row input[type="number"] {
  background: rgba(7, 11, 20, 0.8);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  flex: 1;
  min-width: 180px;
}

.switch { position: relative; width: 42px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  transition: 0.2s;
  cursor: pointer;
}
.switch .slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: 0.2s;
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::before { transform: translateX(20px); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid rgba(120,160,255,0.1); }
th { color: var(--muted); font-size: 12px; letter-spacing: 1px; }

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg2);
  border: 1px solid var(--line);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  animation: rise 0.3s ease;
}

.faq-item { margin-bottom: 14px; }
.faq-item h4 { font-size: 15px; margin-bottom: 5px; }
.faq-item p { color: var(--muted); font-size: 14px; line-height: 1.7; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 40px 20px 50px;
}

@media (max-width: 860px) {
  .arena-main { grid-template-columns: 1fr; }
  .topbar { padding: 10px 16px; }
}
