/* ============================================================
   清欢页面托管（/html）独立样式
   玻璃拟态（Glassmorphism）· 深蓝紫渐变 · 与主站视觉完全独立
   ============================================================ */
:root {
  --hh-primary: #4F6EF7;
  --hh-primary-2: #6B8CFF;
  --hh-primary-3: #3D5AF1;
  --hh-bg-1: #0F1533;
  --hh-bg-2: #1A2050;
  --hh-bg-3: #2A2F6E;
  --hh-text: #FFFFFF;
  --hh-text-dim: #C8CDF5;
  --hh-green: #22C55E;
  --hh-red: #EF4444;
  --hh-amber: #F59E0B;
  --hh-glass: rgba(255, 255, 255, 0.07);
  --hh-glass-strong: rgba(255, 255, 255, 0.12);
  --hh-border: rgba(255, 255, 255, 0.14);
  --hh-radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.hh-body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--hh-bg-1) 0%, var(--hh-bg-2) 55%, var(--hh-bg-3) 100%);
  color: var(--hh-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ---------- 背景光斑 ---------- */
.hh-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hh-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
.hh-blob-1 { width: 420px; height: 420px; background: #4F6EF7; top: -120px; left: -100px; animation: hhFloat 14s ease-in-out infinite; }
.hh-blob-2 { width: 360px; height: 360px; background: #7C5CF0; bottom: -120px; right: -80px; animation: hhFloat 18s ease-in-out infinite reverse; }
.hh-blob-3 { width: 260px; height: 260px; background: #3D5AF1; top: 40%; left: 55%; animation: hhFloat 22s ease-in-out infinite; }
@keyframes hhFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.12); }
}

/* ---------- 顶栏 ---------- */
.hh-topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 24px;
  padding: 16px 32px;
  background: rgba(15, 21, 51, 0.55);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--hh-border);
}
.hh-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--hh-text); }
.hh-brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--hh-primary), var(--hh-primary-3));
  border-radius: 10px; color: #fff; box-shadow: 0 4px 18px rgba(79, 110, 247, .45);
}
.hh-brand-mark svg { width: 18px; height: 18px; }
.hh-brand-text { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.hh-nav { display: flex; gap: 6px; margin-left: 12px; }
.hh-nav-link {
  color: var(--hh-text-dim); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 10px; transition: all .2s ease;
}
.hh-nav-link:hover { color: #fff; background: var(--hh-glass); }
.hh-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hh-username { font-size: 14px; color: var(--hh-text-dim); }
.hh-username b { color: #fff; }

/* ---------- 主区 ---------- */
.hh-main { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 48px 24px 64px; }
.hh-eyebrow { font-size: 12px; letter-spacing: 3px; color: var(--hh-primary-2); font-weight: 600; margin-bottom: 10px; }
.hh-title { font-size: 28px; font-weight: 700; line-height: 1.3; }
.hh-sub { font-size: 15px; color: var(--hh-text-dim); margin-top: 8px; line-height: 1.7; }

/* ---------- 玻璃卡片 ---------- */
.hh-card {
  margin-top: 28px;
  background: var(--hh-glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--hh-border);
  border-radius: var(--hh-radius);
  padding: 28px;
  box-shadow: 0 18px 48px rgba(5, 8, 25, .4);
}

/* ---------- 按钮 ---------- */
.hh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; text-decoration: none;
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 11px 22px; border-radius: 12px;
  transition: all .22s ease; user-select: none;
}
.hh-btn-primary {
  background: linear-gradient(135deg, var(--hh-primary) 0%, var(--hh-primary-3) 100%);
  color: #fff; box-shadow: 0 6px 22px rgba(79, 110, 247, .4);
}
.hh-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(79, 110, 247, .55); }
.hh-btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.hh-btn-ghost { background: var(--hh-glass); color: var(--hh-text); border: 1px solid var(--hh-border); }
.hh-btn-ghost:hover { background: var(--hh-glass-strong); }
.hh-btn-ghost:disabled { opacity: .45; cursor: not-allowed; }
.hh-btn-danger { background: rgba(239, 68, 68, .16); color: #ff9b9b; border: 1px solid rgba(239, 68, 68, .35); }
.hh-btn-danger:hover { background: rgba(239, 68, 68, .3); color: #fff; }
.hh-btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.hh-btn-block { width: 100%; }

/* ---------- 表单 ---------- */
.hh-field { margin-bottom: 18px; }
.hh-label { display: block; font-size: 13px; font-weight: 600; color: var(--hh-text-dim); margin-bottom: 8px; }
.hh-input, .hh-textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: #fff;
  background: rgba(10, 14, 36, .5); border: 1px solid var(--hh-border);
  border-radius: 12px; padding: 12px 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.hh-input:focus, .hh-textarea:focus {
  border-color: var(--hh-primary-2);
  box-shadow: 0 0 0 3px rgba(79, 110, 247, .25);
}
.hh-input::placeholder, .hh-textarea::placeholder { color: rgba(200, 205, 245, .4); }
.hh-textarea { min-height: 260px; resize: vertical; font-family: "JetBrains Mono", Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.65; }
.hh-field-hint { font-size: 12px; margin-top: 6px; color: var(--hh-text-dim); }
.hh-field-hint.ok { color: var(--hh-green); }
.hh-field-hint.err { color: var(--hh-red); }
.hh-input.invalid { border-color: var(--hh-red); }
.hh-input.valid { border-color: var(--hh-green); }

.hh-row { display: flex; gap: 10px; }
.hh-row .hh-input { flex: 1; }

/* ---------- 标签切换（模式 / 认证态） ---------- */
.hh-tabs {
  position: relative; display: inline-flex; gap: 4px;
  background: rgba(10, 14, 36, .5); border: 1px solid var(--hh-border);
  border-radius: 13px; padding: 5px; margin-bottom: 22px; width: 100%;
}
.hh-tab {
  position: relative; z-index: 1; flex: 1; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--hh-text-dim);
  padding: 10px 8px; border-radius: 9px; cursor: pointer;
  border: none; background: transparent; font-family: inherit;
  transition: color .25s ease; white-space: nowrap;
}
.hh-tab.active { color: #fff; }
.hh-tab-indicator {
  position: absolute; z-index: 0; top: 5px; bottom: 5px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--hh-primary), var(--hh-primary-3));
  box-shadow: 0 4px 16px rgba(79, 110, 247, .45);
  transition: left .3s cubic-bezier(.4, 0, .2, 1), width .3s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 上传区 ---------- */
.hh-dropzone {
  border: 2px dashed rgba(107, 140, 255, .4); border-radius: 14px;
  padding: 46px 24px; text-align: center; cursor: pointer;
  transition: all .25s ease; background: rgba(10, 14, 36, .3);
}
.hh-dropzone:hover, .hh-dropzone.dragover {
  border-color: var(--hh-primary-2); background: rgba(79, 110, 247, .1);
  transform: translateY(-1px);
}
.hh-dropzone-icon { color: var(--hh-primary-2); margin-bottom: 12px; }
.hh-dropzone-icon svg { width: 40px; height: 40px; }
.hh-dropzone-main { font-size: 15px; font-weight: 600; }
.hh-dropzone-hint { font-size: 12px; color: var(--hh-text-dim); margin-top: 6px; }

/* ---------- 复选框（协议） ---------- */
.hh-check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 18px; cursor: pointer; user-select: none; }
.hh-check input {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px; min-width: 18px;
  border: 1.5px solid rgba(107, 140, 255, .55); border-radius: 6px;
  background: rgba(10, 14, 36, .5); cursor: pointer; position: relative; margin-top: 1px;
  transition: all .2s ease;
}
.hh-check input:checked {
  background: linear-gradient(135deg, var(--hh-primary), var(--hh-primary-3));
  border-color: var(--hh-primary-2);
}
.hh-check input:checked::after {
  content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.hh-check-text { font-size: 13px; color: var(--hh-text-dim); line-height: 1.6; }
.hh-check-text a { color: var(--hh-primary-2); text-decoration: none; border-bottom: 1px dashed rgba(107, 140, 255, .5); }
.hh-check-text a:hover { color: #8fa5ff; }

@keyframes hhFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 消息提示 ---------- */
.hh-msg { display: none; margin-top: 14px; padding: 12px 16px; border-radius: 11px; font-size: 13.5px; line-height: 1.6; }
.hh-msg.show { display: block; animation: hhFadeUp .3s ease; }
.hh-msg.err { background: rgba(239, 68, 68, .14); border: 1px solid rgba(239, 68, 68, .35); color: #ffb4b4; }
.hh-msg.ok { background: rgba(34, 197, 94, .13); border: 1px solid rgba(34, 197, 94, .35); color: #a9e9bf; }

/* ---------- 我的页面列表 ---------- */
.hh-page-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: 14px; margin-bottom: 14px;
  background: var(--hh-glass); border: 1px solid var(--hh-border);
  transition: all .22s ease;
}
.hh-page-card:hover { background: var(--hh-glass-strong); transform: translateX(3px); }
.hh-page-info { flex: 1; min-width: 0; }
.hh-page-name { font-size: 15px; font-weight: 700; word-break: break-all; }
.hh-page-url {
  font-size: 12.5px; color: var(--hh-primary-2); margin-top: 5px;
  font-family: Consolas, monospace; word-break: break-all;
  text-decoration: none; display: inline-block;
}
.hh-page-url:hover { text-decoration: underline; }
.hh-page-meta { font-size: 12px; color: var(--hh-text-dim); margin-top: 5px; }

.hh-empty { text-align: center; padding: 60px 20px; color: var(--hh-text-dim); }
.hh-empty svg { width: 52px; height: 52px; opacity: .4; margin-bottom: 14px; }

/* ---------- 协议/隐私正文 ---------- */
.hh-doc-toc {
  position: sticky; top: 24px; font-size: 13px; line-height: 2.1;
  padding: 20px 22px;
}
.hh-doc-toc a { color: var(--hh-text-dim); text-decoration: none; display: block; }
.hh-doc-toc a:hover { color: var(--hh-primary-2); }
.hh-doc-body h2 { font-size: 18px; font-weight: 700; margin: 30px 0 12px; scroll-margin-top: 24px; }
.hh-doc-body h2:first-child { margin-top: 0; }
.hh-doc-body p, .hh-doc-body li { font-size: 14px; color: var(--hh-text-dim); line-height: 1.9; }
.hh-doc-body ul { padding-left: 22px; margin: 8px 0; }
.hh-doc-layout { display: grid; grid-template-columns: 210px 1fr; gap: 26px; align-items: start; }
@media (max-width: 760px) {
  .hh-doc-layout { grid-template-columns: 1fr; }
  .hh-doc-toc { position: static; }
  .hh-topbar { padding: 12px 16px; gap: 10px; }
  .hh-nav { margin-left: 0; }
  .hh-brand-text { display: none; }
  .hh-main { padding: 28px 14px 48px; }
  .hh-card { padding: 20px 16px; }
}

/* ---------- 404 ---------- */
.hh-404 { text-align: center; padding: 80px 20px; }
.hh-404-code { font-size: 84px; font-weight: 800; letter-spacing: 4px;
  background: linear-gradient(135deg, var(--hh-primary-2), var(--hh-primary-3));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hh-404 p { color: var(--hh-text-dim); margin-top: 14px; line-height: 1.8; }

/* ---------- 倒计时按钮 ---------- */
.hh-btn-code { min-width: 118px; }
