:root {
  --bg: #080b14;
  --bg2: #0d1220;
  --card: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef2fb;
  --dim: #9aa6c2;
  --hot: #ff6a3d;
  --cool: #35e0c4;
  --blue: #4d7cfe;
  --r: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, Consolas, monospace; background: rgba(255, 255, 255, 0.09); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }

.wrap { width: min(1180px, 92vw); margin: 0 auto; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 11, 20, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 1px; font-size: 18px; }
.brand-ball { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(from 220deg, var(--hot), var(--blue), var(--cool), var(--hot)); box-shadow: 0 0 16px rgba(255, 106, 61, 0.6); }
.links { display: flex; gap: 26px; font-size: 15px; color: var(--dim); }
.links a:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 64px) 0 72px; }
.hero-bg {
  position: absolute; inset: -10% -5% auto -5%; height: 130%;
  background: url("assets/hero.png") center 38% / cover no-repeat;
  filter: saturate(1.05);
  opacity: 0.4;
  mask-image: linear-gradient(#000 55%, transparent 96%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(1100px 500px at 85% -10%, rgba(77, 124, 254, 0.22), transparent 60%),
              radial-gradient(900px 420px at 5% 10%, rgba(255, 106, 61, 0.18), transparent 62%);
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: clamp(24px, 4vw, 52px); align-items: start;
}
.tagline { display: inline-block; font-size: 13px; letter-spacing: 3px; color: var(--cool); border: 1px solid rgba(53, 224, 196, 0.35); padding: 5px 12px; border-radius: 999px; margin: 18px 0 20px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.22; margin: 0 0 16px; font-weight: 800; letter-spacing: -0.5px; }
.hl { background: linear-gradient(92deg, var(--hot), #ffb457 60%, var(--cool)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--dim); max-width: 46ch; margin: 0 0 26px; font-size: 17px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { padding: 13px 26px; border-radius: 999px; font-weight: 700; transition: 0.2s; border: 1px solid transparent; }
.btn.primary { background: linear-gradient(100deg, var(--hot), #ff9146); box-shadow: 0 12px 30px rgba(255, 106, 61, 0.35); }
.btn.primary:hover { transform: translateY(-2px); }
.btn.ghost { border-color: var(--line); color: var(--dim); }
.btn.ghost:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }

/* ---------- chat ---------- */
.chat-card {
  background: linear-gradient(180deg, rgba(19, 25, 42, 0.94), rgba(12, 16, 28, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--r);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.who { display: flex; align-items: center; gap: 12px; }
.who strong { display: block; font-size: 16px; }
.who small { color: var(--dim); font-size: 12.5px; }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--blue), var(--cool)); color: #04121a; }
.clear { background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; }
.clear:hover { color: var(--text); }

.msgs { padding: 16px; height: clamp(260px, 38vh, 340px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.6; }
.msg.me { align-self: flex-end; background: linear-gradient(120deg, #2b62ff, #4d7cfe); border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.sys { align-self: center; text-align: center; background: rgba(255, 106, 61, 0.12); border: 1px solid rgba(255, 106, 61, 0.32); color: #ffc7ad; font-size: 13px; max-width: 96%; }
.msg.pending::after { content: "▋"; margin-left: 2px; color: var(--cool); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.chips { display: flex; gap: 8px; padding: 0 16px 12px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--dim); border-radius: 999px; padding: 6px 13px; font-size: 13px; cursor: pointer; transition: 0.15s; }
.chip:hover { color: var(--text); border-color: rgba(53, 224, 196, 0.5); }

.composer { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
#input { flex: 1; min-width: 0; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 12px 14px; font-size: 15px; font-family: inherit; }
#input:focus { outline: none; border-color: rgba(77, 124, 254, 0.7); }
.send { background: var(--hot); color: #0b0b0b; border: none; border-radius: 12px; padding: 0 22px; font-weight: 800; cursor: pointer; font-size: 15px; font-family: inherit; }
.send[disabled] { opacity: 0.5; cursor: not-allowed; }
.kb { padding: 9px 16px; border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 12px; color: #7f8aa4; }
.kb b { color: var(--cool); font-weight: 600; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section.alt { background: linear-gradient(180deg, var(--bg2), var(--bg)); border-block: 1px solid var(--line); }
.sec-title { font-size: clamp(24px, 3.2vw, 36px); margin: 0 0 10px; font-weight: 800; }
.sec-title::before { content: ""; display: inline-block; width: 30px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--hot), var(--cool)); vertical-align: middle; margin-right: 14px; }
.sec-sub { color: var(--dim); margin: 0 0 34px; }

.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; transition: 0.2s; }
.card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.22); }
.card.accent { background: linear-gradient(160deg, rgba(77, 124, 254, 0.16), rgba(53, 224, 196, 0.07)); }
.card-ico { font-size: 13px; letter-spacing: 2px; color: var(--hot); font-weight: 800; margin-bottom: 10px; }
.card h3 { margin: 0 0 10px; font-size: 19px; }
.card p { margin: 0; color: #c3cbe0; font-size: 15px; }
.lines { list-style: none; padding: 0; margin: 0; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.09); font-size: 15px; }
.lines li:last-child { border-bottom: 0; }
.lines span { color: var(--dim); }

.anime-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; }
.anime { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); display: flex; flex-direction: column; transition: 0.2s; }
.anime:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4); }
.cover { height: 118px; display: flex; align-items: flex-end; padding: 14px 16px; position: relative; }
.cover .t { font-size: 22px; font-weight: 800; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5); }
.cover .rank { position: absolute; top: 12px; right: 14px; font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, 0.42); border-radius: 999px; padding: 3px 10px; }
.anime-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.meta { color: var(--dim); font-size: 13px; }
.why { margin: 0; font-size: 14.5px; color: #cdd5e8; flex: 1; }
.tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tag { font-size: 12px; color: var(--cool); border: 1px solid rgba(53, 224, 196, 0.3); border-radius: 6px; padding: 2px 8px; }

.footer { padding: 34px 0 44px; color: #7c869c; font-size: 14px; border-top: 1px solid var(--line); }
.footer a { color: var(--cool); }

.float-chat {
  position: fixed; right: 22px; bottom: 24px; z-index: 60;
  background: linear-gradient(120deg, var(--hot), #ff9146); color: #0b0b0b; font-weight: 800;
  padding: 12px 20px; border-radius: 999px; box-shadow: 0 14px 34px rgba(255, 106, 61, 0.45);
  opacity: 0; transform: translateY(14px); pointer-events: none; transition: 0.25s;
}
.float-chat.show { opacity: 1; transform: none; pointer-events: auto; }

@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; }
  .links { gap: 16px; font-size: 14px; }
  .msgs { height: 300px; }
}
