/* ========== BRANCHES v3 —— 前卫堆叠风 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0e1c;
  --ink: #e8ecf4;
  --dim: #8b93a7;
  --card-border: rgba(255, 255, 255, 0.16);
  --shadow-hard: 8px 8px 0 rgba(0, 0, 0, 0.45);
  --shadow-hard-sm: 5px 5px 0 rgba(0, 0, 0, 0.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- 背景：霓虹光斑 ---------- */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
.glow-1 { width: 460px; height: 460px; background: #38bdf8; top: -140px; left: -120px; animation: drift 15s ease-in-out infinite alternate; }
.glow-2 { width: 400px; height: 400px; background: #a855f7; top: 32%; right: -130px; animation: drift 19s ease-in-out infinite alternate-reverse; }
.glow-3 { width: 340px; height: 340px; background: #f59e0b; bottom: -110px; left: 26%; animation: drift 22s ease-in-out infinite alternate; }

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(46px, -34px) scale(1.18); }
}

/* 噪点纹理 */
.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* 背景大字 */
.bg-word {
  position: fixed;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-6deg);
  font-size: clamp(120px, 26vw, 320px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(10, 14, 28, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 2px solid var(--card-border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { font-size: 26px; filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.6)); }
.brand-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.06em;
  font-style: italic;
  background: linear-gradient(90deg, #38bdf8, #a855f7, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dot-accent { -webkit-text-fill-color: #f59e0b; }
.brand-sub { font-size: 12px; color: var(--dim); letter-spacing: 0.2em; }

.top-actions { display: flex; align-items: center; gap: 12px; }
.admin-link {
  font-size: 20px;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.3s;
}
.admin-link:hover { opacity: 1; transform: rotate(90deg); }

.status-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--card-border);
  background: rgba(15, 23, 42, 0.5);
}
.status-pill.online { color: #34d399; border-color: rgba(52, 211, 153, 0.35); }
.status-pill.offline { color: #f87171; border-color: rgba(248, 113, 113, 0.35); }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- 容器 ---------- */
.container {
  position: relative;
  z-index: 1;
  max-width: 1020px;
  margin: 0 auto;
  padding: 28px 20px 50px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.section-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.title-en {
  font-size: 13px;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: 0.3em;
  font-style: italic;
  margin-left: 8px;
}
.section-sub { font-size: 13px; color: var(--dim); margin-top: 3px; }

/* ---------- 卡片基础（硬阴影堆叠感） ---------- */
.card {
  background: rgba(24, 32, 56, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 26px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-hard);
  position: relative;
}

/* 轻微倾斜的贴纸感 */
.tilt-l { transform: rotate(-0.6deg); }
.tilt-r { transform: rotate(0.6deg); }

/* ========== 留言墙 ========== */
.wall-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(168, 85, 247, 0.14)), rgba(24, 32, 56, 0.72);
  border-color: rgba(56, 189, 248, 0.35);
}
.wall-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.wall-count {
  font-size: 13px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.wall-form { display: flex; gap: 10px; flex-wrap: wrap; }
.wall-input {
  background: rgba(10, 14, 28, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: var(--ink);
  padding: 11px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wall-input:focus { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15); }
.wall-input.nick { width: 140px; }
.wall-input.text { flex: 1; min-width: 200px; }

.btn-send {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  border: 2px solid rgba(0, 0, 0, 0.3);
  color: #fff;
  padding: 11px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn-send:hover { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.45); }
.btn-send:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45); }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

.wall-tip { min-height: 20px; font-size: 12.5px; color: #fbbf24; margin-top: 8px; }
.wall-tip.ok { color: #34d399; }
.wall-tip.err { color: #f87171; }

.wall-private {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--dim);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.wall-private:hover { color: #fbbf24; }
.wall-private input { accent-color: #f59e0b; width: 15px; height: 15px; cursor: pointer; }

.wall-list { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.wall-list::-webkit-scrollbar { width: 6px; }
.wall-list::-webkit-scrollbar-thumb { background: rgba(139, 147, 167, 0.35); border-radius: 3px; }

.wall-msg {
  background: rgba(10, 14, 28, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 16px;
  animation: popIn 0.35s ease;
}
.wall-msg.private {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.07);
}
.wall-msg .wall-private-badge { font-size: 11px; color: #f59e0b; font-weight: 600; margin-left: 6px; }
.wall-msg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.wall-msg-nick { font-size: 13px; font-weight: 700; color: #38bdf8; }
.wall-msg-time { font-size: 11px; color: var(--dim); }
.wall-msg-content { font-size: 14px; line-height: 1.6; word-break: break-word; }
.wall-empty { text-align: center; color: var(--dim); font-size: 14px; padding: 24px 0; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ========== 工具卡片：堆叠网格 ========== */
.tools-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px 18px;
  border-radius: 16px;
  background: rgba(24, 32, 56, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.15);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

/* 每个卡片不同的堆叠偏移 + 旋转 */
.tool-card:nth-child(3n+1) { transform: rotate(-1.2deg) translateY(4px); }
.tool-card:nth-child(3n+2) { transform: rotate(1deg) translateY(-2px); }
.tool-card:nth-child(3n)   { transform: rotate(-0.4deg) translateY(6px); }

.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--ac, #38bdf8), transparent 60%);
  opacity: 0.1;
  pointer-events: none;
}

.tool-card:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.02);
  box-shadow: 10px 12px 0 rgba(0, 0, 0, 0.5), 0 0 24px color-mix(in srgb, var(--ac, #38bdf8) 45%, transparent);
  border-color: var(--ac, #38bdf8);
  z-index: 5;
}

.tool-tag {
  position: absolute;
  top: -12px;
  right: 14px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 0 12px rgba(245, 158, 11, 0.5);
  transform: rotate(6deg);
  z-index: 3;
  pointer-events: none;
}
.tool-icon { font-size: 36px; margin-bottom: 4px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3)); }
.tool-title { font-size: 16px; font-weight: 800; letter-spacing: 0.01em; }
.tool-desc { font-size: 12.5px; color: var(--dim); line-height: 1.5; min-height: 34px; }
.tool-go {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ac, #38bdf8);
  letter-spacing: 0.05em;
}

/* 卡片主题色 */
.tc-amber  { --ac: #f59e0b; }
.tc-sky    { --ac: #38bdf8; }
.tc-violet { --ac: #a78bfa; }
.tc-green  { --ac: #34d399; }
.tc-pink   { --ac: #f472b6; }
.tc-red    { --ac: #f87171; }
.tc-lime   { --ac: #a3e635; }
.tc-cyan   { --ac: #22d3ee; }
.tc-fuchsia{ --ac: #e879f9; }
.tc-orange { --ac: #fb923c; }
.tc-indigo { --ac: #818cf8; }
.tc-teal   { --ac: #2dd4bf; }
.tc-rose   { --ac: #fb7185; }
.tc-slate  { --ac: #94a3b8; }
.tc-gold   { --ac: #facc15; }
.tc-blue   { --ac: #60a5fa; }

/* ========== CTA ========== */
.cta-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(168, 85, 247, 0.16)), rgba(24, 32, 56, 0.72);
}
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-text .section-sub { margin-top: 6px; }
.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #fff;
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 800;
  border: 2px solid rgba(0, 0, 0, 0.3);
  box-shadow: var(--shadow-hard-sm);
  white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.12s;
}
.cta-btn:hover { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.45); }
.cta-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45); }
.arrow { display: inline-block; transition: transform 0.15s; }
.cta-btn:hover .arrow { transform: translateX(4px); }

/* ========== Footer ========== */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 10px 20px 36px;
  color: var(--dim);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.beian { color: var(--dim); text-decoration: none; font-size: 12px; transition: color 0.2s; display: inline-flex; align-items: center; gap: 5px; }
.beian:hover { color: #38bdf8; text-decoration: underline; }
.beian-icon { height: 12px; width: auto; display: inline-block; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 640px) {
  .container { padding: 18px 12px 36px; }
  .topbar { padding: 12px 16px; }
  .brand-name { font-size: 18px; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .tool-card:nth-child(3n+1), .tool-card:nth-child(3n+2), .tool-card:nth-child(3n) { transform: rotate(0); }
  .tool-icon { font-size: 30px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
