/* ============================================================
   LiteHost 前台主题 —— 复刻 hostbrr.com 风格
   浅色为主 + 青绿强调色 + 深蓝按钮 + 等宽字体价格
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-dark: #0f172a;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;
  --accent: #17a2b8;
  --accent-strong: #12879a;
  --accent-soft: #e6f7f9;
  --cyan: #3ed4e8;
  --blue: #2563eb;
  --amber: #f59e0b;
  --amber-ink: #422006;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .08);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --bg-alt: #0f172a;
  --bg-dark: #060b16;
  --card: #111c30;
  --border: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --accent: #3ed4e8;
  --accent-strong: #17a2b8;
  --accent-soft: #0d3b43;
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  transition: background .25s, color .25s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; }
.mono { font-family: var(--mono); }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }

.icon, .icon-sm { width: 1.15em; height: 1.15em; vertical-align: -.22em; flex-shrink: 0; }
.icon-sm { width: 1em; height: 1em; color: var(--accent); }

/* ---------- 公告条 ---------- */
.announce {
  background: var(--amber);
  color: var(--amber-ink);
  font-size: 14px;
  font-weight: 600;
}
.announce-inner { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 24px; flex-wrap: wrap; text-align: center; }
.announce-link { color: var(--amber-ink); text-decoration: underline; font-weight: 700; }

/* ---------- 头部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 19px; }
.brand-logo { height: 36px; width: auto; display: block; }
.dark-only { display: none; }
html[data-theme="dark"] .light-only { display: none; }
html[data-theme="dark"] .dark-only { display: block; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-dark); color: var(--accent);
  font-family: var(--mono); font-size: 15px; font-weight: 700;
}
.brand-light .brand-mark { background: rgba(255,255,255,.08); }
.brand-light .brand-name { color: #fff; }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 13px; border-radius: 8px;
  color: var(--text-muted); font-size: 15px; font-weight: 500;
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--bg-alt); }
.caret { width: 14px; height: 14px; }
.nav-drop { position: relative; }
.drop-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 200px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 50;
}
.drop-menu a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--text); font-size: 14.5px; }
.drop-menu a:hover { background: var(--bg-alt); color: var(--accent); }
.nav-drop.open .drop-menu { display: block; }
.nav-drop.open .caret { transform: rotate(180deg); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--text-muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--bg-alt); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-burger { display: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 9px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  border: 1px solid transparent; cursor: pointer;
  transition: all .18s;
}
.btn-sm { padding: 8px 15px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1d4ed8; color: #fff; }
.btn-dark { background: var(--bg-dark); color: #fff; }
html[data-theme="dark"] .btn-dark { background: #1e293b; }
.btn-dark:hover { background: #1e293b; color: #fff; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }

/* ---------- Hero 轮播 ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg); }
.hero-rack { position: absolute; inset: 0; opacity: .5; background-image: repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 90px), repeating-linear-gradient(0deg, var(--border) 0 1px, transparent 1px 90px); mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 30%, transparent 75%); }
.hero-inner { position: relative; text-align: center; padding: 90px 24px 60px; min-height: 480px; display: flex; flex-direction: column; align-items: center; }
.hero-slide { display: none; flex-direction: column; align-items: center; max-width: 760px; }
.hero-slide.current { display: flex; animation: fadeUp .5s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-window { margin-bottom: 26px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 16px;
  font-family: var(--mono); font-size: 13px; color: var(--text);
  box-shadow: var(--shadow);
}
.hero-chip b { font-weight: 700; }
.hero-chip i { width: 1px; height: 14px; background: var(--border); }
.hero-badge { color: var(--blue); font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 14px; }
.hero-title { font-size: clamp(40px, 7vw, 64px); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; color: var(--text); }
.hero-title .accent {
  background: linear-gradient(95deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 20px auto 30px; max-width: 560px; color: var(--text-muted); font-size: 17.5px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-dots { display: flex; gap: 8px; margin-top: 48px; }
.dot { width: 26px; height: 5px; border-radius: 3px; border: 0; background: var(--border); cursor: pointer; transition: background .2s; }
.dot.on { background: var(--text); }

/* ---------- 通用区块 ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -.01em; }
.section-sub { text-align: center; color: var(--text-muted); max-width: 640px; margin: 14px auto 0; font-size: 17px; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.pill {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  letter-spacing: .04em;
}
.pill-teal { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ---------- 卡片 / 产品 ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 26px; box-shadow: var(--shadow); position: relative; }
.product-grid { margin-top: 48px; }
.product-card { display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.product-card.is-popular { border-color: var(--accent); }
.card-badge {
  position: absolute; top: -11px; right: 18px;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  padding: 3px 12px; border-radius: 999px;
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.card-icon {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 10px;
  border: 1px solid var(--border); color: var(--accent);
  background: var(--bg-alt);
}
.card-icon .icon { width: 22px; height: 22px; }
.card-price { text-align: right; font-family: var(--mono); }
.card-price small { display: block; color: var(--text-faint); font-size: 11px; }
.card-price span { font-size: 21px; font-weight: 700; }
.card-price small:last-of-type { display: inline; font-size: 12px; }
.product-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.card-desc { color: var(--text-muted); font-size: 14.5px; margin-bottom: 16px; flex: 1; }
.check-list { list-style: none; display: grid; gap: 8px; margin-bottom: 20px; }
.check-list li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-muted); }
.check-grid { grid-template-columns: 1fr 1fr; }
.card-link { font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Why choose ---------- */
.feature-grid { margin-top: 48px; }
.feature-icon {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 16px;
}
.feature-icon .icon { width: 23px; height: 23px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- DDoS ---------- */
.ddos { background: var(--bg-dark); color: #fff; }
.ddos .pill { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #94a3b8; }
.ddos-head { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.ddos-head h2 { font-size: clamp(26px, 4vw, 36px); margin: 16px 0 14px; }
.ddos-head p { color: #94a3b8; }
.ddos-grid { max-width: 920px; margin: 0 auto; }
.ddos-item h4 { font-size: 16px; margin-bottom: 8px; color: #fff; }
.ddos-item p { color: #94a3b8; font-size: 14.5px; }
.ddos-note { text-align: center; color: #64748b; font-size: 13px; margin-top: 36px; }

/* ---------- 数据带 ---------- */
.stats-band { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-grid { padding: 40px 24px; }
.stat { text-align: center; }
.stat-value { font-size: 27px; font-weight: 700; color: var(--accent); display: block; }
.stat-label { color: var(--text-muted); font-size: 14px; }

/* ---------- 成长路线 ---------- */
.steps-grid { margin-top: 48px; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 30px; }
.step-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg-dark); color: var(--accent);
  font-weight: 700; font-size: 17px; margin-bottom: 16px;
}
html[data-theme="dark"] .step-num { background: #1e293b; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: start; }
.faq-intro h2 { font-size: 30px; margin: 14px 0 10px; }
.faq-intro p { color: var(--text-muted); margin-bottom: 22px; }
.faq-legal { display: flex; gap: 10px; flex-wrap: wrap; }
.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 4px 20px; }
.faq-item summary {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 0; cursor: pointer; font-weight: 600; font-size: 15.5px;
  list-style: none; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; margin-left: auto; color: var(--text-faint); font-size: 20px; }
.faq-item[open] summary::after { content: "−"; }
.faq-num { color: var(--accent); font-weight: 700; font-size: 14px; }
.faq-item p { padding: 0 0 18px 42px; color: var(--text-muted); font-size: 14.5px; }

/* ---------- 页头（内页） ---------- */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 44px 0 38px; }
.page-head h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -.01em; margin-top: 10px; }
.page-head p { color: var(--text-muted); margin-top: 8px; }
.crumb { font-size: 13.5px; color: var(--text-faint); }
.crumb:hover { color: var(--accent); }
.crumb.current { color: var(--text); }
.crumb-sep { color: var(--border); margin: 0 6px; }

/* ---------- 产品详情 / 套餐 ---------- */
.product-intro { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 60px; }
.product-intro .card-icon { width: 54px; height: 54px; flex-shrink: 0; }
.product-intro h2 { font-size: 21px; margin-bottom: 8px; }
.product-intro p { color: var(--text-muted); margin-bottom: 14px; }
.intro-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.plan-grid { margin-top: 40px; }
.plan-card { display: flex; flex-direction: column; }
.plan-card.is-popular { border-color: var(--accent); box-shadow: 0 8px 30px color-mix(in srgb, var(--accent) 18%, transparent); }
.plan-card h3 { font-size: 18px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 18px; }
.plan-price .big { font-size: 34px; font-weight: 800; color: var(--text); }
.plan-period { color: var(--text-faint); font-size: 14px; }
.plan-card .check-list { flex: 1; }
.plan-card .btn { margin-top: 8px; }
.empty { text-align: center; color: var(--text-faint); padding: 40px 0; }
.order-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; font-size: 14px; color: var(--text-faint); text-align: center; }

/* ---------- 表单 / 提示 ---------- */
.form-card { display: grid; gap: 16px; margin-top: 8px; }
.form-card label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg); color: var(--text);
  font-size: 15px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea { resize: vertical; }
.form-hint { color: var(--text-faint); font-size: 13px; }
.notice { border-radius: 12px; padding: 26px; margin-bottom: 18px; }
.notice h3 { margin-bottom: 8px; }
.notice p { margin-bottom: 16px; }
.notice-ok { background: color-mix(in srgb, var(--ok) 10%, var(--bg)); border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--border)); }
.notice-err { background: color-mix(in srgb, var(--danger) 8%, var(--bg)); border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--border)); color: var(--danger); }

/* ---------- 订单摘要 ---------- */
.order-summary { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 22px; }
.order-price { text-align: right; }
.order-price .big { font-size: 32px; font-weight: 800; }
.order-price span:last-child { color: var(--text-faint); font-size: 14px; display: block; }

/* ---------- 文章排版 ---------- */
.prose h2 { margin: 30px 0 12px; font-size: 24px; }
.prose h3 { margin: 24px 0 10px; font-size: 19px; }
.prose p { margin-bottom: 14px; color: var(--text-muted); }
.prose ul { margin: 0 0 16px 22px; color: var(--text-muted); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--bg-dark); color: #94a3b8; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 56px 24px 40px; }
/* 栏目数量变化时自动调整列宽（后台「页脚导航」可增删栏目） */
.footer-grid.cols-1 { grid-template-columns: 1.4fr 1fr; }
.footer-grid.cols-2 { grid-template-columns: 1.4fr 1fr 1fr; }
.footer-grid.cols-4 { grid-template-columns: 1.4fr repeat(4, 1fr); }
.footer-grid.cols-5 { grid-template-columns: 1.4fr repeat(5, 1fr); }
.footer-grid.cols-6 { grid-template-columns: 1.4fr repeat(6, 1fr); }
.footer-brand p { font-size: 14px; margin-top: 12px; }
.footer-tagline { color: #cbd5e1; }
.footer-addr { color: #64748b; }
.site-footer h4 { color: #e2e8f0; font-size: 14.5px; margin-bottom: 14px; }
.footer-links { list-style: none; display: grid; gap: 9px; }
.footer-links a { color: #94a3b8; font-size: 14px; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13.5px; color: #64748b; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .faq-layout { grid-template-columns: 1fr; }
  /* [class] 提高优先级，覆盖上面按栏目数生成的 cols-N 规则 */
  .footer-grid[class] { grid-template-columns: 1fr 1fr; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--card); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 12px 20px 18px;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .drop-menu { position: static; display: none; box-shadow: none; border: 0; }
  .nav-drop.open .drop-menu { display: block; }
  .nav-burger { display: inline-grid; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .form-row { grid-template-columns: 1fr; }
  .product-intro { flex-direction: column; }
  .order-summary { flex-direction: column; }
  .order-price { text-align: left; }
  .check-grid { grid-template-columns: 1fr; }
  .footer-grid[class] { grid-template-columns: 1fr; }
  .header-inner { gap: 12px; }
  .brand-name { display: none; }
  .hero-inner { padding-top: 60px; }
}
