/* ============ 魔兽世界·时光服 工具箱 主题 ============ */

/* 魔兽标题字体（Metal-Lord，来自素材包；仅拉丁字符，中文自动回退雅黑） */
@font-face {
  font-family: 'WoWTitle';
  src: url('/fonts/WoWTitle.ttf') format('truetype');
  font-display: swap;
}

.hero-en {
  font-family: 'WoWTitle', "Microsoft YaHei", sans-serif;
  font-size: clamp(15px, 2.3vw, 25px);
  letter-spacing: .38em;
  text-indent: .38em;
  color: transparent;
  background: linear-gradient(180deg, #f4e3bc 0%, #c8aa6e 55%, #8a6d3b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .85));
  margin-bottom: 4px;
  user-select: none;
}
:root {
  --bg: #0d0f12;
  --bg-soft: #14171c;
  --panel: #1a1e25;
  --panel-2: #20252e;
  --line: #2a303a;
  --text: #d8dee9;
  --muted: #8a93a3;
  --gold: #c8aa6e;
  --gold-2: #e8c88a;
  --green: #6bc46b;
  --red: #e06c5f;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(1200px 500px at 50% -100px, #1c2430 0%, var(--bg) 60%) fixed;
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, pre, textarea { font-family: Consolas, "Courier New", monospace; }
kbd { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-size: .85em; }

.container { width: min(1200px, 92%); margin: 0 auto; }
.container-narrow { width: min(860px, 94%); }
.container-tiny { width: min(430px, 94%); }

.muted { color: var(--muted); }
.inline-form { display: inline-block; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 15, 18, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; padding: 10px 0; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-img {
  height: 38px; width: auto; display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .8));
}
.logo-text { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: 1px; white-space: nowrap; }
.logo-text span { color: var(--gold); }
.age-badge {
  height: 40px; width: auto; display: block; flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .8));
}
.age-badge-sm { height: 30px; vertical-align: -8px; margin-right: 8px; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a {
  color: var(--muted); padding: 6px 12px; border-radius: 7px; font-size: 14px;
  transition: .15s; text-decoration: none;
}
.main-nav a:hover { color: var(--text); background: var(--panel-2); }
.main-nav a.active { color: var(--gold-2); background: rgba(200, 170, 110, .12); }
.header-user { display: flex; align-items: center; gap: 10px; }
.user-badge { font-size: 14px; color: var(--text); }
.admin-tag {
  font-style: normal; font-size: 11px; color: #1a1308; background: var(--gold);
  border-radius: 4px; padding: 1px 6px; margin-left: 4px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 8px;
  padding: 8px 18px; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: .15s; text-align: center; line-height: 1.4;
}
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-xs { padding: 3px 9px; font-size: 12px; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #211703; font-weight: 600;
}
.btn-gold:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--gold); text-decoration: none; }
.btn-outline { background: transparent; color: var(--gold-2); border-color: var(--gold); }
.btn-outline:hover { background: rgba(200, 170, 110, .12); text-decoration: none; }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: rgba(224, 108, 95, .15); text-decoration: none; }
.btn-block { display: block; width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 提示条 ---------- */
.flash {
  padding: 10px 16px; border-radius: 8px; margin-top: 14px; font-size: 14px;
  border: 1px solid; position: relative;
}
.flash-success { background: rgba(107, 196, 107, .1); border-color: var(--green); color: var(--green); }
.flash-error { background: rgba(224, 108, 95, .12); border-color: var(--red); color: var(--red); }
.flash-warning { background: rgba(200, 170, 110, .12); border-color: var(--gold); color: var(--gold-2); }
.flash-close { position: absolute; right: 10px; top: 6px; cursor: pointer; border: none; background: none; color: inherit; font-size: 16px; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  padding: 60px 0 44px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(13, 15, 18, .3) 0%, rgba(13, 15, 18, .52) 35%, rgba(13, 15, 18, .84) 70%, #0d0f12 100%),
    url('/images/backgrounds/wow-cn-hero.jpg') center top / cover no-repeat;
}
.hero-title {
  font-size: clamp(28px, 4.5vw, 46px); letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .9);
}
.hero-title span { color: var(--gold); }
.hero-sub { color: var(--muted); margin: 12px 0 26px; font-size: 15px; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.hero-age-note {
  display: inline-flex; align-items: center;
  color: #9aa3b2; font-size: 13px; margin: 0 0 20px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .9);
}
.hero-stats .stat b, .hero-stats .stat span { text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }

/* ---------- 界面小图标（素材包 Icons） ---------- */
.ico {
  width: 18px; height: 18px; object-fit: cover;
  border-radius: 5px; vertical-align: -4px; margin-right: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.ico-lg { width: 22px; height: 22px; vertical-align: -5px; }
.main-nav a { display: inline-flex; align-items: center; }
.main-nav a img { width: 16px; height: 16px; border-radius: 4px; margin-right: 5px; object-fit: cover; }
.section-head h2, .panel h3 { display: flex; align-items: center; }
.section-head h2 .ico, .panel h3 .ico { flex: none; }
.hero-search {
  display: flex; gap: 10px; justify-content: center; max-width: 560px; margin: 0 auto 22px;
}
.hero-search input {
  flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 16px; color: var(--text); font-size: 14px; outline: none;
}
.hero-search input:focus { border-color: var(--gold); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 26px; color: var(--gold-2); }
.stat span { font-size: 12px; color: var(--muted); }

/* ---------- 通用区块 ---------- */
.section { padding: 22px 0 40px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 14px; }
.section-head h2 { font-size: 19px; }
.more { font-size: 13px; color: var(--muted); }
.page-head {
  padding: 34px 0 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(200, 170, 110, .06), transparent);
}
.page-head h1 { font-size: 26px; letter-spacing: 1px; }
.page-head p { color: var(--muted); margin-top: 6px; }

/* ---------- 职业卡片 ---------- */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.class-grid-lg { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.class-card {
  --acc: #9c9c9c;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; text-decoration: none; transition: .18s; position: relative;
  display: flex; flex-direction: column; gap: 4px;
}
.class-card:hover { transform: translateY(-3px); border-color: var(--acc); box-shadow: var(--shadow); text-decoration: none; }
.class-dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--acc);
  box-shadow: 0 0 10px var(--acc); margin-bottom: 6px;
}
.class-img {
  width: 46px; height: 46px; border-radius: 10px; margin-bottom: 8px;
  background: rgba(0, 0, 0, .4); object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
}
.class-grid-lg .class-img { width: 54px; height: 54px; }
.chip-img {
  width: 15px; height: 15px; border-radius: 4px; object-fit: cover;
  vertical-align: -3px; margin-right: 5px;
}
.detail-class-icon {
  width: 58px; height: 58px; border-radius: 13px; object-fit: cover;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
  margin-bottom: 10px; display: block;
}
.class-card b { color: var(--text); font-size: 16px; }
.class-card small { color: var(--muted); font-size: 12px; }
.class-count {
  position: absolute; top: 12px; right: 12px; font-size: 11px; color: var(--acc);
  background: rgba(255, 255, 255, .05); padding: 2px 8px; border-radius: 20px;
}

/* ---------- WA 卡片 ---------- */
.wa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.wa-card {
  --acc: #9c9c9c;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; transition: .18s; position: relative; overflow: hidden;
}
.wa-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--acc);
}
.wa-card:hover { transform: translateY(-3px); border-color: var(--acc); box-shadow: var(--shadow); text-decoration: none; }
.wa-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wa-card-title { font-size: 15px; color: var(--text); }
.wa-card-desc { font-size: 12.5px; color: var(--muted); flex: 1; }
.wa-card-bottom { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.wa-card-version { margin-left: auto; font-size: 11px; color: var(--muted); }

.class-chip {
  --acc: #9c9c9c;
  font-size: 12px; color: var(--acc); border: 1px solid var(--acc);
  border-radius: 20px; padding: 1px 10px;
}
.chip-gold { font-size: 11px; color: var(--gold-2); border: 1px solid var(--gold); border-radius: 20px; padding: 1px 8px; }
.chip-green { font-size: 11px; color: var(--green); border: 1px solid var(--green); border-radius: 20px; padding: 1px 8px; }
.chip-grey { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 1px 8px; }

/* ---------- 详情页 ---------- */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.detail-chips { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.detail-meta { font-size: 13px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.warn-tip { color: var(--gold-2); font-size: 13px; margin-top: 10px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin: 16px 0;
}
.panel h3 { font-size: 15px; margin-bottom: 10px; color: var(--gold-2); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.panel-head h3 { margin-bottom: 0; }
.panel ul, .panel ol { padding-left: 20px; }
.panel li { margin: 5px 0; font-size: 14px; }
.pre-line { white-space: pre-line; }

.wa-code {
  background: #0a0c0f; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; font-size: 12px; line-height: 1.5; color: #b8c4d4;
  max-height: 380px; overflow: auto; word-break: break-all; white-space: pre-wrap;
}
.wa-code-sm { max-height: 140px; font-size: 11px; margin: 8px 0; }
.wa-code-actions { margin-top: 12px; display: flex; gap: 8px; }
.back-link { margin: 20px 0; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; color: var(--text); margin-bottom: 6px; }
.field .req { color: var(--red); font-style: normal; }
.field-hint { font-size: 12px; color: var(--muted); }
.field input[type="text"], .field input[type="password"], .field input[type="email"],
.field textarea, .field select, .filter-bar input, .filter-bar select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; color: var(--text); font-size: 14px; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus,
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--gold); }
.field select { appearance: auto; }
.field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.wa-textarea { font-size: 12px; min-height: 180px; }
.wa-input-tools { display: flex; gap: 8px; margin-bottom: 8px; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.chk input { width: auto !important; }

/* ---------- 筛选栏 / 分页 ---------- */
.filter-bar { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.filter-bar input { flex: 1; min-width: 180px; }
.filter-bar select { width: auto; min-width: 110px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 28px; color: var(--muted); font-size: 14px; }
.empty { text-align: center; padding: 50px 0; color: var(--muted); }
.empty-emoji { font-size: 40px; margin-bottom: 8px; }

/* ---------- 工具盒子 ---------- */
.tools-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 26px; }
.tools-box-item {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 8px;
}
.tools-box-item h3 { font-size: 15px; color: var(--gold-2); }
.tools-box-item p { font-size: 13px; color: var(--muted); flex: 1; }

/* ---------- 认证页 ---------- */
.auth-section { padding-top: 50px; }
.auth-panel { padding: 30px; }
.auth-panel h2 { margin-bottom: 6px; }
.auth-switch { margin-top: 16px; font-size: 13px; text-align: center; color: var(--muted); }
.error-panel { text-align: center; padding: 40px; }
.error-emoji { font-size: 46px; margin-bottom: 10px; }

/* ---------- 后台 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column;
}
.stat-card b { font-size: 24px; color: var(--gold-2); }
.stat-card span { font-size: 13px; color: var(--muted); }
.stat-card small { font-size: 11px; color: var(--muted); opacity: .8; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 14px 0; }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--panel-2); color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255, 255, 255, .02); }
.td-actions { white-space: nowrap; display: flex; gap: 6px; }

/* ---------- 版本历史 ---------- */
.version-row { border-left: 3px solid var(--line); }
.version-latest { border-left-color: var(--gold); }
.version-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.version-badge {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 8px; font-size: 12px; color: var(--gold-2);
}
.version-note { font-size: 13px; }
.version-content { margin: 10px 0; }

/* ---------- 页脚 / 提示 ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: auto; padding: 26px 0; text-align: center; font-size: 13px; }
.site-footer p { margin: 3px 0; }
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--panel-2); border: 1px solid var(--gold); color: var(--gold-2);
  padding: 10px 22px; border-radius: 30px; font-size: 14px; opacity: 0;
  transition: .3s; z-index: 100; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .header-inner { gap: 12px; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; }
  .field-row { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; }
  .table { display: block; overflow-x: auto; }
}

/* ---------- 网站导航 ---------- */
.hidden { display: none !important; }
.nav-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.nav-form-wrap { padding-bottom: 8px; }
.nav-form {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.nav-form label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.nav-form label em { color: var(--red); font-style: normal; }
.nav-form input, .nav-form select {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; color: var(--text); font-size: 14px; outline: none; width: 100%;
}
.nav-form input:focus, .nav-form select:focus { border-color: var(--gold); }
.nav-form .btn { align-self: flex-start; }
.nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.nav-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s, transform .15s;
}
.nav-card:hover { border-color: rgba(200, 170, 110, .45); transform: translateY(-1px); }
.nav-card-private { border-style: dashed; }
.nav-card-top { display: flex; align-items: center; gap: 12px; }
.nav-ico {
  width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
}
.nav-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 15px; font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-title:hover { color: var(--gold); }
.nav-url { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.nav-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-tag {
  font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 20px;
}
.nav-tag.tag-gold { color: var(--gold-2); border-color: var(--gold); background: rgba(200, 170, 110, .1); }
.nav-meta .btn { margin-left: auto; }
.nav-edit {
  display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.nav-edit input, .nav-edit select {
  background: var(--panel); border: 1px solid var(--line); border-radius: 7px;
  padding: 6px 10px; color: var(--text); font-size: 13px; outline: none;
}
.nav-edit input[type=text], .nav-edit input:not([type]), .nav-edit input[name=title], .nav-edit input[name=url] { min-width: 160px; }
.nav-edit input:focus, .nav-edit select:focus { border-color: var(--gold); }
.inline-form { display: inline; }

/* ---------- 账户设置 ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.stack-form label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.stack-form input {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; color: var(--text); font-size: 14px; outline: none;
}
.stack-form input:focus { border-color: var(--gold); }
.stack-form .btn { align-self: flex-start; }
@media (max-width: 760px) {
  .settings-grid { grid-template-columns: 1fr; }
}

/* ---------- MySlot ---------- */
.code-block {
  background: #0a0c0f; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; font-family: Consolas, Menlo, monospace; font-size: 12px;
  color: #9fb3c8; white-space: pre-wrap; word-break: break-all;
  line-height: 1.7; max-height: 420px; overflow: auto; margin: 0;
}
.myslot-content { user-select: all; }
.row-line { display: flex; align-items: center; gap: 10px; }
.file-btn { position: relative; cursor: pointer; user-select: none; }
.file-btn input.file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}
