:root {
  --bg: #080c14;
  --surface: #0f1623;
  --hover: #141d2e;
  --border: #1e293b;
  --accent: #00d4aa;
  --blue: #38bdf8;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --dim: #64748b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 15% 10%, rgba(0, 212, 170, 0.08), transparent 35%),
    radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.06), transparent 40%),
    linear-gradient(rgba(30, 41, 59, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.25) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
  color: var(--text);
  line-height: 1.6;
}
.container { max-width: 1040px; margin: 0 auto; padding: 24px 20px 64px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; background: rgba(15, 22, 35, 0.85);
  border: 1px solid var(--border); border-radius: 14px; margin-bottom: 40px; flex-wrap: wrap; gap: 12px;
}
.brand { font-weight: 700; font-size: 15px; }
.status-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--accent); background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.3); padding: 4px 12px; border-radius: 999px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.hero { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.hero-tag {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--blue);
  background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.pill { font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 5px 12px; border-radius: 8px; }
.fw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 20px; margin-bottom: 32px; }
.fw-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px;
  padding: 24px; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; justify-content: space-between;
}
.fw-card:hover { background: var(--hover); border-color: #334155; }
.fw-card.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(0, 212, 170, 0.08) 0%, var(--surface) 100%);
  box-shadow: 0 0 28px rgba(0, 212, 170, 0.12);
}
.fw-meta-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-bottom: 10px; font-family: monospace; }
.fw-card h2 { font-size: 22px; margin-bottom: 6px; }
.fw-desc { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.spec-list { border-top: 1px solid var(--border); padding-top: 14px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.spec-item { display: flex; justify-content: space-between; }
.spec-item span { color: var(--dim); }
.spec-item strong { font-family: monospace; }
.fw-cta { font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); text-align: center; }
.fw-card.active .fw-cta { color: #042f2e; background: var(--accent); }
.workbench { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 48px; }
@media (max-width: 780px) { .workbench, .guide-cols { grid-template-columns: 1fr !important; } }
.panel, .feat-card, .guide-section, .legal-section { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; }
.panel h3 { font-size: 18px; margin-bottom: 8px; }
.panel-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.key-form { display: flex; gap: 10px; margin-bottom: 14px; }
.key-input {
  flex: 1; background: #080c14; border: 1px solid var(--border); color: var(--text);
  padding: 12px 14px; border-radius: 10px; font-size: 15px; font-family: monospace; outline: none;
}
.key-input:focus { border-color: var(--accent); }
.btn-verify {
  background: var(--accent); color: #042f2e; border: none; padding: 0 20px;
  border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.btn-verify:disabled { opacity: 0.5; cursor: not-allowed; }
.key-msg { font-size: 13px; min-height: 22px; color: var(--muted); margin-bottom: 14px; }
.panel-foot { font-size: 12px; color: var(--dim); border-top: 1px solid var(--border); padding-top: 12px; }
.flash-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.sum-box { background: #080c14; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.sum-box span { display: block; font-size: 11px; color: var(--dim); }
.sum-box strong { font-size: 13px; font-family: monospace; }
.warn-box {
  background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24; font-size: 12px; padding: 10px 12px; border-radius: 10px; margin-bottom: 18px;
}
.lock-box { border: 1px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; color: var(--dim); font-size: 13px; }
.unlock-box { display: none; text-align: center; }
esp-web-install-button { display: block; width: 100%; }
esp-web-install-button::part(button) {
  width: 100%; padding: 14px 20px; background: linear-gradient(135deg, var(--accent), #059669);
  color: #022c22; font-weight: 800; font-size: 15px; border: none; border-radius: 12px; cursor: pointer;
}
.serial-tip { margin-top: 10px; font-size: 12px; color: var(--dim); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 48px; }
.feat-num { font-family: monospace; font-size: 13px; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.feat-card h4 { font-size: 16px; margin-bottom: 8px; }
.feat-card p, .guide-header p, .legal-intro { font-size: 13px; color: var(--muted); }
.guide-section, .legal-section { margin-bottom: 32px; }
.guide-header { margin-bottom: 20px; }
.guide-header h2 { font-size: 22px; margin-bottom: 4px; }
.guide-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.step-list, .check-list, .legal-items { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 13px; color: var(--muted); }
.step-list li { display: flex; gap: 12px; align-items: flex-start; }
.step-idx {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; background: rgba(0, 212, 170, 0.14);
  color: var(--accent); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.step-list strong, .check-list strong { color: var(--text); }
.check-box { background: #080c14; border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.check-box h4 { font-size: 14px; color: var(--blue); margin-bottom: 12px; }
.check-list li::before { content: "• "; color: var(--accent); font-weight: bold; }
code { background: rgba(255, 255, 255, 0.08); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 12px; color: var(--text); }
.legal-section h2 { font-size: 18px; margin-bottom: 6px; }
.legal-intro { margin-bottom: 16px; }
.legal-items { font-size: 12.5px; color: var(--dim); }
.legal-items strong { color: var(--muted); }
footer { text-align: center; font-size: 12px; color: var(--dim); padding-top: 16px; border-top: 1px solid var(--border); }
footer p + p { margin-top: 4px; }
