/* 栖云居 · QiyunJu —— 官网样式 v2（高级动效版） */

:root {
  --bg: #17171a;
  --panel: rgba(34, 34, 38, 0.9);
  --panel-solid: #26262a;
  --panel-hi: #333338;
  --line-dark: #000;
  --line: #43434a;
  --line-hi: #56565e;
  --text: #f0f0f0;
  --text-dim: #c2c2c6;
  --text-faint: #94949a;
  --green: #55ff55;
  --green-bright: #7dff7d;
  --green-mid: #2e9e2e;
  --pink: #e39cc0;
  --pink-bright: #f2b8d8;
  --red: #ff5555;
  --blue: #55aaff;
  --gold: #ffd54a;
}

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

html {
  scroll-behavior: smooth;
}

html, body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Minecraft", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 80% 55% at 50% -10%, #242429, transparent 60%);
}

::selection { background: rgba(255,85,255,.25); color: #fff; }

a { color: var(--pink); text-decoration: none; transition: color .15s; }
a:hover { color: var(--pink-bright); }
a:hover, .btn:hover { text-decoration: none; }

/* ===== 粒子背景层 ===== */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== 樱花花瓣层 ===== */
.petals { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.petal {
  position: absolute;
  top: -26px;
  border-radius: 70% 12% 70% 12%;
  animation: petal-fall linear infinite;
  will-change: transform, opacity;
}
@keyframes petal-fall {
  0%   { transform: translate3d(0, -6vh, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: var(--o, .5); }
  85%  { opacity: var(--o, .5); }
  100% { transform: translate3d(var(--sway, 40px), 110vh, 0) rotate(320deg); opacity: 0; }
}

/* ===== 顶部导航 ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 26, 30, 0.85);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 4px 30px rgba(0,0,0,.4);
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled {
  background: rgba(20, 20, 24, 0.95);
  box-shadow: 0 4px 40px rgba(0,0,0,.6);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  height: 62px;
  gap: 26px;
}
.nav-brand {
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  text-shadow: 0 2px 0 #000;
  transition: color .2s;
}
.nav-brand:hover { color: var(--pink); }
.nav-brand .nav-logo {
  width: 26px; height: 26px;
  object-fit: contain;
  border: 2px solid #000;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  image-rendering: pixelated;
}
.nav-links { display: flex; gap: 6px; margin-left: 6px; flex: 1; }
.nav-links a {
  color: var(--text-dim);
  padding: 8px 16px;
  font-size: 14.5px;
  letter-spacing: .5px;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: color .2s, background .2s, transform .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: var(--pink);
  transition: width .3s ease, left .3s ease;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-links a:hover::after { width: 60%; left: 20%; }
.nav-links a.active { color: var(--pink); background: rgba(227,156,192,.08); }
.nav-links a.active::after { width: 80%; left: 10%; }
.nav-user { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.nav-user b { color: var(--pink); font-weight: 600; }

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 2;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 150px 22px 130px;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(20,20,24,.72) 0%, rgba(18,18,22,.6) 45%, rgba(16,16,20,.88) 100%),
    url('../bg.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 60% at 50% 42%, rgba(227,156,192,.07), transparent 70%);
}
.hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
  z-index: 2;
}
.hero > * { position: relative; z-index: 3; }

.hero .logo-big {
  width: 140px; height: 140px;
  margin: 0 auto 30px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(227,156,192,.4)) drop-shadow(0 0 60px rgba(227,156,192,.15));
  image-rendering: pixelated;
  animation: logoReveal 1.2s cubic-bezier(.16,1,.3,1) both;
}
@keyframes logoReveal {
  0% { opacity: 0; transform: scale(.5) rotate(-10deg); filter: blur(10px) drop-shadow(0 0 24px rgba(227,156,192,.4)); }
  60% { opacity: 1; transform: scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); filter: drop-shadow(0 0 24px rgba(227,156,192,.4)) drop-shadow(0 0 60px rgba(227,156,192,.15)); }
}

.hero .sub {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 17px;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 rgba(0,0,0,.6);
  animation: fadeInUp .8s cubic-bezier(.16,1,.3,1) .3s both;
}
.hero .sub b { color: #fff; }

.hero .ip-row {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp .8s cubic-bezier(.16,1,.3,1) .5s both;
}
.hero .ip {
  font-family: Consolas, monospace;
  font-size: 32px;
  color: #fff;
  letter-spacing: 3px;
  text-shadow: 0 2px 0 #000, 0 0 30px rgba(227,156,192,.2);
  user-select: all;
  position: relative;
}
.hero .ip::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pink), transparent);
  opacity: 0;
  transition: opacity .3s;
}
.hero .ip-row:hover .ip::after { opacity: 1; }

.hero .ip-hint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: .5px;
  animation: fadeIn .6s ease-out .7s both;
}

/* ===== 布局 ===== */
.container { max-width: 1120px; margin: 0 auto; padding: 60px 22px 80px; position: relative; z-index: 2; }

/* ===== 通用卡片 ===== */
.card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px;
  border-radius: 8px;
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 48px rgba(0,0,0,.4), 0 0 0 1px rgba(227,156,192,.1);
}

/* ===== 区块标题 ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 23px;
  color: #fff;
  letter-spacing: 1px;
  margin: 56px 0 20px;
  text-shadow: 0 2px 0 #000;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--pink-bright), var(--pink));
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(227,156,192,.4);
}
.section-title .more { margin-left: auto; font-size: 13px; font-weight: 400; letter-spacing: 0; }

/* ===== 玩法卡片 3D 倾斜 ===== */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; perspective: 800px; }
.feat-card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  padding: 32px 24px;
  text-align: center;
  border-radius: 12px;
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s;
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
  overflow: hidden;
}
.feat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(227,156,192,.3), transparent 40%, transparent 60%, rgba(85,170,255,.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s;
}
.feat-card:hover::before { opacity: 1; }
.feat-card:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 40px rgba(227,156,192,.08);
}
.feat-card .f-icon {
  display: block;
  font-size: 42px;
  margin-bottom: 16px;
  transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.feat-card:hover .f-icon { transform: scale(1.2) translateZ(20px); }
.feat-card h3 {
  color: #fff; font-size: 18px; letter-spacing: 1px;
  text-shadow: 0 2px 0 #000;
  transition: transform .3s;
}
.feat-card:hover h3 { transform: translateZ(10px); }
.feat-card p { color: var(--text-dim); font-size: 13.5px; line-height: 1.95; margin-top: 10px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 12px 26px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(180deg, #909090, #6c6c6c);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.3), inset -2px -2px 0 rgba(0,0,0,.4), 0 4px 0 rgba(0,0,0,.55);
  text-shadow: 0 2px 0 rgba(0,0,0,.5);
  transition: filter .2s, transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.4), inset -2px -2px 0 rgba(255,255,255,.15), 0 1px 0 rgba(0,0,0,.5); }
.btn.primary { background: linear-gradient(180deg, var(--green-bright), var(--green-mid)); }
.btn.primary:hover { box-shadow: inset 2px 2px 0 rgba(255,255,255,.3), inset -2px -2px 0 rgba(0,0,0,.4), 0 4px 0 rgba(0,0,0,.55), 0 0 20px rgba(85,255,85,.25); }
.btn.danger { background: linear-gradient(180deg, #c03a3a, #8a2626); }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.big { padding: 18px 48px; font-size: 19px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }

/* 按钮涟漪 */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  transform: scale(0);
  animation: rippleAnim .6s ease-out;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ===== 输入 ===== */
input[type="text"], input[type="password"], input[type="email"], textarea, select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(22, 22, 26, 0.9);
  border: 1px solid rgba(255,255,255,.08);
  outline: none;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  border-radius: 6px;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(227,156,192,.12), 0 0 20px rgba(227,156,192,.06);
  background: rgba(26, 26, 30, 1);
}
textarea { resize: vertical; min-height: 80px; }
label { display: block; font-size: 13px; color: var(--text-dim); margin: 16px 0 8px; letter-spacing: .5px; }

.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 180px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.code-row { display: flex; gap: 10px; align-items: center; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { white-space: nowrap; flex-shrink: 0; }

.msg {
  margin-top: 16px;
  padding: 12px 14px;
  font-size: 13.5px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.06);
  display: none;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.7;
}
.msg.error { display: block; background: rgba(58,16,16,.85); color: #ff9191; }
.msg.ok { display: block; background: rgba(48,32,44,.85); color: var(--pink-bright); }

/* ===== 页头 ===== */
.page-banner {
  text-align: center;
  padding: 84px 22px 46px;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(255,255,255,.04);
  background: radial-gradient(ellipse 60% 120% at 50% 0%, rgba(227,156,192,.06), transparent 70%);
}
.page-banner h1 {
  font-size: 36px; color: #fff; letter-spacing: 4px;
  text-shadow: 0 3px 0 #000;
}
.page-banner h1 .yq { color: var(--pink); }
.page-banner p { margin-top: 12px; color: var(--text-dim); font-size: 14px; letter-spacing: 1px; }

/* ===== 更新日志 ===== */
.cl-item {
  border-left: 3px solid var(--pink);
  padding: 6px 0 6px 22px;
  margin-bottom: 28px;
  position: relative;
}
.cl-item::before {
  content: '';
  position: absolute;
  left: -5px; top: 12px;
  width: 7px; height: 7px;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(227,156,192,.5);
}
.cl-item .cl-date { font-size: 12px; color: var(--text-faint); font-family: Consolas, monospace; letter-spacing: .5px; }
.cl-item h3 { color: #fff; font-size: 18px; margin: 6px 0 10px; text-shadow: 0 2px 0 #000; }
.cl-item .cl-content { color: var(--text); font-size: 14px; line-height: 1.9; white-space: pre-wrap; }

/* ===== 公告 ===== */
.announce {
  background: rgba(36, 30, 34, 0.7);
  border: 1px solid rgba(227,156,192,.1);
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: 8px;
  transition: border-color .3s, transform .2s;
}
.announce:hover { border-color: rgba(227,156,192,.25); transform: translateX(4px); }
.announce .a-title { color: var(--pink); font-weight: 600; font-size: 14.5px; letter-spacing: .5px; }
.announce .a-date { font-size: 11px; color: var(--text-faint); float: right; font-family: Consolas, monospace; }
.announce .a-content { margin-top: 8px; font-size: 13px; color: var(--text); line-height: 1.85; white-space: pre-wrap; }

/* ===== 你知道吗 ===== */
.tips { font-size: 14px; color: var(--text); line-height: 1.8; }
.tips .tip-mark { color: var(--pink); margin-right: 8px; }

/* ===== 表格 ===== */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.06); text-align: left; }
th { color: var(--text-dim); font-weight: 600; background: rgba(255,255,255,.03); letter-spacing: .5px; }
td code, code { color: var(--pink-bright); font-family: Consolas, monospace; font-size: 12.5px; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(255,255,255,.03); }

/* ===== API 文档 ===== */
.api-block { margin-bottom: 28px; }
.api-block h3 { color: #fff; font-size: 16px; margin-bottom: 10px; }
.api-method {
  display: inline-block;
  font-family: Consolas, monospace;
  font-size: 12px; font-weight: 700;
  padding: 3px 9px;
  margin-right: 10px;
  vertical-align: 2px;
  border-radius: 4px;
}
.method-get { background: #0a2a4a; color: var(--blue); }
.method-post { background: rgba(227,156,192,.14); color: var(--pink-bright); }
.api-url { font-family: Consolas, monospace; font-size: 13px; color: #fff; word-break: break-all; }
pre {
  background: rgba(22, 22, 26, 0.92);
  border: 1px solid rgba(255,255,255,.06);
  padding: 14px 16px;
  font-family: Consolas, monospace;
  font-size: 12.5px;
  color: #e6e6e6;
  overflow-x: auto;
  line-height: 1.75;
  margin-top: 10px;
  border-radius: 8px;
}
.hint { font-size: 12px; color: var(--text-faint); line-height: 1.8; margin-top: 8px; }

/* ===== 标签页 ===== */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 2px solid rgba(255,255,255,.06); }
.tab {
  padding: 11px 20px; cursor: pointer;
  color: var(--text-dim); font-size: 14px;
  border: none; border-bottom: 2px solid transparent;
  user-select: none;
  transition: color .2s, border-color .2s, background .2s;
  margin-bottom: -2px;
}
.tab:hover { color: #fff; }
.tab.active { color: var(--pink); border-bottom-color: var(--pink); }

.view { display: none; }
.view.active { display: block; }

.key-box {
  margin-top: 6px;
  background: rgba(22, 22, 26, 0.92);
  border: 1px solid rgba(255,255,255,.06);
  padding: 13px;
  font-family: Consolas, monospace;
  font-size: 13px;
  color: var(--pink-bright);
  word-break: break-all;
  user-select: all;
  line-height: 1.6;
  border-radius: 6px;
}

/* ===== 聊天室 ===== */
.chat-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.chat-main { display: flex; flex-direction: column; height: 560px; }
.chat-log {
  flex: 1; overflow-y: auto;
  background: rgba(22, 22, 26, 0.9);
  border: 1px solid rgba(255,255,255,.06);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  border-radius: 8px;
}
.chat-msg { max-width: 85%; line-height: 1.55; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-msg .cm-head { font-size: 12px; color: var(--text-faint); margin-bottom: 3px; }
.chat-msg.mine .cm-head { text-align: right; }
.chat-msg .cm-head b { color: var(--pink); font-weight: 600; }
.chat-msg .cm-body {
  display: inline-block;
  background: rgba(48, 48, 54, 0.9);
  border: 1px solid rgba(255,255,255,.06);
  padding: 9px 13px;
  font-size: 14px;
  text-align: left;
  word-break: break-word;
  white-space: pre-wrap;
  border-radius: 8px;
}
.chat-msg.mine .cm-body { background: rgba(46,30,42,.9); }
.chat-msg .cm-body img { max-width: 260px; max-height: 220px; border: 1px solid rgba(255,255,255,.06); display: block; cursor: zoom-in; border-radius: 6px; }
.chat-msg .cm-body audio { max-width: 260px; }
.chat-input-row { display: flex; gap: 8px; margin-top: 10px; }
.chat-input-row input { flex: 1; }
.chat-side { display: flex; flex-direction: column; gap: 16px; }

.empty { color: var(--text-faint); font-size: 13px; padding: 24px 0; text-align: center; }

/* ===== 页脚 ===== */
.footer {
  border-top: 1px solid rgba(255,255,255,.04);
  background: rgba(20, 20, 24, 0.9);
  padding: 34px 16px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12.5px;
  line-height: 2;
  letter-spacing: .3px;
  position: relative;
  z-index: 2;
}
.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--pink); }

/* ===== 光标跟随光晕 ===== */
.cursor-glow {
  position: fixed;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227,156,192,.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity .3s;
  will-change: left, top;
}

/* ===== 数字计数器 ===== */
.stat-num {
  font-family: Consolas, monospace;
  font-size: 42px;
  font-weight: 700;
  color: var(--pink-bright);
  text-shadow: 0 0 20px rgba(227,156,192,.3);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== 打字机光标 ===== */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--pink);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink .8s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== 渐变动画边框 ===== */
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle, 0deg), var(--pink), var(--blue), var(--green), var(--gold), var(--pink));
  z-index: -1;
  opacity: 0;
  transition: opacity .4s;
  animation: rotateBorder 4s linear infinite;
}
.gradient-border:hover::before { opacity: 1; }
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes rotateBorder {
  to { --angle: 360deg; }
}

@media (max-width: 860px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-main { height: 480px; }
  .hero { min-height: 65vh; padding: 110px 18px 100px; }
  .hero .logo-big { width: 96px; height: 96px; }
  .hero .ip { font-size: 22px; letter-spacing: 1px; }
  .nav-inner { flex-wrap: wrap; height: auto; padding: 10px 18px; gap: 8px; }
  .nav-links { order: 3; width: 100%; margin: 0; }
  .page-banner h1 { font-size: 26px; letter-spacing: 2px; }
  .cursor-glow { display: none; }
}
