:root {
  --primary: #8a5a33;
  --primary-dark: #6e4526;
  --primary-light: #b0784a;
  --gold-grad: linear-gradient(135deg, #c9905c, #8a5a33);
  --bg: #0d0f14;
  --bg-soft: #14171f;
  --card-bg: #171b23;
  --card-hover: #1c212b;
  --text: #e8eaf0;
  --text-2: #9aa1ad;
  --text-3: #5f6773;
  --border: #262c38;
  --border-light: #323947;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(138, 90, 51, 0.3);
  --topbar-h: 40px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

/* ===== 顶部快捷栏 ===== */
.topbar { background: #07090c; color: #cbd5e1; height: var(--topbar-h); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-brand {
  display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600;
  color: #fff; white-space: nowrap;
}
.paw-icon { color: #dfe4ec; display: inline-flex; }
.topbar-slogan { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-nav { display: flex; align-items: center; height: 100%; }
.dropdown { position: relative; height: 100%; }
.drop-btn {
  background: none; border: none; color: #cbd5e1; font-size: 13px; padding: 0 14px;
  height: 100%; display: flex; align-items: center; gap: 4px; transition: color 0.2s;
}
.drop-btn:hover { color: #fff; }
.caret {
  border: 4px solid transparent; border-top-color: currentColor;
  display: inline-block; vertical-align: middle; margin-top: 2px;
}
.drop-menu {
  position: absolute; top: 100%; left: 0; background: #171b23; border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.55); min-width: 150px;
  padding: 6px; z-index: 100; display: none;
}
.dropdown:hover .drop-menu { display: block; }
.drop-menu a {
  display: block; padding: 7px 12px; font-size: 13px; color: var(--text); border-radius: 6px;
}
.drop-menu a:hover { background: #232836; color: var(--primary-light); }

/* ===== 主导航 ===== */
.header {
  background: #10131a; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-dog { flex-shrink: 0; width: 68px; height: 52px; object-fit: contain; border-radius: 8px; background: #fff; padding: 3px; }
.logo-text h1 { font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.logo-text p { font-size: 12px; color: var(--text-3); }
.main-nav { display: flex; gap: 4px; align-items: center; }
.main-nav a {
  padding: 7px 14px; font-size: 14px; color: var(--text-2); border-radius: 8px; transition: all 0.2s;
}
.main-nav a:hover { color: var(--primary-light); background: #232836; }
.main-nav a.active { color: #2a1a0e; background: var(--primary); font-weight: 600; }
.nav-admin { border: 1px dashed var(--primary-light); color: var(--primary-light) !important; }
.nav-vip-btn {
  padding: 7px 14px; font-size: 14px; color: var(--text-2); border: 1px solid var(--border-light);
  background: none; border-radius: 8px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.nav-vip-btn:hover { color: var(--primary-light); border-color: var(--primary-light); }
.nav-vip-btn.is-vip {
  color: #2a1a0e; background: var(--gold-grad); border-color: transparent; font-weight: 700;
}
.vip-badge {
  display: inline-flex; align-items: center; font-style: normal; font-size: 10px; font-weight: 700;
  color: #2a1a0e; background: var(--gold-grad); padding: 1px 6px; border-radius: 4px; flex-shrink: 0;
}
.vip-badge.level-senior { color: #06252b; background: linear-gradient(135deg, #22d3ee, #0e7490); }
.vip-badge.level-lifetime { color: #2a0a3d; background: linear-gradient(135deg, #c084fc, #d946ef); }

/* ===== 搜索区 ===== */
.hero {
  background:
    radial-gradient(900px 320px at 50% -30%, rgba(18, 183, 245, 0.16), transparent 60%),
    linear-gradient(180deg, #12151d, #0d0f14);
  padding: 52px 0 60px;
}
.hero-title { text-align: center; color: #fff; font-size: 26px; font-weight: 600; margin-bottom: 22px; }
.search-box { max-width: 720px; margin: 0 auto; }
.search-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px;
}
.search-tab {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); color: #cfd4de;
  font-size: 13px; padding: 5px 14px; border-radius: 999px; transition: all 0.2s;
}
.search-tab:hover { background: rgba(255,255,255,0.12); color: #fff; }
.search-tab.active { background: var(--gold-grad); color: #2a1a0e; border-color: transparent; font-weight: 600; }
.search-form { display: flex; gap: 10px; }
.search-input {
  flex: 1; height: 52px; border: 1px solid var(--border); border-radius: 12px; padding: 0 20px;
  font-size: 15px; outline: none; background: #171b23; color: var(--text);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { border-color: var(--primary-light); }
.search-btn {
  height: 52px; padding: 0 32px; border: none; border-radius: 12px; background: var(--gold-grad);
  color: #2a1a0e; font-size: 16px; font-weight: 600; transition: transform 0.15s, filter 0.15s;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.search-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* ===== 横幅 ===== */
.banner-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 6px; }
.banner-card {
  position: relative; border-radius: var(--radius); padding: 20px 18px; overflow: hidden;
  color: #fff; transition: transform 0.2s, box-shadow 0.2s; min-height: 92px; border: 1px solid var(--border);
}
.banner-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.banner-primary { background: linear-gradient(120deg, #6e4526, #8a5a33); }
.banner-secondary { background: linear-gradient(120deg, #1a1e27, #2a3040); }
.banner-tertiary { background: linear-gradient(120deg, #4c1d95, #7c3aed); }
.banner-badge {
  position: absolute; top: 10px; right: 12px; background: rgba(255,255,255,0.22);
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
}
.banner-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.banner-desc { font-size: 13px; opacity: 0.85; }

/* ===== 内容区块 ===== */
.main { padding: 20px 16px 40px; }
.block {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 20px 26px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.block-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 12px;
  flex-wrap: wrap; gap: 10px;
}
.block-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.title-icon {
  width: 26px; height: 26px; border-radius: 7px; color: #fff; font-style: normal;
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.title-icon.hot { background: linear-gradient(135deg, #f43f5e, #fb923c); }
.title-icon.fav { background: linear-gradient(135deg, #f59e0b, #f97316); }
.title-icon.dev { background: linear-gradient(135deg, #b0784a, #8a5a33); }
.title-icon.ai { background: linear-gradient(135deg, #8b5cf6, #d946ef); font-size: 10px; }
.title-icon.online { background: linear-gradient(135deg, #059669, #10b981); }
.title-icon.learn { background: linear-gradient(135deg, #ea580c, #f97316); }
.title-icon.design { background: linear-gradient(135deg, #db2777, #f43f5e); }
.title-icon.eff { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.title-icon.web { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.title-icon.soft { background: linear-gradient(135deg, #3a4150, #5c6470); }
.title-icon.search { background: linear-gradient(135deg, #c9905c, #8a5a33); color: #2a1a0e; }
.title-icon.vip { background: var(--gold-grad); color: #2a1a0e; }
.block-more { font-size: 13px; color: var(--text-3); }
.block-more:hover { color: var(--primary-light); }

.sub-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.sub-tab {
  background: #232836; border: 1px solid transparent; color: var(--text-2);
  font-size: 13px; padding: 5px 14px; border-radius: 999px; transition: all 0.2s;
}
.sub-tab:hover { color: var(--primary-light); background: #2a3140; }
.sub-tab.active { background: var(--primary); color: #2a1a0e; }

/* ===== 卡片网格 ===== */
.card-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.card {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 10px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  transition: all 0.2s; position: relative; color: inherit; cursor: pointer;
}
.card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-hover); transform: translateY(-2px); background: var(--card-hover); }
.card-icon {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: #1f242e; display: flex; align-items: center; justify-content: center;
}
.card-icon img { width: 100%; height: 100%; object-fit: contain; }
.card-body { flex: 1; min-width: 0; }
.card-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-hot {
  font-style: normal; font-size: 10px; color: #fff; background: linear-gradient(135deg, #f43f5e, #fb923c);
  padding: 1px 5px; border-radius: 4px; flex-shrink: 0;
}
.card-desc {
  font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-actions { position: absolute; top: 0; right: 0; opacity: 0; transition: opacity 0.2s; }
.card:hover .card-actions { opacity: 1; }
.card-link {
  display: block; font-size: 12px; background: var(--primary); color: #2a1a0e;
  padding: 2px 10px; border-radius: 0 0 0 8px;
}
.card:hover .card-link { background: var(--primary-light); }
.card-host { display: none; }

/* 搜索模式：隐藏原区块 */
.block.search-hidden { display: none; }
.search-result-host { margin-bottom: 20px; }

/* ===== 会员专享 ===== */
.vip-section { margin: 22px 0 6px; }
.vip-tip { font-size: 12px; color: var(--text-3); }
.vip-locked {
  text-align: center; padding: 30px 20px; border: 1px dashed var(--border-light); border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015), rgba(255,255,255,0.015) 12px, transparent 12px, transparent 24px);
}
.vip-locked-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  background: var(--gold-grad); color: #2a1a0e; font-size: 18px; font-weight: 800; border-radius: 14px; margin-bottom: 14px;
}
.vip-locked-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.vip-locked-desc { font-size: 13px; color: var(--text-2); margin-bottom: 18px; }
.vip-btn {
  border: none; border-radius: 999px; padding: 9px 30px; font-size: 14px; font-weight: 600;
  background: var(--gold-grad); color: #2a1a0e; transition: filter 0.15s, transform 0.1s;
}
.vip-btn:hover { filter: brightness(1.06); }
.vip-btn:active { transform: translateY(1px); }
.vip-btn.ghost { background: #232836; color: var(--text); border: 1px solid var(--border-light); }
.vip-member-note {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px;
  font-size: 13px; color: var(--text-2);
}

/* ===== 会员弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 300; background: rgba(5, 7, 10, 0.82);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-mask.hidden-mask { display: none; }
.modal-box {
  position: relative; background: #171b23; border: 1px solid var(--border-light); border-radius: 16px;
  padding: 32px 34px; width: 100%; max-width: 380px; box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  text-align: center;
}
.modal-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--text-3);
  font-size: 18px; line-height: 1; padding: 4px;
}
.modal-close:hover { color: var(--text); }
.modal-logo { margin-bottom: 12px; display: flex; justify-content: center; }
.modal-logo img, .login-logo img { border-radius: 10px; background: #fff; padding: 4px; }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.modal-sub { font-size: 12px; color: var(--text-3); margin-bottom: 18px; }
.login-label { display: block; text-align: left; font-size: 13px; color: var(--text-2); margin: 14px 0 6px; }
.login-input {
  width: 100%; height: 44px; border: 1px solid var(--border); border-radius: 10px;
  padding: 0 14px; font-size: 15px; outline: none; box-sizing: border-box; background: #1f242e; color: var(--text);
}
.login-input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(138,90,51,0.2); }
.login-error { min-height: 20px; font-size: 13px; color: #f87171; margin-top: 8px; text-align: left; }
.login-btn { width: 100%; margin-top: 8px; height: 46px; font-size: 16px; }
.member-info-card {
  background: #1f242e; border: 1px solid var(--border-light); border-radius: 12px; padding: 20px 16px; margin-bottom: 18px;
}
.member-info-card .mi-name { font-size: 17px; font-weight: 700; margin: 8px 0 4px; }
.member-info-card .mi-account { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.member-info-card .mi-level {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #2a1a0e;
  background: var(--gold-grad); padding: 3px 12px; border-radius: 999px; font-weight: 700;
}
.member-info-card .mi-level.level-senior { color: #06252b; background: linear-gradient(135deg, #22d3ee, #0e7490); }
.member-info-card .mi-level.level-lifetime { color: #2a0a3d; background: linear-gradient(135deg, #c084fc, #d946ef); }

/* ===== 空状态 ===== */
.empty { padding: 30px 16px; }
.empty-box {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  text-align: center; padding: 50px 20px; box-shadow: var(--shadow);
}
.empty-box svg { margin: 0 auto 16px; }
.empty-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.empty-desc { font-size: 14px; color: var(--text-2); margin-bottom: 20px; }
.empty-btn {
  background: var(--primary); color: #2a1a0e; border: none; border-radius: 8px;
  padding: 9px 28px; font-size: 14px; font-weight: 600;
}
.empty-btn:hover { background: var(--primary-light); }

/* ===== 页脚 ===== */
.footer { background: #07090c; color: #94a3b8; margin-top: 20px; }
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding: 40px 16px 30px;
}
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-col p { font-size: 13px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1e2430; padding: 16px 0; text-align: center; }
.footer-bottom p { font-size: 12px; }

/* ===== 返回顶部 ===== */
.back-top {
  position: fixed; right: 24px; bottom: 28px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold-grad); color: #2a1a0e; font-size: 20px; display: flex; align-items: center;
  justify-content: center; opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all 0.3s; box-shadow: 0 6px 18px rgba(138,90,51,0.45); z-index: 60;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { filter: brightness(1.06); }

/* ===== 管理后台会员管理 ===== */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tab {
  border: 1px solid var(--border-light); background: none; color: var(--text-2);
  padding: 7px 18px; border-radius: 8px; font-size: 14px; transition: all 0.2s;
}
.admin-tab:hover { color: var(--primary-light); border-color: var(--primary-light); }
.admin-tab.active { background: var(--primary); color: #2a1a0e; border-color: transparent; font-weight: 600; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.member-form {
  display: grid; grid-template-columns: 1.2fr 1.2fr 1.4fr 1fr 1fr auto; gap: 10px; margin-bottom: 16px; align-items: center;
}
.member-form input, .member-form select {
  width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px;
  font-size: 13px; outline: none; background: #1f242e; color: var(--text);
}
.member-form input:focus, .member-form select:focus { border-color: var(--primary-light); }
.member-table { width: 100%; border-collapse: collapse; }
.member-table th {
  text-align: left; font-size: 12px; color: var(--text-3); padding: 8px 10px;
  border-bottom: 1px solid var(--border-light); font-weight: 600;
}
.member-table td {
  padding: 8px 10px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.member-table tr:hover td { background: #1a1f29; }
.badge-level {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  color: #2a1a0e; background: var(--gold-grad);
}
.badge-level.level-senior { color: #06252b; background: linear-gradient(135deg, #22d3ee, #0e7490); }
.badge-level.level-lifetime { color: #2a0a3d; background: linear-gradient(135deg, #c084fc, #d946ef); }
.st-on { color: #34d399; font-size: 12px; }
.st-off { color: #f87171; font-size: 12px; }
.member-ops { display: flex; gap: 6px; }
.member-ops button {
  font-size: 12px; border: 1px solid var(--border-light); background: #232836; color: var(--text-2);
  padding: 4px 10px; border-radius: 6px;
}
.member-ops button:hover { color: var(--primary-light); border-color: var(--primary-light); }
.member-ops button.m-del:hover { color: #f87171; border-color: #f87171; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .banner-row { grid-template-columns: 1fr; }
  .member-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-slogan { display: none; }
  .header-inner { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 10px; }
  .main-nav { width: 100%; overflow-x: auto; white-space: nowrap; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero { padding: 36px 0 44px; }
  .hero-title { font-size: 20px; }
  .search-form { flex-direction: column; }
  .search-btn { width: 100%; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .member-form { grid-template-columns: 1fr; }
}
