/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #2a2724;
  --bg-2: #32302c;
  --bg-3: #3a3833;
  --panel: rgba(255,255,255,0.04);
  --panel-border: rgba(201,168,120,0.14);
  --gold: #c9a878;
  --gold-light: #e6d4a8;
  --gold-dark: #8a7148;
  --gold-bg: rgba(201,168,120,0.1);
  --text: #f5f5f5;
  --text-dim: #a5a09a;
  --text-mute: #7a7570;
  --line: rgba(255,255,255,0.08);
  --shadow: 0 2px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.4);
  --radius: 12px;
  --serif: 'Noto Serif SC', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
a { color: inherit; text-decoration: none; }

/* === Decorative Background === */
.bg-deco { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.deco-circle {
  position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,0.05);
}
.deco-circle-1 {
  width: 500px; height: 500px; top: -150px; right: -100px;
  background: radial-gradient(circle, rgba(201,168,120,0.07) 0%, transparent 70%);
}
.deco-circle-2 {
  width: 700px; height: 700px; bottom: -250px; left: -200px;
  background: radial-gradient(circle, rgba(201,168,120,0.05) 0%, transparent 60%);
}
.deco-circle-3 {
  width: 400px; height: 400px; top: 40%; right: 20%;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
}
.deco-line {
  position: absolute; height: 1px; background: rgba(255,255,255,0.09);
  transform-origin: 0 0;
}
.deco-line-1 { width: 200px; top: 15%; left: 10%; transform: rotate(-30deg); }
.deco-line-2 { width: 150px; top: 25%; right: 15%; transform: rotate(-30deg); }
.deco-line-3 { width: 180px; top: 60%; left: 5%; transform: rotate(-30deg); }
.deco-line-4 { width: 120px; bottom: 20%; right: 25%; transform: rotate(-30deg); background: rgba(201,168,120,0.15); }
.deco-line-5 { width: 100px; top: 45%; left: 40%; transform: rotate(-30deg); background: rgba(201,168,120,0.1); }
.deco-dots {
  position: absolute; width: 60px; height: 60px;
  background-image: radial-gradient(circle, rgba(255,255,255,0.13) 1px, transparent 1.5px);
  background-size: 10px 10px;
}
.deco-dots-1 { bottom: 30%; right: 8%; }
.deco-dots-2 { top: 10%; right: 30%; }

/* === Header === */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(42,39,36,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--panel-border);
}
.header-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 32px;
  height: 64px; display: flex; align-items: center; gap: 24px;
  position: relative; z-index: 2;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; white-space: nowrap; }
.logo-icon { color: var(--gold); font-size: 22px; }
.logo-accent { color: var(--gold-light); font-weight: 700; margin-left: 4px; }

.search-bar { flex: 1; max-width: 480px; position: relative; }
.search-bar input {
  width: 100%; height: 40px; padding: 0 44px 0 18px;
  border: 1px solid var(--panel-border); border-radius: 20px;
  font-size: 14px; outline: none; transition: all 0.25s;
  background: var(--panel); color: var(--text); font-family: var(--sans);
}
.search-bar input::placeholder { color: var(--text-mute); }
.search-bar input:focus { border-color: var(--gold); background: rgba(201,168,120,0.05); }
.search-btn {
  position: absolute; right: 4px; top: 4px;
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: transparent; cursor: pointer; font-size: 16px; color: var(--gold);
}
.search-btn:hover { background: var(--gold-bg); }

.header-nav { display: flex; align-items: center; gap: 12px; }
.nav-link { font-size: 14px; color: var(--text-dim); padding: 6px 12px; border-radius: 8px; transition: all 0.2s; }
.nav-link:hover { color: var(--gold); background: var(--gold-bg); }
.btn-login {
  padding: 8px 20px; border: 1px solid var(--gold-dark); background: transparent;
  color: var(--gold); border-radius: 20px; font-size: 14px; cursor: pointer;
  transition: all 0.25s; font-family: var(--sans);
}
.btn-login:hover { background: var(--gold-bg); }
.btn-register {
  padding: 8px 20px; border: none;
  background: var(--gold); color: #2a2724; border-radius: 20px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.25s;
  font-family: var(--sans);
}
.btn-register:hover { background: var(--gold-light); }

.user-menu { position: relative; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); color: #2a2724;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.user-dropdown {
  position: absolute; right: 0; top: 44px;
  background: var(--bg-2); border: 1px solid var(--panel-border); border-radius: 10px;
  box-shadow: var(--shadow-lg); min-width: 140px; padding: 6px;
  display: none;
}
.user-menu:hover .user-dropdown { display: block; }
.user-dropdown a, .user-dropdown button {
  display: block; width: 100%; text-align: left; padding: 8px 12px;
  border: none; background: none; font-size: 14px; cursor: pointer;
  border-radius: 6px; color: var(--text); font-family: var(--sans);
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--panel); color: var(--gold); }

/* === Main Layout (Sidebar + Content) === */
.main-wrap {
  display: flex; max-width: 1400px; margin: 0 auto; padding: 24px 32px;
  gap: 28px; position: relative; z-index: 2;
  align-items: flex-start;
}

/* === Sidebar === */
.sidebar {
  width: 240px; flex-shrink: 0; position: sticky; top: 88px;
  background: var(--bg-2); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 20px;
  max-height: calc(100vh - 110px); overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 2px; }

.sidebar-title {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-family: var(--serif); font-size: 15px; color: var(--gold-light);
  flex-wrap: wrap;
}
.title-bracket { color: var(--gold); font-family: var(--serif); font-size: 18px; }
.title-cn { font-weight: 500; white-space: nowrap; }
.title-en {
  font-family: var(--serif); font-size: 10px; letter-spacing: 1.5px;
  color: var(--text-dim); text-transform: uppercase; margin-left: 4px;
}

.sidebar-divider { height: 1px; background: var(--panel-border); margin: 16px 0; }

/* Categories */
.category-nav { display: flex; flex-direction: column; gap: 4px; }
.cat-tab {
  padding: 9px 12px; border: 1px solid transparent;
  background: transparent; border-radius: 8px;
  font-size: 14px; cursor: pointer; color: var(--text-dim);
  transition: all 0.2s; display: flex; align-items: center; gap: 8px;
  font-family: var(--sans); text-align: left; width: 100%;
}
.cat-tab:hover { background: var(--panel); color: var(--text); border-color: var(--panel-border); }
.cat-tab.active {
  background: var(--gold-bg); color: var(--gold-light);
  border-color: var(--gold-dark);
  border-left: 2px solid var(--gold);
  padding-left: 10px;
}

/* Sidebar Stats */
.sidebar-stats { display: flex; flex-direction: column; gap: 10px; }
.sidebar-stat {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px; background: var(--panel); border-radius: 8px;
  border: 1px solid var(--panel-border);
}
.sidebar-stat-accent { background: var(--gold-bg); border-color: var(--gold-dark); }
.ss-num { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--gold-light); }
.sidebar-stat:not(.sidebar-stat-accent) .ss-num { color: var(--text); }
.ss-label { font-size: 12px; color: var(--text-dim); }

/* CTA */
.sidebar-cta {
  text-align: center; padding: 4px 0;
}
.cta-btn {
  display: inline-block; padding: 10px 24px;
  background: var(--gold); color: #2a2724;
  border-radius: 30px; font-size: 14px; font-weight: 600;
  margin-bottom: 8px; transition: all 0.25s;
  border: 1px solid var(--gold-light);
  font-family: var(--serif);
  box-shadow: 0 4px 16px rgba(201,168,120,0.2);
}
.cta-btn:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(201,168,120,0.3); }
.cta-bracket { color: rgba(42,39,36,0.6); margin: 0 4px; font-size: 13px; }
.cta-hint { font-size: 12px; color: var(--text-dim); }

/* === Main Content === */
.main-content { flex: 1; min-width: 0; }

/* === Hero === */
.hero {
  text-align: center; padding: 60px 24px 50px;
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(201,168,120,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hero-ornament {
  font-family: var(--serif); font-size: 11px; letter-spacing: 4px;
  color: var(--text-mute); margin-bottom: 24px; text-transform: uppercase;
}
.hero-title {
  font-family: var(--serif); font-size: 48px; font-weight: 700;
  color: var(--gold-light); line-height: 1.2;
  margin-bottom: 16px;
  animation: fadeInUp 0.6s ease both;
}
.title-bracket-lg {
  color: var(--gold); font-weight: 400; opacity: 0.6;
  font-size: 42px; margin: 0 8px; vertical-align: middle;
}
.hero-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin: 20px auto 20px;
}
.hd-line { width: 60px; height: 1px; background: var(--gold-dark); }
.hd-dot { color: var(--gold); font-size: 10px; }
.hero-subtitle {
  font-size: 15px; color: var(--text-dim); margin-bottom: 28px;
  letter-spacing: 1px;
  animation: fadeInUp 0.6s ease 0.1s both;
}
.hero-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px;
  animation: fadeInUp 0.6s ease 0.2s both;
}
.hero-pill {
  padding: 7px 16px;
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 20px; font-size: 13px; color: var(--text-dim);
  transition: all 0.25s; font-family: var(--serif);
}
.hero-pill:hover { color: var(--text); border-color: var(--gold-dark); }
.hero-pill-gold {
  background: var(--gold-bg); border-color: var(--gold-dark);
  color: var(--gold-light);
}

.hero-stats-row {
  display: inline-flex; gap: 36px;
  padding: 16px 32px; background: var(--panel);
  border: 1px solid var(--panel-border); border-radius: 30px;
  animation: fadeInUp 0.6s ease 0.3s both;
}
.hs-item { text-align: center; }
.hs-num {
  display: block; font-family: var(--serif); font-size: 26px; font-weight: 700;
  color: var(--gold-light); line-height: 1.2;
}
.hs-label { font-size: 12px; color: var(--text-dim); }

/* === Tools Container === */
.tools-container { padding: 0 0 40px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tools-section-title {
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  color: var(--gold-light); margin: 24px 0 18px;
  display: flex; align-items: center; gap: 12px;
}
.tools-section-title::after { content: ''; flex: 1; height: 1px; background: var(--panel-border); }

/* === Tool Card === */
.tool-card {
  background: var(--bg-2);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 20px; transition: all 0.3s ease;
  cursor: pointer; position: relative; overflow: hidden;
  animation: cardEnter 0.4s ease both;
}
.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 0; height: 100%;
  background: linear-gradient(90deg, var(--gold-bg) 0%, transparent 50%);
  transition: width 0.4s ease; pointer-events: none;
}
.tool-card:hover {
  border-color: var(--gold-dark);
  background: var(--bg-3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px var(--gold-dark);
}
.tool-card:hover::before { width: 100%; }
.tool-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; position: relative; z-index: 1; }
.tool-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--panel-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.tool-name { font-size: 16px; font-weight: 600; color: var(--text); flex: 1; }
.tool-desc {
  font-size: 13px; color: var(--text-dim); line-height: 1.55;
  margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; position: relative; z-index: 1;
}
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; position: relative; z-index: 1; }
.tool-tag {
  font-size: 11px; padding: 2px 8px;
  background: var(--panel); border-radius: 4px;
  color: var(--text-dim); border: 1px solid var(--panel-border);
}
.tool-footer { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.tool-visit {
  font-size: 13px; color: var(--gold); font-weight: 500;
  display: flex; align-items: center; gap: 4px;
  transition: gap 0.2s;
}
.tool-card:hover .tool-visit { gap: 8px; }

/* CPS Badge */
.cps-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--gold); color: #2a2724;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 12px; z-index: 2;
}
.cps-badge::before { content: '✦ '; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-dim); }
.empty-state span { font-size: 48px; display: block; margin-bottom: 16px; }

/* === Page Titles (other pages) === */
.page-ornament {
  font-family: var(--serif); font-size: 11px; letter-spacing: 4px;
  color: var(--text-mute); margin-bottom: 12px;
}
.page-title {
  font-family: var(--serif); font-size: 32px; color: var(--gold-light);
  margin-bottom: 8px;
}
.page-subtitle { font-size: 14px; color: var(--text-dim); }

.dashboard-header { padding: 40px 24px 20px; text-align: center; }
.admin-header { padding: 40px 24px 20px; text-align: center; }

/* === Modal === */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-2); border: 1px solid var(--panel-border);
  border-radius: var(--radius); max-width: 540px; width: 100%;
  max-height: 80vh; overflow-y: auto; padding: 32px; position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
.modal-sm { max-width: 400px; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  border: none; background: var(--panel); border-radius: 50%;
  cursor: pointer; font-size: 14px; color: var(--text-dim);
  transition: all 0.2s;
}
.modal-close:hover { background: var(--panel-border); color: var(--text); }

/* Modal content */
.modal-tool-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.modal-tool-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--panel-border);
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.modal-tool-name { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--gold-light); }
.modal-tool-cat { font-size: 13px; color: var(--text-dim); }
.modal-tool-desc { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 20px; }
.modal-tool-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.modal-tool-tag {
  font-size: 12px; padding: 3px 10px; background: var(--panel);
  border-radius: 6px; color: var(--text-dim); border: 1px solid var(--panel-border);
}
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  flex: 1; min-width: 140px; padding: 12px 24px;
  background: var(--gold); color: #2a2724; border: none; border-radius: 22px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all 0.25s; font-family: var(--sans);
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-secondary {
  flex: 1; min-width: 140px; padding: 12px 24px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--panel-border); border-radius: 22px;
  font-size: 15px; cursor: pointer; transition: all 0.25s; font-family: var(--sans);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold { background: var(--gold); color: #2a2724; }

.cps-info-box {
  background: var(--gold-bg); border: 1px solid var(--gold-dark);
  border-radius: 10px; padding: 14px; margin-bottom: 20px; font-size: 14px;
  color: var(--text);
}
.cps-info-box strong { color: var(--gold-light); }

/* Auth */
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--panel-border); }
.auth-tab {
  flex: 1; padding: 12px; text-align: center; font-size: 15px; font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--text-dim); transition: all 0.2s; font-family: var(--serif);
}
.auth-tab.active { color: var(--gold); border-color: var(--gold); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--text-dim); }
.auth-field input {
  width: 100%; height: 44px; padding: 0 16px;
  border: 1px solid var(--panel-border); border-radius: 22px;
  font-size: 14px; outline: none; transition: all 0.2s;
  background: var(--panel); color: var(--text); font-family: var(--sans);
}
.auth-field input::placeholder { color: var(--text-mute); }
.auth-field input:focus { border-color: var(--gold); background: var(--bg-2); }
.auth-submit {
  width: 100%; height: 44px;
  background: var(--gold); color: #2a2724; border: none;
  border-radius: 22px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.25s; margin-top: 6px; font-family: var(--sans);
}
.auth-submit:hover { background: var(--gold-light); }
.auth-hint { font-size: 12px; color: var(--text-dim); text-align: center; }
.auth-hint a { color: var(--gold); }

/* === Dashboard === */
.dash-container { max-width: 980px; margin: 0 auto; padding: 0 0 60px; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.dash-stat-card {
  background: var(--bg-2); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 22px; text-align: center;
}
.dash-stat-num { font-family: var(--serif); font-size: 32px; font-weight: 700; color: var(--gold-light); }
.dash-stat-label { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.dash-section-title {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  color: var(--gold-light); margin: 28px 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.dash-section-title::after { content: ''; flex: 1; height: 1px; background: var(--panel-border); }

.referral-code-box {
  background: var(--gold-bg); border: 1px solid var(--gold-dark);
  border-radius: var(--radius); padding: 22px; color: var(--text); margin-bottom: 22px;
}
.referral-code-box h3 { font-size: 14px; margin-bottom: 8px; color: var(--gold-light); font-weight: 400; }
.referral-code-value { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: 2px; color: var(--gold-light); }

.referral-link-item {
  background: var(--bg-2); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 14px;
  transition: all 0.2s;
}
.referral-link-item:hover { border-color: var(--gold-dark); }
.referral-link-icon { font-size: 26px; flex-shrink: 0; }
.referral-link-info { flex: 1; min-width: 0; }
.referral-link-name { font-weight: 600; font-size: 14px; color: var(--text); }
.referral-link-url { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.referral-link-cps { font-size: 11px; color: var(--gold); margin-top: 2px; }
.referral-link-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-copy {
  padding: 6px 12px; border: 1px solid var(--panel-border);
  background: transparent; color: var(--text); border-radius: 16px;
  font-size: 12px; cursor: pointer; transition: all 0.2s; font-family: var(--sans);
}
.btn-copy:hover { border-color: var(--gold); color: var(--gold); }

/* Click list */
.click-list { background: var(--bg-2); border: 1px solid var(--panel-border); border-radius: var(--radius); overflow: hidden; }
.click-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--panel-border); }
.click-item:last-child { border-bottom: none; }
.click-icon { font-size: 18px; }
.click-name { flex: 1; font-size: 14px; color: var(--text); }
.click-time { font-size: 12px; color: var(--text-dim); }

/* === Admin === */
.admin-container { max-width: 980px; margin: 0 auto; padding: 0 0 60px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.admin-stat { background: var(--bg-2); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 18px; text-align: center; }
.admin-stat-num { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--gold-light); }
.admin-stat-label { font-size: 12px; color: var(--text-dim); }

.admin-table { width: 100%; background: var(--bg-2); border: 1px solid var(--panel-border); border-radius: var(--radius); overflow: hidden; }
.admin-table th { text-align: left; padding: 12px 16px; background: var(--panel); font-size: 13px; color: var(--text-dim); font-weight: 500; }
.admin-table td { padding: 12px 16px; border-top: 1px solid var(--panel-border); font-size: 14px; color: var(--text); }
.admin-table tr:hover td { background: var(--panel); }
.admin-actions { display: flex; gap: 8px; }
.admin-btn {
  padding: 4px 10px; border: 1px solid var(--panel-border); border-radius: 12px;
  font-size: 12px; cursor: pointer; background: transparent; color: var(--text);
  font-family: var(--sans);
}
.admin-btn:hover { border-color: var(--gold); color: var(--gold); }
.admin-btn.danger:hover { border-color: #d9655b; color: #d9655b; }
.admin-add-btn {
  margin-bottom: 14px; padding: 9px 20px;
  background: var(--gold); color: #2a2724; border: none; border-radius: 20px;
  font-size: 13px; cursor: pointer; font-family: var(--sans); font-weight: 600;
}
.admin-add-btn:hover { background: var(--gold-light); }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.admin-tab {
  padding: 8px 16px; border: 1px solid var(--panel-border);
  background: transparent; border-radius: 16px;
  font-size: 14px; cursor: pointer; color: var(--text-dim); font-family: var(--sans);
}
.admin-tab.active { background: var(--gold); color: #2a2724; border-color: var(--gold); font-weight: 600; }

.admin-form-field { margin-bottom: 12px; }
.admin-form-field label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--text-dim); }
.admin-form-field input, .admin-form-field textarea, .admin-form-field select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--panel-border); border-radius: 8px;
  font-size: 14px; outline: none; font-family: var(--sans);
  background: var(--panel); color: var(--text);
}
.admin-form-field input::placeholder { color: var(--text-mute); }
.admin-form-field input:focus, .admin-form-field textarea:focus { border-color: var(--gold); }
.admin-form-row { display: flex; gap: 14px; }
.admin-form-row > * { flex: 1; }
.checkbox-field { display: flex; align-items: center; gap: 8px; }
.checkbox-field input { width: 16px; height: 16px; }

/* === Toast === */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--bg-2); border: 1px solid var(--gold-dark);
  color: var(--gold-light); padding: 12px 24px; border-radius: 24px;
  font-size: 14px; z-index: 300; opacity: 0; transition: all 0.3s; pointer-events: none;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === Footer === */
.footer {
  text-align: center; padding: 32px 24px;
  border-top: 1px solid var(--panel-border); background: var(--bg-2);
  position: relative; z-index: 2; font-family: var(--serif);
}
.footer-brand { font-size: 14px; color: var(--gold-light); }
.footer-sub { font-size: 12px; margin-top: 6px; color: var(--text-dim); font-family: var(--sans); }

/* === Animations === */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardEnter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(201,168,120,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* === Responsive === */
@media (max-width: 980px) {
  .main-wrap { flex-direction: column; padding: 16px; }
  .sidebar { width: 100%; position: static; max-height: none; }
  .category-nav { flex-direction: row; flex-wrap: wrap; overflow-x: auto; }
  .cat-tab { width: auto; flex-shrink: 0; }
  .hero-title { font-size: 36px; }
  .title-bracket-lg { font-size: 32px; }
  .hero-stats-row { gap: 20px; padding: 12px 20px; }
  .header-inner { padding: 0 16px; }
  .search-bar { display: none; }
}
@media (max-width: 600px) {
  .hero { padding: 40px 20px 32px; }
  .hero-title { font-size: 28px; }
  .tools-grid { grid-template-columns: 1fr; }
  .header-nav { gap: 6px; }
  .btn-login, .btn-register { padding: 6px 12px; font-size: 13px; }
}

/* === Share Modal === */
.share-modal-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text);
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.share-btn {
  flex: 1;
  min-width: 70px;
  padding: 12px 8px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text);
  transition: all 0.2s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.share-weibo:hover { border-color: #e6162d; color: #e6162d; }
.share-qq:hover { border-color: #12b7f5; color: #12b7f5; }
.share-twitter:hover { border-color: #1da1f2; color: #1da1f2; }
.share-copy:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-bg); }
.share-wechat-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-mute);
  padding: 10px 8px 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.share-referral-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--gold-bg);
  border: 1px solid var(--panel-border);
}
.share-referral-title {
  font-size: 14px;
  color: var(--gold-light);
  margin-bottom: 12px;
  font-weight: 500;
}
.share-referral-link {
  display: flex;
  gap: 8px;
}
.share-referral-link input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: var(--bg);
  color: var(--text-dim);
  font-size: 12px;
  font-family: monospace;
}
.btn-copy-referral {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: var(--gold);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.btn-copy-referral:hover { background: var(--gold-dark); }
.share-referral-hint {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 8px;
}
.btn-share-modal {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-share-modal:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-bg);
}
