/*
Theme Name: PanHub 资源库
Theme URI: https://example.com/panhub
Author: PanHub
Author URI: https://example.com
Description: 网盘资源聚合与分享主题。自带「资源」文章类型、资源分类与网盘平台两级筛选、关键词搜索、一键复制链接与提取码，内置三个广告位，不依赖任何插件。
Version: 1.0.1
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: panhub
Tags: custom-menu, custom-logo, featured-images, translation-ready, blog
*/

/* =========================================================
   变量：主色会被「外观 → 自定义」里的设置覆盖
   ========================================================= */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fbfbfe;

  --text: #101828;
  --text-2: #55607a;
  --text-3: #8b95aa;

  --line: #e8ebf3;
  --line-strong: #d7dced;

  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-soft: #eef0ff;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 10px 30px -12px rgba(16, 24, 40, .16);
  --shadow-lg: 0 30px 70px -24px rgba(16, 24, 40, .28);

  --wrap: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; }
img { max-width: 100%; height: auto; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- WordPress 无障碍基础 ---------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link {
  background: #fff;
  color: var(--brand);
  left: -9999px;
  padding: 10px 16px;
  position: absolute;
  top: 0;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.admin-bar .nav { top: 32px; }

.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .5px;
  box-shadow: 0 4px 12px -4px rgba(79, 70, 229, .6);
}

.brand-mark.small { width: 26px; height: 26px; flex-basis: 26px; border-radius: 8px; font-size: 13px; }

.brand-logo img { max-height: 38px; width: auto; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 15.5px; letter-spacing: .2px; }
.brand-text small {
  font-size: 9.5px;
  letter-spacing: 1.4px;
  color: var(--text-3);
  font-weight: 600;
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-2);
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--brand-soft); color: var(--brand); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 68px 0 56px;
  background:
    radial-gradient(900px 380px at 12% -12%, #e6e9ff 0%, rgba(230, 233, 255, 0) 62%),
    radial-gradient(760px 340px at 88% -6%, #f2e8ff 0%, rgba(242, 232, 255, 0) 60%),
    linear-gradient(180deg, #fbfbff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(16, 24, 40, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 24, 40, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(720px 300px at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(720px 300px at 50% 0%, #000 0%, transparent 78%);
  pointer-events: none;
}

.hero-inner { position: relative; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px 5px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line-strong);
  font-size: 12.5px;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, .05); }
}

.hero-title {
  font-size: clamp(28px, 5.2vw, 46px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -.8px;
  background: linear-gradient(120deg, #131a2e 12%, #3b2f8f 58%, #6d3fbf 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 14px;
  font-size: clamp(13.5px, 2.2vw, 15.5px);
  color: var(--text-2);
  letter-spacing: .2px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 620px;
  margin: 28px auto 0;
  padding: 0 8px 0 16px;
  height: 54px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 8px 26px -14px rgba(16, 24, 40, .22);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft), 0 10px 30px -16px rgba(16, 24, 40, .24);
}

.search-icon { width: 19px; height: 19px; flex: 0 0 19px; color: var(--text-3); }

.search input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  color: var(--text);
  padding: 0;
  box-shadow: none;
}
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { display: none; }

.search-clear {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: .18s;
}
.search-clear:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

.hero-stats {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 13px;
  color: var(--text-3);
}
.hero-stats b { color: var(--text); font-weight: 700; font-size: 15px; }
.hero-stats .sep { width: 1px; height: 12px; background: var(--line-strong); display: block; }

/* ---------- 工具条 ---------- */
.main { padding-top: 30px; padding-bottom: 20px; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pills::-webkit-scrollbar { display: none; }

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--text-2);
  white-space: nowrap;
  transition: .18s;
}
.pill:hover { border-color: var(--brand); color: var(--brand); }
.pill.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(79, 70, 229, .8);
}
.pill .count {
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(16, 24, 40, .06);
  color: var(--text-3);
  line-height: 1.5;
}
.pill.is-active .count { background: rgba(255, 255, 255, .22); color: #fff; }

/* 平台筛选条 */
.platform-pills {
  margin: -6px 0 20px;
  flex: none;
}
.pill-sm {
  padding: 5px 11px;
  font-size: 12.5px;
  gap: 5px;
}
.plat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 7px;
}
.pill.is-active .plat-dot { background: #fff !important; }

.toolbar-right { flex: 0 0 auto; }

.seg {
  display: inline-flex;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.seg-btn {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-2);
  transition: .18s;
}
.seg-btn.is-active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

/* ---------- 广告位 ---------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: 0 0 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: repeating-linear-gradient(45deg, #fafbff, #fafbff 10px, #f5f6fc 10px, #f5f6fc 20px);
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: .3px;
  overflow: hidden;
  text-align: center;
  padding: 8px;
}
.ad-slot img { max-width: 100%; height: auto; }

/* 网格里的广告位：占一个卡片的位置 */
.grid .ad-slot {
  margin: 0;
  min-height: 240px;
  border-radius: var(--radius);
}

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s, border-color .22s;
  animation: cardIn .34s both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--c1, #6366f1), var(--c2, #8b5cf6));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, .3), transparent 58%),
    radial-gradient(80% 70% at 100% 100%, rgba(0, 0, 0, .16), transparent 60%);
  pointer-events: none;
  z-index: 2;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  display: block;
}

.cover-emoji {
  position: relative;
  z-index: 1;
  font-size: 40px;
  line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .22));
}

.cover-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
  color: #fff;
  background: rgba(16, 24, 40, .42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .22);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 15px 13px;
  gap: 7px;
}

.card-title {
  font-size: 14.8px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -.1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--text-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
}

.chips { display: flex; flex-wrap: wrap; gap: 5px; }

.chip {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  white-space: nowrap;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid #f1f3f9;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-3);
  min-width: 0;
}
.card-meta .size { color: var(--text-2); font-weight: 600; }
.card-meta .sep { opacity: .5; }

.card-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  transition: .18s;
}
.card-copy:hover { background: var(--brand); color: #fff; }
.card-copy svg { width: 13px; height: 13px; }

/* ---------- 空状态 / 加载更多 ---------- */
.empty { text-align: center; padding: 68px 20px; }
.empty-icon {
  width: 54px; height: 54px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-3);
  box-shadow: var(--shadow-sm);
}
.empty-icon svg { width: 24px; height: 24px; }
.empty-title { font-size: 16px; font-weight: 700; }
.empty-sub { margin-top: 6px; font-size: 13.5px; color: var(--text-3); }

.btn-ghost {
  display: inline-block;
  margin-top: 18px;
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--line-strong);
  transition: .18s;
}
.btn-ghost:hover { color: var(--brand); border-color: var(--brand); }

.more-wrap { display: flex; justify-content: center; padding: 34px 0 10px; }

.btn-more {
  padding: 11px 34px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  transition: .2s;
}
.btn-more:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -12px rgba(79, 70, 229, .6);
}
.btn-more[disabled] { opacity: .6; cursor: default; transform: none; }

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-3);
  padding: 6px 0 20px;
}
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--brand); }
.crumbs .current { color: var(--text-2); }

/* ---------- 资源详情页 ---------- */
.res-detail {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 30px 34px;
  box-shadow: var(--shadow-sm);
}

.res-head { margin-bottom: 22px; }

.res-title {
  font-size: clamp(21px, 3.4vw, 29px);
  line-height: 1.38;
  font-weight: 800;
  letter-spacing: -.4px;
  margin: 12px 0 0;
}

.res-desc {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-2);
}

.res-head .chips { margin-top: 14px; }

.res-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-3);
}
.res-meta b { color: var(--text-2); font-weight: 600; }

.res-panel {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin: 24px 0 0;
}
.res-panel .modal-field { margin-bottom: 14px; }
.res-panel .modal-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 6px;
  letter-spacing: .3px;
}
.res-panel .copybox { background: #fff; }
.res-panel .modal-actions { margin-top: 18px; }
.res-panel .modal-tip { margin-top: 12px; }

.res-content { margin-top: 28px; }

/* 正文排版 */
.entry-content { font-size: 15px; line-height: 1.85; color: #2b3448; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 34px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
  line-height: 1.4;
}
.entry-content h3 { font-size: 17px; font-weight: 700; margin: 26px 0 12px; }
.entry-content h4 { font-size: 15.5px; font-weight: 700; margin: 22px 0 10px; }
.entry-content p { margin: 0 0 16px; }
.entry-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { opacity: .8; }
.entry-content ul, .entry-content ol { margin: 0 0 16px; padding-left: 22px; }
.entry-content ul li { list-style: disc; margin-bottom: 6px; }
.entry-content ol li { list-style: decimal; margin-bottom: 6px; }
.entry-content blockquote {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 10px 10px 0;
  color: var(--text-2);
}
.entry-content img { border-radius: 12px; margin: 6px 0 18px; }
.entry-content pre {
  background: #101828;
  color: #e6e8f0;
  padding: 16px 18px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 18px;
}
.entry-content code {
  background: #f1f3f9;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.entry-content th { background: var(--surface-2); font-weight: 700; }

/* WP 对齐类 */
.entry-content .alignwide { max-width: 100%; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; display: block; }
.entry-content .alignleft { float: left; margin: 0 18px 14px 0; }
.entry-content .alignright { float: right; margin: 0 0 14px 18px; }

/* 相关资源 */
.related { margin-top: 44px; }
.related-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -.2px;
}

/* ---------- 反馈页 ---------- */
[hidden] { display: none !important; }

.feedback-card {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.feedback-intro { margin-bottom: 24px; }

.fb-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.fb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.fb-row { margin-bottom: 18px; }

.fb-row label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
}

.fb-req { color: #dc2626; }

.fb-opt {
  font-weight: 400;
  color: var(--text-3);
  font-size: 12px;
  margin-left: 4px;
}

.fb-row input[type="text"],
.fb-row input[type="email"],
.fb-row select,
.fb-row textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none;
  appearance: none;
}

.fb-row textarea {
  resize: vertical;
  min-height: 132px;
  font-family: inherit;
}

.fb-row input:focus,
.fb-row select:focus,
.fb-row textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.fb-row input::placeholder,
.fb-row textarea::placeholder { color: #a8b0c2; }

.fb-select { position: relative; }
.fb-select::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.fb-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}
.fb-hint span { font-variant-numeric: tabular-nums; }

.fb-submit {
  width: 100%;
  flex: none;
  margin-top: 6px;
}
.fb-submit[disabled] { opacity: .7; cursor: default; transform: none; }

.fb-privacy {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.7;
  text-align: center;
}
.fb-privacy a { color: var(--brand); }

/* 提交成功 */
.feedback-done {
  text-align: center;
  padding: 34px 10px 26px;
}

.done-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
}
.done-icon svg { width: 30px; height: 30px; }

.feedback-done h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.2px;
  margin-bottom: 8px;
}
.feedback-done p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 40px;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 44px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}

.footer-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 15px; }
.footer-note { font-size: 13px; color: var(--text-3); line-height: 1.75; max-width: 380px; }

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: .3px;
}
.footer-col li { margin-bottom: 8px; }
.footer-col li a {
  font-size: 13px;
  color: var(--text-3);
  transition: color .18s;
}
.footer-col li a:hover { color: var(--brand); }

.footer-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
}
.footer-link:hover { text-decoration: underline; }

/* 友情链接 */
.friends-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-top: 20px;
  padding-bottom: 4px;
  border-top: 1px solid var(--line);
}

.friends-label {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: .2px;
}

.friends-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  min-width: 0;
}

.friends-list a {
  font-size: 12.5px;
  color: var(--text-3);
  transition: color .18s;
  word-break: break-all;
}

.friends-list a:hover { color: var(--brand); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, .46);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .2s both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 26px 24px 22px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  animation: popIn .26s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: var(--text-3);
  transition: .18s;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-close svg { width: 17px; height: 17px; }

.modal-head { padding-right: 32px; margin-bottom: 20px; }

.plat-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: .2px;
  background: #64748b;
}

.modal-head h3 {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.3px;
}
.modal-head p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.7;
}
.modal-head .chips { margin-top: 12px; }

.modal-field { margin-bottom: 14px; }
.modal-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 6px;
  letter-spacing: .3px;
}

.copybox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.copybox input {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  color: var(--text-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .2px;
  box-shadow: none;
}

.copy-mini {
  flex: 0 0 auto;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--line-strong);
  transition: .18s;
}
.copy-mini:hover { background: var(--brand-soft); border-color: var(--brand); }

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 12px 0 4px;
  font-size: 12px;
  color: var(--text-3);
  border-top: 1px dashed var(--line);
  margin-top: 16px;
}
.modal-meta b { color: var(--text-2); font-weight: 600; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.btn-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 46px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 24px -12px rgba(79, 70, 229, .9);
  transition: .2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(79, 70, 229, .95); }
.btn-primary svg { width: 16px; height: 16px; }

.btn-secondary {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  height: 46px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--line-strong);
  transition: .18s;
}
.btn-secondary:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

.modal-tip {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.6;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  z-index: 200000;
  transform: translate(-50%, 14px);
  padding: 11px 20px;
  border-radius: 11px;
  background: rgba(16, 24, 40, .92);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 16px 40px -16px rgba(16, 24, 40, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 782px) {
  .admin-bar .nav { top: 46px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav-inner { height: 58px; }
  .nav-links a { padding: 6px 9px; font-size: 13px; }
  .nav-links a:first-child { display: none; }

  .hero { padding: 44px 0 40px; }
  .hero-title { letter-spacing: -.4px; }
  .search { height: 50px; margin-top: 22px; }
  .hero-stats { gap: 8px 14px; font-size: 12px; }
  .hero-stats .sep { display: none; }

  .toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .toolbar-right { display: flex; justify-content: flex-end; }

  .grid { grid-template-columns: 1fr; gap: 14px; }

  .ad-slot { min-height: 70px; font-size: 11.5px; }
  .grid .ad-slot { min-height: 180px; }

  .res-detail { padding: 22px 18px 26px; border-radius: 16px; }
  .res-panel { padding: 16px; }

  .feedback-card { padding: 22px 18px; border-radius: 16px; }
  .fb-grid { grid-template-columns: 1fr; }
  .fb-row textarea { min-height: 110px; }

  .footer { padding-top: 32px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }

  .modal { padding: 12px; align-items: flex-end; }
  .modal-card {
    max-width: 100%;
    border-radius: 20px 20px 14px 14px;
    padding: 22px 18px 18px;
    max-height: calc(100vh - 24px);
  }
  .modal-actions { flex-direction: column-reverse; }
  .btn-secondary { width: 100%; }
  .modal-head h3 { font-size: 17.5px; }
  .toast { bottom: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
