:root {
  color-scheme: dark;
  --text: #eef2fb;
  --muted: #93a4c4;
  --line: rgba(255,255,255,.10);
  --brand: #7c9bff;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: #070a11; color: var(--text); overflow-x: hidden;
  font: 16px/1.65 -apple-system, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* 极光背景 */
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.b1 { width: 560px; height: 560px; left: -140px; top: -180px; background: #2f4bd8; }
.b2 { width: 460px; height: 460px; right: -120px; top: 60px; background: #7c3aed; opacity: .42; }
.b3 { width: 520px; height: 520px; left: 30%; bottom: -280px; background: #0ea5e9; opacity: .28; }

/* 顶栏 */
.topbar {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 6vw, 72px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg,#4f6ef7,#8b5cf6); font-weight: 700; color: #fff;
  box-shadow: 0 6px 18px rgba(108,140,255,.35);
}
.brand-name { font-size: 14px; letter-spacing: .5px; color: #cfd9ee; }
.topnav { display: flex; gap: 22px; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .18s; }
.topnav a:hover { color: var(--text); }

/* 主视觉 */
.hero {
  position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(28px, 7vh, 96px) clamp(20px, 6vw, 72px); max-width: 980px;
}
.eyebrow {
  margin: 0 0 18px; font-size: 12px; letter-spacing: .28em; color: #6f86b3;
  text-transform: uppercase;
}
h1 {
  margin: 0; font-size: clamp(38px, 6.4vw, 74px); line-height: 1.14; letter-spacing: -1.2px; font-weight: 700;
}
.grad {
  background: linear-gradient(100deg,#7c9bff 0%,#b58cff 45%,#5ad1ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin: 24px 0 0; color: var(--muted); font-size: clamp(14px, 1.4vw, 16.5px); max-width: 34em; }

.cta {
  margin-top: 38px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px; text-decoration: none; color: #fff; font-size: 15.5px; font-weight: 600;
  background: linear-gradient(120deg,#4f6ef7,#8b5cf6);
  box-shadow: 0 14px 38px rgba(94,114,255,.42);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.cta svg { width: 18px; height: 18px; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 20px 46px rgba(94,114,255,.55); filter: brightness(1.05); }

.socials { margin-top: 46px; display: flex; gap: 12px; flex-wrap: wrap; }
.social {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 12px; text-decoration: none;
  color: #b4c3de; font-size: 13px;
  background: rgba(255,255,255,.045); border: 1px solid var(--line);
  transition: .18s;
}
.social svg { width: 17px; height: 17px; }
.social:hover { color: #fff; border-color: rgba(124,155,255,.5); background: rgba(124,155,255,.13); transform: translateY(-1px); }

.foot {
  position: relative; z-index: 2; padding: 20px clamp(20px, 6vw, 72px) 26px;
  font-size: 12.5px; color: #5d6d8b; display: flex; gap: 8px; align-items: center;
}
.dotsep { opacity: .6; }

@media (max-width: 560px) {
  .topnav { gap: 14px; }
  .cta { width: 100%; justify-content: center; }
  .socials { margin-top: 34px; }
}

/* ============ 关于我 ============ */
.about { margin-top: 52px; }
.about-title {
  margin: 0 0 16px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: #6f86b3; font-weight: 600;
}
.about-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 16px 15px; border-radius: 14px;
  background: rgba(255,255,255,.042);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  transition: transform .18s, border-color .18s, background .18s;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(124,155,255,.42);
  background: rgba(124,155,255,.10);
}
.card-icon {
  flex: none; width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(79,110,247,.32), rgba(139,92,246,.32));
  border: 1px solid rgba(140,165,255,.22);
  color: #b9c8ff;
}
.card-icon svg { width: 19px; height: 19px; }
.card-body { min-width: 0; }
.card-body h3 { margin: 1px 0 3px; font-size: 14.5px; font-weight: 600; color: #e8eefc; }
.card-body p { margin: 0; font-size: 12.5px; line-height: 1.5; color: #8b9cbb; }

/* ============ 联系方式 ============ */
.contact { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }
.social.phone,
.social.mail { cursor: pointer; font-family: inherit; }

/* ============ 页脚 ============ */
.foot { flex-wrap: wrap; row-gap: 4px; }
.foot b { color: #a9bcff; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============ 手机端 ============ */
@media (max-width: 700px) {
  .about { margin-top: 40px; }
  .about-grid { grid-template-columns: 1fr; }     /* 小屏纵向排列，避免拥挤 */
  .card { padding: 14px; }
  .contact { gap: 8px; }
  .social { padding: 8px 12px; font-size: 12.5px; max-width: 100%; }
  .social span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .foot { font-size: 12px; }
}
@media (max-width: 420px) {
  .social { width: 100%; justify-content: center; }
}

/* ============ 防溢出加固（小屏） ============ */
html, body { max-width: 100%; }
body { overflow-x: hidden; }
.hero, .about, .contact, .foot { max-width: 100%; }
.lead { overflow-wrap: anywhere; }
.card { min-width: 0; }
.card-body p { overflow-wrap: anywhere; }
.social { min-width: 0; max-width: 100%; }
.social span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .about-grid { grid-template-columns: 1fr !important; }
  .contact { flex-direction: column; align-items: stretch; }
  .social { width: 100%; justify-content: center; }
}

/* ============ 新文案排版优化 ============ */
.eyebrow { margin-bottom: 14px; }

h1 {
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.30;
  letter-spacing: -0.5px;
  font-weight: 700;
  max-width: 16em;
}

.lead {
  margin-top: 22px;
  font-size: clamp(14px, 1.32vw, 16.5px);
  line-height: 1.95;
  max-width: 32em;
  color: #9caecb;
  letter-spacing: .2px;
}

.hero .cta { margin-top: 34px; }
.about { margin-top: 46px; }

@media (max-width: 900px) {
  h1 { font-size: clamp(28px, 7vw, 40px); line-height: 1.32; }
  .lead { margin-top: 18px; font-size: 14.5px; line-height: 1.9; }
  .hero .cta { margin-top: 28px; }
}

@media (max-width: 480px) {
  h1 { font-size: 27px; line-height: 1.36; letter-spacing: 0; }
  .lead { font-size: 14px; line-height: 1.85; }
  .eyebrow { font-size: 11px; letter-spacing: .2em; margin-bottom: 12px; }
}

/* ============ 双按钮 ============ */
.cta-row { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.cta.ghost {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: none; color: #cfd9ee;
}
.cta.ghost:hover { background: rgba(255,255,255,.11); box-shadow: none; }

/* ============ 页脚隐形入口（/chat） ============ */
.foot-secret { color: #1b2434; text-decoration: none; font-size: 13px; margin-left: 2px; }
.foot-secret:hover { color: #64748b; }

@media (max-width: 560px) {
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .cta { width: 100%; justify-content: center; }
}

/* ============ 首页雨滴层（纯前端 Canvas） ============ */
#rain {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;                 /* 极光(0) 之上、正文(2) 之下 */
  display: block;
  pointer-events: none;       /* 绝不拦截点击 */
  opacity: 0;
  transition: opacity 1.6s ease;
}
#rain.on { opacity: 1; }

/* 页脚原本是静态流元素，需抬到画布之上，否则文字会被雨层盖住 */
.foot { position: relative; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  #rain { display: none !important; }
}

/* ============ 问候语 + 毛玻璃时钟卡片（时间 / 日期 / 农历 / 节气） ============ */
.greet-block {
  position: relative; z-index: 2;
  margin: 32px 0 0;
  display: flex; flex-direction: column; gap: 11px;
  align-self: flex-start;
}
.clock-greet {
  margin: 0;
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; letter-spacing: .04em;
  color: #b6c6e6;
}
.clock-greet::before {
  content: ''; width: 20px; height: 1px; flex: none;
  background: linear-gradient(90deg, rgba(140,170,255,.95), rgba(140,170,255,0));
}

.clock-card {
  position: relative; z-index: 2;
  margin-top: 16px;
  display: inline-flex; flex-direction: row; align-items: stretch; gap: 22px;
  padding: 20px 26px 22px;
  border-radius: 20px;
  border: 1px solid rgba(140, 170, 255, .20);
  background: linear-gradient(160deg, rgba(255,255,255,.085), rgba(255,255,255,.025));
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    0 26px 60px -34px rgba(0, 0, 0, .95),
    inset 0 1px 0 rgba(255, 255, 255, .13),
    inset 0 -22px 44px -32px rgba(124, 155, 255, .55);
  align-self: flex-start;
  overflow: hidden;
  transition: border-color .3s;
}
.clock-card:hover { border-color: rgba(150, 180, 255, .34); }
.clock-card::after {
  content: ''; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  opacity: .55;
}

.clock-main { display: flex; flex-direction: column; gap: 8px; }
.clock-time {
  font-size: clamp(30px, 7.6vw, 44px);
  font-weight: 600; line-height: 1.05; letter-spacing: .045em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, #ffffff 0%, #cfe0ff 45%, #c9b6ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.clock-date { font-size: 13.5px; letter-spacing: .02em; color: #a8b8d6; }
.clock-lunar { display: flex; gap: 8px; flex-wrap: wrap; }
.clock-chip {
  display: inline-block; padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px; line-height: 1.5;
  color: #b9c8ea;
  background: rgba(124, 155, 255, .10);
  border: 1px solid rgba(124, 155, 255, .22);
}

/* 右栏：节气 */
.clock-divider {
  width: 1px; flex: none;
  background: linear-gradient(180deg, transparent, rgba(150,180,255,.32), transparent);
}
.clock-jieqi {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  min-width: 92px;
}
.jq-name {
  font-family: 'Songti SC', 'STSong', 'Noto Serif SC', serif;
  font-size: 27px; font-weight: 600; line-height: 1.1; letter-spacing: .1em;
  background: linear-gradient(150deg, #ffffff 0%, #b7ccff 60%, #c9a9ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.jq-sub { font-size: 12px; line-height: 1.6; color: #8b9cbb; }

@media (max-width: 560px) {
  .greet-block { margin-top: 26px; gap: 9px; }
  .clock-greet { font-size: 14px; }
  .clock-card { width: 100%; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
  .clock-divider {
    width: auto; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(150,180,255,.32), transparent);
  }
  .clock-jieqi { flex-direction: row; align-items: center; gap: 12px; min-width: 0; }
  .jq-name { font-size: 22px; }
  .clock-time { font-size: 34px; }
}

/* ============ 桌面端排版（≥1025px，不影响手机） ============ */
@media (min-width: 1025px) {
  /* 恢复被“移动端全宽”规则冲掉的宽度上限，让内容居中不散开 */
  .hero {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
  }
  .clock-time { font-size: clamp(40px, 3.2vw, 56px); }
  .lead { max-width: 30em; }
  .about-grid { gap: 16px; }
}

/* 超大屏再放宽一点，避免两侧空白过多 */
@media (min-width: 1680px) {
  .hero { max-width: 1280px; }
}
