@charset "utf-8";
/* =========================================================
   英语在线词典 - 现代风格样式表
   主题变体 / 圆角变体 / 栅格变体 由 ASCII 伪原创引擎随机注入 body class
   ========================================================= */

:root {
  --brand: #4f46e5;
  --brand-2: #06b6d4;
  --brand-soft: #eef2ff;
  --text: #1f2430;
  --text-sub: #5b6472;
  --muted: #9aa3b2;
  --bg: #f6f7fb;
  --card: #ffffff;
  --line: #e8ebf2;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(31, 36, 48, .06);
  --shadow-lg: 0 18px 48px rgba(31, 36, 48, .12);
  --maxw: 1180px;
}

body.theme-b { --brand:#0ea5e9; --brand-2:#22d3ee; --brand-soft:#e0f2fe; }
body.theme-c { --brand:#16a34a; --brand-2:#84cc16; --brand-soft:#dcfce7; }
body.theme-d { --brand:#ea580c; --brand-2:#f59e0b; --brand-soft:#fff7ed; }
body.theme-e { --brand:#db2777; --brand-2:#f472b6; --brand-soft:#fdf2f8; }
body.theme-f { --brand:#7c3aed; --brand-2:#a855f7; --brand-soft:#f5f3ff; }

body.radius-s { --radius: 8px; }
body.radius-m { --radius: 16px; }
body.radius-l { --radius: 24px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: .3px; }
ul { list-style: none; margin: 0; padding: 0; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.ascii-decoy { display: none !important; }

/* ---------------- 顶部导航 ---------------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 22px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 800; font-size: 14px;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .28);
}
.logo-text { font-size: 17px; font-weight: 700; }
.nav-links { display: flex; gap: 18px; font-size: 14px; color: var(--text-sub); }
.nav-links a:hover { color: var(--brand); }
.nav-admin { color: var(--brand); font-weight: 600; }

.nav-search { position: relative; margin-left: auto; display: flex; flex: none; }
.nav-input {
  width: 220px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: 14px; outline: none; transition: .2s;
}
.nav-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.nav-search button {
  height: 36px; padding: 0 16px; margin-left: -44px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 13px; font-weight: 600;
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  margin: 26px 0 34px; padding: 56px 30px 46px;
  border-radius: calc(var(--radius) + 10px);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; text-align: center;
  box-shadow: var(--shadow-lg);
}
body.hero-b .hero { text-align: left; padding: 64px 44px; }
body.hero-c .hero { padding: 44px 30px 40px; border-radius: var(--radius); }
.hero-deco {
  position: absolute; inset: -60% -10% auto auto; width: 420px; height: 420px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .35), transparent 60%);
  filter: blur(6px);
}
.hero-title { position: relative; font-size: 32px; line-height: 1.4; }
.hero-slogan { position: relative; margin: 12px 0 26px; opacity: .92; font-size: 15px; }

.big-search { position: relative; max-width: 640px; margin: 0 auto; display: flex; }
body.hero-b .big-search { margin: 0; }
.big-search.small { margin: 22px auto 0; }
.big-input {
  flex: 1; height: 56px; padding: 0 24px; font-size: 16px;
  border: 0; border-radius: 999px; outline: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
}
.big-btn {
  width: 108px; margin-left: -108px; border: 0; border-radius: 999px; cursor: pointer;
  background: #1f2430; color: #fff; font-size: 16px; font-weight: 600; transition: .2s;
}
.big-btn:hover { background: #000; }

.hero-letters {
  position: relative; margin-top: 22px;
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
}
body.hero-b .hero-letters { justify-content: flex-start; }
.hero-letters a {
  min-width: 30px; height: 30px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 8px; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .18); color: #fff; transition: .2s;
}
.hero-letters a:hover, .hero-letters a.active { background: #fff; color: var(--brand); }
.block .hero-letters a { background: var(--brand-soft); color: var(--brand); }

/* ---------------- 字母索引导航（浅色背景区专用） ----------------
   注意：与 .hero-letters 分开。.hero-letters 的配色是白字+半透明白底，
   为首页 hero 深色渐变区设计；放到白底的字母索引页会导致文字隐形。 */
.letter-nav {
  margin: 18px 0 26px; padding: 16px 18px;
  display: flex; flex-wrap: wrap; gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.letter-nav a {
  min-width: 36px; height: 36px; padding: 0 9px;
  display: inline-grid; place-items: center;
  border-radius: 9px; font-size: 14px; font-weight: 600;
  text-decoration: none;
  color: var(--text-sub);
  background: var(--bg);
  border: 1px solid transparent;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.letter-nav a:hover {
  background: var(--brand-soft);
  color: var(--text);
  border-color: var(--brand);
}
/* 选中态用中性深色底而非品牌色底：
   品牌色在浅底上做白字时，部分主题（亮蓝/绿/橙）对比度不足 3:1，
   字会发虚。中性深色底对全部 6 套主题都稳在 12:1 以上，
   品牌色改由边框体现，既醒目又不挑主题。 */
.letter-nav a.active {
  background: linear-gradient(135deg, #2b3242, #1b202b);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(31, 36, 48, .18);
}

/* ---------------- 搜索联想 ---------------- */
.suggest-box {
  position: absolute; top: 62px; left: 0; right: 0; z-index: 60;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  overflow: hidden; display: none; text-align: left;
}
.nav-search .suggest-box { top: 42px; }
.suggest-box.show { display: block; }
.suggest-box a {
  display: block; padding: 10px 18px; font-size: 14px; color: var(--text);
}
.suggest-box a:hover { background: var(--brand-soft); color: var(--brand); }

/* ---------------- 区块与卡片 ---------------- */
.block { margin: 30px 0; }
.block-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.block-title { font-size: 19px; }
.block-title::before {
  content: ""; display: inline-block; width: 4px; height: 17px;
  margin-right: 9px; border-radius: 3px; vertical-align: -2px;
  background: linear-gradient(var(--brand), var(--brand-2));
}
.block-more { font-size: 13px; color: var(--brand); }

.word-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
body.grid-3 .word-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
body.grid-5 .word-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }

.wcard {
  display: flex; flex-direction: column; gap: 5px;
  padding: 15px 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.wcard:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand);
}
.wcard-word { font-size: 17px; font-weight: 700; color: var(--brand); word-break: break-all; }
.wcard-pron { font-size: 12px; color: var(--text-sub); }
.wcard-pron em { font-style: normal; color: var(--muted); margin-right: 3px; }
.wcard-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---------------- 单词详情页 ---------------- */
.crumb { margin: 18px 0; font-size: 13px; color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.crumb span { margin: 0 7px; }

.detail-card {
  padding: 30px 32px; background: var(--card);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}
.detail-word {
  font-size: 40px; line-height: 1.2; letter-spacing: .5px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  word-break: break-all;
}
.pron-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 6px; }
.pron-item {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px 8px 10px; border-radius: 999px;
  background: var(--brand-soft); font-size: 14px;
}
.pron-tag {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
}
.pron-tag.alt { background: var(--brand-2); }
.pron-text { font-family: "Times New Roman", serif; font-size: 16px; color: var(--text); }
.pron-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--brand); font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06); transition: .2s;
}
.pron-btn:hover { background: var(--brand); color: #fff; }
.pron-btn.alt:hover { background: var(--brand-2); }
.pron-btn.playing { animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }

.ico-sound {
  width: 12px; height: 12px;
  border-left: 4px solid currentColor; border-top: 4px solid transparent;
  border-bottom: 4px solid transparent; border-right: 0;
  display: inline-block; filter: drop-shadow(3px 0 0 currentColor);
}

.detail-desc { margin-top: 24px; }
.detail-sub { font-size: 16px; margin-bottom: 10px; }
.desc-body { font-size: 15px; line-height: 1.9; color: #333a47; word-break: break-word; }
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px;
  padding-top: 16px; border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--muted);
}
.copy-link {
  color: var(--brand); cursor: pointer;
  border: 0; background: none; padding: 0;
  font: inherit; font-size: 13px;
}

/* ---------------- 列表 / 分页 ---------------- */
.result-head { display: flex; align-items: baseline; gap: 14px; margin: 24px 0 18px; flex-wrap: wrap; }
.result-title { font-size: 24px; }
.result-count { font-size: 13px; color: var(--muted); }

.word-list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); transition: .2s;
}
.list-item:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.list-word { font-size: 17px; font-weight: 700; color: var(--brand); min-width: 120px; }
.list-pron { font-size: 13px; color: var(--text-sub); font-family: "Times New Roman", serif; }
.list-desc { font-size: 14px; color: var(--text-sub); flex: 1; min-width: 200px; }

.pager { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.pager a {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-grid; place-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; transition: .2s;
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager a.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  background: #fff; border: 1px solid var(--line); transition: .2s;
}
.chip:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

.empty, .empty-box {
  padding: 40px 20px; text-align: center; color: var(--text-sub);
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
}
.intro { padding: 24px 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.intro p { color: var(--text-sub); margin: 10px 0 0; }

/* ---------------- 底部 ---------------- */
.site-footer {
  margin-top: 46px; padding: 40px 0 26px;
  background: #171b24; color: #a8b0c0;
}
.footer-grid { display: grid; gap: 30px; grid-template-columns: 2fr 1fr 1.4fr; }
.footer-title { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-intro, .footer-list li { font-size: 13px; line-height: 2; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-list a:hover { color: #fff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  margin-top: 30px; padding-top: 18px; border-top: 1px solid #262c38; font-size: 13px;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-search { margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero { padding: 40px 20px 34px; border-radius: var(--radius); }
  .hero-title { font-size: 23px; }
  .big-input { height: 48px; font-size: 15px; padding: 0 18px; }
  .big-btn { width: 84px; margin-left: -84px; font-size: 14px; }
  .nav-input { width: 150px; }
  .detail-card { padding: 22px 18px; }
  .detail-word { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  body.grid-3 .word-grid, body.grid-5 .word-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
