/* ============================================================
 * 爱硅蜜工具箱 · 样式（浅色主题 / 响应式）
 * ============================================================ */

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #1f2937;
  --ink-soft: #5b6472;
  --ink-faint: #94a3b8;
  --line: #e6ebf2;
  --brand: #2f7df6;
  --brand-dark: #1f5fd1;
  --shadow: 0 10px 30px rgba(31, 41, 55, .08);
  --shadow-hover: 0 18px 44px rgba(31, 41, 55, .16);
  --radius: 18px;
}

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

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans JP",
    "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- 顶部栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.brand-logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2f7df6, #7c3aed);
  display: grid; place-items: center;
  color: #fff; font-size: 22px;
  box-shadow: 0 6px 16px rgba(47, 125, 246, .35);
  flex: none;
}
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.brand-company { font-size: 12px; color: var(--ink-faint); }
.header-spacer { flex: 1; }

/* 返回主页按钮 */
.home-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 20px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; font-size: 14px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(47, 125, 246, .3);
  transition: all .18s ease;
}
.home-btn:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(47, 125, 246, .42); }
.home-btn:active { transform: translateY(0); }
.home-ico { font-size: 16px; }

/* 语言切换 */
.lang-switch { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.lang-btn {
  border: none; background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  padding: 6px 11px; border-radius: 9px; transition: all .18s ease;
  display: flex; align-items: center; gap: 5px;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.active { background: #fff; color: var(--brand); box-shadow: var(--shadow); }

/* ---------- 英雄区 ---------- */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 46px 22px 10px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  background: linear-gradient(120deg, #1f5fd1, #7c3aed);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 12px;
}
.hero p { color: var(--ink-soft); font-size: 16px; max-width: 640px; margin: 0 auto; }
.motto {
  margin: 22px auto 0;
  max-width: 720px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(47,125,246,.10), rgba(124,58,237,.10));
  border: 1px solid var(--line);
}
.motto-label {
  font-size: 12px; font-weight: 800; letter-spacing: 1px;
  color: #fff; background: linear-gradient(120deg, #2f7df6, #7c3aed);
  padding: 4px 12px; border-radius: 999px; flex: none;
}
.motto-text { font-size: 15px; font-weight: 600; color: var(--ink); }
@media (max-width: 560px) { .motto { border-radius: 16px; } }

/* ---------- 工具网格 ---------- */
.section-title {
  max-width: 1120px; margin: 34px auto 0; padding: 0 22px;
  font-size: 14px; font-weight: 700; color: var(--ink-faint);
  letter-spacing: 1px; text-transform: uppercase;
}
.grid {
  max-width: 1120px;
  margin: 16px auto 40px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--accent, var(--brand)); opacity: .9;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: transparent; }
.card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center; font-size: 28px;
  background: color-mix(in srgb, var(--accent, var(--brand)) 14%, #fff);
}
.card-tag { font-size: 12px; font-weight: 700; color: var(--accent, var(--brand)); letter-spacing: .4px; }
.card-name { font-size: 20px; font-weight: 800; }
.card-desc { font-size: 14px; color: var(--ink-soft); flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.card-open {
  font-size: 14px; font-weight: 700; color: #fff;
  background: var(--accent, var(--brand));
  padding: 8px 16px; border-radius: 10px;
}
.card-arrow { color: var(--ink-faint); font-size: 18px; }

/* 即将上线占位卡 */
.card.soon { cursor: default; opacity: .72; }
.card.soon .card-icon { background: var(--surface-2); }
.card.soon:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line); }

/* ---------- 工具视图（iframe 覆盖层） ---------- */
.toolview {
  position: fixed; inset: 0; z-index: 100;
  background: #fff; display: none; flex-direction: column;
}
.toolview.open { display: flex; }
.toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface); flex: none;
}
.toolbar .back {
  border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 10px; padding: 8px 14px; cursor: pointer;
  font-weight: 700; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 6px;
}
.toolbar .back:hover { background: #eef2f7; }
.toolbar .tname { font-weight: 800; font-size: 16px; }
.toolbar .tsub { font-size: 12px; color: var(--ink-faint); }
.toolbar .spacer { flex: 1; }
.tool-frame { flex: 1; width: 100%; border: none; background: #fff; }

/* ---------- 底部联系方式 ---------- */
.site-footer {
  margin-top: auto;
  background: #0f1b2d;
  color: #cdd6e4;
}
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 30px 22px 18px;
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start;
}
.footer-brand .fb-name { font-size: 18px; font-weight: 800; color: #fff; }
.footer-brand .fb-sub { font-size: 13px; color: #8f9bb0; margin-top: 4px; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact .fc-title { font-size: 13px; font-weight: 700; color: #8f9bb0; letter-spacing: 1px; }
.fc-row { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.fc-row a { color: #cdd6e4; text-decoration: none; }
.fc-row a:hover { color: #fff; text-decoration: underline; }
.fc-ico { width: 22px; text-align: center; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center; padding: 12px; font-size: 12px; color: #6b7689;
}
.footer-visitors {
  display: flex; gap: 24px; align-items: center;
}
.fv-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.fv-num {
  font-size: 22px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums;
}
.fv-label {
  font-size: 11px; color: #8f9bb0; letter-spacing: 1px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 560px) {
  .brand-company { display: none; }
  .lang-btn { padding: 6px 8px; font-size: 12px; }
  .lang-btn .lang-text { display: none; }
  .footer-inner { flex-direction: column; }
  .home-btn { padding: 7px 14px; font-size: 13px; }
}
