/* ==========================================================================
   Lingua 英语词典 · 全局样式
   ========================================================================== */

/* ---------- 1. 基础 ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f7f9fc;
    color: #1e293b;
    line-height: 1.5;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
.word ul { list-style-type: none; }

/* ---------- 2. 布局 ---------- */
.page-container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 1.5rem 3rem; }

/* ---------- 3. 顶部导航 ---------- */
.site-header {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.site-header .logo { display: flex; align-items: center; gap: 0.75rem; }
.site-header .logo-icon {
    background: #2563eb; width: 44px; height: 44px;
    border-radius: 14px; display: flex; align-items: center;
    justify-content: center; color: #fff; font-size: 1.6rem;
}
.site-header .logo-text { font-weight: 700; font-size: 1.6rem; letter-spacing: -0.02em; color: #0f172a; }
.site-header .logo-text span { color: #2563eb; }
.site-header .nav-links { display: flex; gap: 1.8rem; }
.site-header .nav-links a { color: #475569; font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.site-header .nav-links a:hover { color: #2563eb; }
.site-header .nav-links a.active { color: #2563eb; font-weight: 600; }

/* ---------- 4. 通用组件 ---------- */
/* 卡片 */
.card {
    background: #fff; border-radius: 28px; padding: 2rem;
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.08);
    border: 1px solid #eef2f6;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.12); }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.5rem;
}
.card-header h2, .card-header h3 {
    font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em;
    display: flex; align-items: center; gap: 0.5rem; color: #0b1e3a;
}
.card-header h2 i, .card-header h3 i { color: #2563eb; font-size: 1.2rem; }
.badge {
    background: #dbeafe; color: #1e40af; padding: 0.3rem 0.9rem;
    border-radius: 40px; font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.02em;
}

/* 词性标签 */
.word-type {
    display: inline-block; background: #e6f0ff; padding: 0.25rem 0.8rem;
    border-radius: 30px; font-size: 0.78rem; font-weight: 600; color: #2563eb;
}

/* 区块标题（例句、近义词、反义词、词态变化共用） */
.word-means h3,
.word-relation h3,
.word-sentences h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0b1e3a;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
}

/* ---------- 5. 首页 Hero ---------- */
.hero { text-align: center; padding: 3rem 0 2.5rem; }
.hero h1 { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.75rem; color: #0b1e3a; }
.hero h1 .accent { color: #2563eb; }
.hero p { color: #64748b; font-size: 1.05rem; max-width: 640px; margin: 0 auto 2rem; }

.search-hero {
    display: flex; align-items: center; background: #fff;
    border-radius: 60px; padding: 0.4rem 0.4rem 0.4rem 1.6rem;
    max-width: 680px; margin: 0 auto;
    box-shadow: 0 16px 48px -16px rgba(0, 0, 0, 0.12);
    border: 1.5px solid transparent; transition: all 0.2s;
}
.search-hero:focus-within { border-color: #2563eb; box-shadow: 0 16px 48px -14px rgba(37, 99, 235, 0.22); }
.search-hero i { color: #94a3b8; font-size: 1.1rem; }
.search-hero input {
    flex: 1; border: none; outline: none; background: transparent;
    padding: 1rem 0.8rem; font-size: 1.05rem; font-family: inherit; color: #0f172a; min-width: 60px;
}
.search-hero input::placeholder { color: #94a3b8; }
.search-hero button {
    background: #2563eb; color: #fff; border: none; border-radius: 60px;
    padding: 0.95rem 2rem; font-weight: 600; font-size: 0.95rem; cursor: pointer;
    font-family: inherit; transition: background 0.2s; white-space: nowrap;
    display: flex; align-items: center; gap: 0.5rem;
}
.search-hero button:hover { background: #1d4ed8; }

.quick-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 1.5rem; }
.quick-tags .tag {
    background: #f8fafc; padding: 0.45rem 1.1rem; border-radius: 40px;
    font-size: 0.85rem; color: #334155; font-weight: 500;
    border: 1px solid #eef2f6; cursor: default; transition: all 0.2s;
}
.quick-tags .tag:hover { background: #eff6ff; border-color: #dbeafe; color: #1e40af; }

/* ---------- 6. 首页 · 每日一词 + 热门词汇 ---------- */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; margin-bottom: 2rem; }

.word-of-day { display: flex; flex-direction: column; gap: 0.8rem; }
.word-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.9rem; }
.word-main h2 { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; color: #0f172a; line-height: 1.1; word-break: break-word; }
.phonetic { color: #64748b; font-size: 1.05rem; font-weight: 400; }
.definition { font-size: 1.05rem; color: #1e293b; margin: 0.5rem 0; line-height: 1.6; font-weight: 500; }
.example {
    background: #f8fafc; padding: 1rem 1.2rem; border-radius: 18px;
    border-left: 4px solid #2563eb; font-style: italic;
    color: #334155; font-size: 0.95rem; line-height: 1.55;
}
.example i { color: #2563eb; margin-right: 0.5rem; font-size: 0.85rem; }
.example .translation { display: block; font-style: normal; color: #64748b; font-size: 0.85rem; margin-top: 0.4rem; }

.trending-list { display: flex; flex-direction: column; gap: 0.2rem; }
.trending-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 0.6rem; border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s; gap: 0.75rem; text-decoration: none; color: inherit; border-radius: 12px;
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { background: #f8fafc; }
.trending-word { display: flex; align-items: center; gap: 0.8rem; min-width: 0; flex: 1; }
.trending-word .rank {
    width: 28px; height: 28px; background: #f1f5f9; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.82rem; color: #475569; flex-shrink: 0;
}
.trending-word .rank.top { background: #2563eb; color: #fff; }
.trending-word .word-info { display: flex; flex-direction: column; min-width: 0; gap: 0.15rem; }
.trending-word .word-info strong { font-size: 1.1rem; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trending-word .word-info span { font-size: 0.85rem; color: #64748b; }
.trending-def { color: #475569; font-size: 0.95rem; max-width: 160px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }

/* 首页底部提示（合并重复定义，保留浅蓝卡片版本） */
.home-footer-note {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 1rem; padding: 1.2rem 1.5rem;
    background: #eff6ff; border-radius: 20px; border: 1px solid #dbeafe;
    color: #475569; font-size: 0.9rem; flex-wrap: wrap; gap: 0.5rem;
}
.home-footer-note i { color: #f59e0b; margin-right: 0.5rem; }
.home-footer-note a { color: #2563eb; font-weight: 500; white-space: nowrap; }
.home-footer-note a:hover { text-decoration: underline; }

/* ---------- 7. 列表页 ---------- */
.list-head {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem;
}
.list-head h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; color: #0b1e3a; }
.list-head h1 small { font-size: 0.9rem; font-weight: 500; color: #94a3b8; margin-left: 0.6rem; }

.list-search {
    display: flex; align-items: center; background: #fff;
    border-radius: 40px; padding: 0.3rem 0.3rem 0.3rem 1.1rem;
    border: 1px solid #eef2f6; gap: 0.4rem; min-width: 260px;
    box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.08); transition: all 0.2s;
}
.list-search:focus-within { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
.list-search i { color: #94a3b8; }
.list-search input {
    flex: 1; border: none; outline: none; background: transparent;
    padding: 0.6rem 0.2rem; font-family: inherit; font-size: 0.92rem; min-width: 60px;
}
.list-search button {
    background: #2563eb; color: #fff; border: none; border-radius: 40px;
    padding: 0.55rem 1.2rem; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; font-family: inherit; white-space: nowrap;
}

.filter-bar {
    background: #fff; border-radius: 20px; padding: 1.1rem 1.4rem;
    border: 1px solid #eef2f6; box-shadow: 0 6px 18px -12px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}
.filter-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.filter-row .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; font-weight: 600; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
    background: #f8fafc; border: 1px solid #eef2f6;
    padding: 0.35rem 0.9rem; border-radius: 30px;
    font-size: 0.82rem; color: #475569; font-weight: 500;
    text-decoration: none; transition: all 0.2s; white-space: nowrap;
}
.chip:hover { background: #eff6ff; border-color: #dbeafe; color: #1e40af; }
.chip.active { background: #2563eb; color: #fff; border-color: #2563eb; }

.letters { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid #f1f5f9; }
.letters a {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; font-size: 0.82rem; font-weight: 600;
    color: #475569; text-decoration: none; transition: all 0.15s;
}
.letters a:hover { background: #f1f5f9; }
.letters a.active { background: #2563eb; color: #fff; }

/* 检索条件标签（合并重复定义） */
.result-meta {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 1.2rem; flex-wrap: wrap; gap: 0.75rem; padding: 0 15px;
}
.result-meta p { font-size: 0.9rem; color: #64748b; }
.result-meta p strong { color: #0f172a; }
.result-meta select {
    border: 1px solid #e2e8f0; border-radius: 30px; padding: 0.45rem 1rem;
    font-family: inherit; font-size: 0.82rem; color: #475569;
    background: #fff; outline: none; cursor: pointer;
}
.result-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.result-count { font-size: 0.8rem; color: #64748b; white-space: nowrap; }
.result-count strong { color: #0f172a; font-weight: 600; }

.filter-tag {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: #eff6ff; border: 1px solid #dbeafe; border-radius: 40px;
    padding: 0.3rem 0.5rem 0.3rem 0.8rem; font-size: 0.8rem; color: #1e40af;
    text-decoration: none; transition: all 0.2s; white-space: nowrap;
}
.filter-tag:hover { background: #dbeafe; border-color: #bfdbfe; }
.filter-tag-label { color: #64748b; font-size: 0.75rem; }
.filter-tag-value { font-weight: 600; color: #1e40af; }
.filter-tag i { font-size: 0.65rem; color: #94a3b8; margin-left: 0.15rem; transition: color 0.2s; }
.filter-tag:hover i { color: #dc2626; }

.filter-clear {
    font-size: 0.8rem; color: #dc2626; text-decoration: none;
    padding: 0.3rem 0.7rem; border-radius: 40px; transition: background 0.2s;
}
.filter-clear:hover { text-decoration: underline; }

/* 单词网格 */
.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; }
.word-card {
    background: #fff; border-radius: 22px; padding: 1.4rem;
    border: 1px solid #eef2f6; text-decoration: none; color: inherit;
    display: flex; flex-direction: column; gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.word-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.12); border-color: #dbeafe; }
.word-card h3 { font-size: 1.25rem; font-weight: 700; color: #0b1e3a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.word-card .meta { font-size: 0.8rem; color: #94a3b8; }
.word-card .go { margin-top: auto; font-size: 0.8rem; color: #2563eb; font-weight: 500; display: flex; align-items: center; gap: 0.35rem; }

.empty { text-align: center; color: #94a3b8; padding: 3rem 1rem; }
.empty i { font-size: 2rem; margin-bottom: 0.75rem; display: block; }

/* 字母索引卡片 */
.letter-index-card {
    background: #fff; border-radius: 28px; padding: 2rem;
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.08);
    border: 1px solid #eef2f6;
}
.letter-index-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;
    padding-bottom: 1rem; border-bottom: 1px solid #f1f5f9;
}
.letter-index-head h2 {
    font-size: 1.2rem; font-weight: 600; color: #0b1e3a;
    display: flex; align-items: center; gap: 0.5rem; margin: 0;
}
.letter-index-head h2 i { font-size: 1rem; color: #fff; background: #2563eb; padding: 3px; border-radius: 3px; }
.letter-index-count {
    font-size: 0.78rem; color: #94a3b8; font-weight: 500;
    background: #f8fafc; padding: 0.25rem 0.8rem; border-radius: 20px; border: 1px solid #eef2f6;
}
.letter-index-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 0.6rem;
}
.letter-chip {
    display: flex; align-items: center; justify-content: center;
    height: 46px; border-radius: 14px; background: #f8fafc; border: 1px solid #eef2f6;
    color: #475569; font-size: 0.92rem; font-weight: 600;
    text-decoration: none; transition: all 0.2s; user-select: none;
}
.letter-chip:hover {
    background: #eff6ff; border-color: #dbeafe; color: #1e40af;
    transform: translateY(-2px); box-shadow: 0 6px 16px -8px rgba(37, 99, 235, 0.2);
}
.letter-chip.active {
    background: #2563eb; border-color: #2563eb; color: #fff;
    box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.45);
}
.letter-chip:first-child { grid-column: span 2; font-size: 0.88rem; }

/* ---------- 8. 详情页 ---------- */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: #94a3b8; margin-bottom: 1.2rem; padding-left: 2rem; flex-wrap: wrap; }
.breadcrumb a { color: #64748b; transition: color 0.2s; }
.breadcrumb a:hover { color: #2563eb; }
.breadcrumb i { font-size: 0.6rem; }

/* 迷你搜索栏 */
.top-search-bar {
    background: #fff; border-radius: 60px; padding: 0.4rem 0.4rem 0.4rem 1.2rem;
    display: flex; align-items: center; gap: 0.5rem;
    box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.08);
    border: 1px solid #eef2f6; margin-bottom: 2rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.top-search-bar:focus-within { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); border-color: #2563eb; }
.top-search-bar i { color: #64748b; font-size: 1rem; }
.top-search-bar input {
    flex: 1; border: none; background: transparent;
    padding: 0.7rem 0.3rem; font-size: 1rem; font-family: inherit; outline: none; color: #0f172a; min-width: 100px;
}
.top-search-bar input::placeholder { color: #94a3b8; }
.top-search-bar button {
    background: #2563eb; color: #fff; border: none; border-radius: 40px;
    padding: 0.6rem 1.4rem; font-weight: 600; font-size: 0.9rem; cursor: pointer;
    transition: background 0.2s, transform 0.1s; font-family: inherit; white-space: nowrap;
}
.top-search-bar button:hover { background: #1d4ed8; }
.top-search-bar button:active { transform: scale(0.97); }

/* 主卡片 */
.word-detail-card {
    background: #fff; border-radius: 32px; padding: 2.5rem;
    box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.08);
    border: 1px solid #eef2f6; margin-bottom: 2rem;
}
.word-detail-card .word-header { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-bottom: 0.75rem; }
.word-detail-card .word-header h1 {
    font-size: 3.5rem; font-weight: 700; letter-spacing: -0.03em; color: #0b1e3a; line-height: 1.1;
}
.word-detail-card .word-header h3 { font-size: 1.05rem; margin-bottom: 0.8rem; color: #0b1e3a; }
.word-symbols { display: flex; flex-direction: row; gap: 20px; font-size: 1rem; color: #64748b; }

/* 词态变化 */
.word-exchange {
    display: flex; flex-direction: row; flex-wrap: wrap; width: 100%;
    gap: 8px 16px; font-size: 0.85rem; margin: 20px 0; color: #64748b;
}
.word-exchange h3 { width: 100%; padding-bottom: 0; margin: 0; }
.word-exchange li { padding: 0.5rem 1rem; max-width: 100%; box-sizing: border-box; }
.word-exchange a { color: #2563eb; }

/* 释义区 */
.word-means { display: flex; flex-direction: column; gap: 2px; border-top: 1px dashed #c7cfd7; padding: 40px 0; margin: 40px 0 0 0;  }
.word-means-item {
    display: flex; flex-direction: row; align-items: flex-start;
    gap: 6px; padding-bottom: 14px;
}
.word-means-item:last-child { border-bottom: none; padding-bottom: 0; }
.word-means-text {
    flex: 1; min-width: 0; font-size: 1.05rem; color: #1e293b;
    font-weight: 500; line-height: 1.65; word-break: break-word;
}

/* 例句 */
.word-sentences { border-top: 1px dashed #c7cfd7; padding: 40px 0; }
.word-sentences strong { background: #c0ff00; }

/* 旧版例句类名（如果视图仍在用 .definition-item / .example-sentence） */
.definition-block { margin-bottom: 2rem; }
.definition-item {
    display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid #f1f5f9;
}
.definition-item:last-child { border-bottom: none; }
.def-number { font-weight: 700; font-size: 1.1rem; color: #2563eb; min-width: 28px; }
.def-content { flex: 1; }
.def-content p { font-size: 1.1rem; color: #1e293b; margin-bottom: 0.5rem; font-weight: 500; }
.def-content .def-label {
    display: inline-block; background: #f1f5f9; padding: 0.2rem 0.7rem;
    border-radius: 20px; font-size: 0.75rem; font-weight: 600;
    color: #475569; margin-right: 0.5rem; text-transform: uppercase;
}
.def-content .example-sentence {
    font-style: italic; color: #475569; font-size: 0.98rem;
    padding-left: 1rem; border-left: 3px solid #cbd5e1; margin-top: 0.5rem;
}
.def-content .example-sentence i { color: #94a3b8; margin-right: 0.3rem; }
.def-content .example-sentence .translation {
    display: block; font-style: normal; color: #64748b;
    font-size: 0.9rem; margin-top: 0.3rem;
}

/* 近义词 / 反义词（旧版视图用 .related-grid + .related-item 时，胶囊式） */
.word-relation { border-top: 1px dashed #c7cfd7; padding: 40px 0; }
.word-relation .related-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.word-relation .related-item {
    background: #f8fafc; border: 1px solid #eef2f6; border-radius: 40px;
    padding: 0.45rem 1.1rem; transition: all 0.2s; cursor: pointer;
}
.word-relation .related-item:hover { background: #eff6ff; border-color: #dbeafe; transform: translateY(-2px); }
.word-relation .related-item a { color: #2563eb; font-weight: 500; font-size: 0.9rem; text-decoration: none; }
.word-relation .related-item a:hover { text-decoration: underline; }

/* 新版近义词 / 反义词（.word-relation-list + .word-relation-item） */
.word-relation-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.word-relation-item {
    background: #f8fafc; border: 1px solid #eef2f6; border-radius: 40px;
    padding: 0.45rem 1.1rem; transition: all 0.2s; cursor: pointer;
}
.word-relation-item:hover { background: #eff6ff; border-color: #dbeafe; transform: translateY(-2px); }
.word-relation-item a { color: #2563eb; font-weight: 500; font-size: 0.9rem; text-decoration: none; }
.word-relation-item a:hover { text-decoration: underline; }

/* 相关词汇 */
.related-section {
    background: #fff; border-radius: 28px; padding: 2rem;
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef2f6;
}
.related-section h3 {
    font-size: 1.3rem; font-weight: 600; margin-bottom: 1.2rem;
    display: flex; align-items: center; gap: 0.5rem; color: #0b1e3a;
}
.related-section h3 i { color: #2563eb; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.related-item {
    background: #f8fafc; border-radius: 18px; padding: 1rem 1.2rem;
    border: 1px solid #eef2f6; transition: all 0.2s; cursor: default;
    text-decoration: none; color: inherit;
}
.related-item:hover { background: #f1f5f9; border-color: #cbd5e1; transform: translateY(-2px); }
.related-item strong { display: block; font-size: 1rem; font-weight: 600; color: #0f172a; margin-bottom: 0.2rem; }
.related-item span { width: 100%; font-size: 0.82rem; color: #64748b; display: inline-block; }

/* 详情页底部提示 */
.detail-footer-note {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 1rem; padding-top: 1.5rem; border-top: 1px solid #e2e8f0;
    color: #94a3b8; font-size: 0.9rem; flex-wrap: wrap; gap: 0.5rem;
}
.detail-footer-note a { color: #2563eb; font-weight: 500; text-decoration: none; }
.detail-footer-note a:hover { text-decoration: underline; }

/* ---------- 9. 分页 ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.4rem; margin: 2.5rem 0 1rem; flex-wrap: wrap; user-select: none; }
.pagination .page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 0.9rem; border-radius: 14px;
    background: #fff; border: 1px solid #e2e8f0; color: #475569;
    font-size: 0.88rem; font-weight: 500; text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
    box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.04); white-space: nowrap;
}
.pagination .page-link:hover { background: #eff6ff; border-color: #dbeafe; color: #1e40af; }
.pagination .page-link:active { transform: scale(0.97); }
.pagination .page-link.current { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.45); pointer-events: none; }
.pagination .page-link.disabled { background: #f8fafc; border-color: #eef2f6; color: #cbd5e1; pointer-events: none; box-shadow: none; }
.pagination .page-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 40px; color: #94a3b8; font-size: 0.9rem; font-weight: 500; }
.pagination-summary { text-align: center; color: #94a3b8; font-size: 0.82rem; font-weight: 400; margin-bottom: 1.5rem; letter-spacing: 0.01em; }

/* ---------- 10. 页脚 ---------- */
.site-footer {
    max-width: 1200px; width: 100%; margin: 0 auto;
    padding: 1.8rem 1.5rem; border-top: 1px solid #eef2f6;
    color: #94a3b8; font-size: 0.85rem; text-align: center;
}


/* ---------- 返回顶部按钮 ---------- */
.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 24px -8px rgba(37, 99, 235, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.2s;
    z-index: 1000;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}
.back-to-top:active {
    transform: scale(0.95);
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 800px) {
    .site-header { padding-top: 1.5rem; flex-direction: column; align-items: flex-start; gap: 1rem; }
    .site-header .nav-links { gap: 1.2rem; flex-wrap: wrap; }
    .page-container { padding: 0 1rem 2rem; }

    .hero { padding: 2rem 0 1.5rem; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 0.98rem; }
    .search-hero { flex-direction: column; align-items: stretch; border-radius: 24px; padding: 0.6rem; gap: 0.6rem; }
    .search-hero i { display: none; }
    .search-hero input { padding: 1rem; text-align: center; }
    .search-hero button { border-radius: 16px; justify-content: center; padding: 0.9rem 1.5rem; }

    .home-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    .word-main h2 { font-size: 2.1rem; }

    .list-head { flex-direction: column; align-items: flex-start; }
    .list-search { width: 100%; min-width: 0; }

    .letter-index-card { padding: 1.4rem; }
    .letter-index-head h2 { font-size: 1.05rem; }
    .letter-index-grid { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 0.45rem; }
    .letter-chip { height: 40px; font-size: 0.85rem; border-radius: 12px; }
    .letter-chip:first-child { grid-column: span 3; }
    .home-footer-note { flex-direction: column; align-items: flex-start; padding: 1rem 1.2rem; }

    .result-meta { flex-direction: column; align-items: stretch; }
    .result-meta select { width: 100%; }

    .word-detail-card { padding: 1.8rem; }
    .word-detail-card .word-header h1 { font-size: 2.6rem; }
    .info-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    

    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 640px) {
    .word-means-item { flex-direction: column; gap: 6px; padding-bottom: 12px; }
    .word-means-text { font-size: 1rem; line-height: 1.6; }
}

@media (max-width: 480px) {
    .site-header .logo-text { font-size: 1.3rem; }
    .site-header .logo-icon { width: 38px; height: 38px; font-size: 1.3rem; }
    .hero h1 { font-size: 1.7rem; }
    .card { padding: 1.4rem; }
    .word-main h2 { font-size: 1.8rem; }
    .word-header h1 { font-size: 1.8rem; }
    .word-header .phonetic-large { font-size: 1rem; }

    .list-head h1 { font-size: 1.6rem; }
    .list-head h1 small { display: block; margin-left: 0; margin-top: 0.3rem; }
    .word-grid { grid-template-columns: 1fr; }

    .trending-item { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .trending-def { text-align: left; max-width: 100%; }

    .pagination { gap: 0.3rem; margin: 2rem 0 0.8rem; }
    .pagination .page-link { min-width: 34px; height: 34px; padding: 0 0.6rem; border-radius: 10px; font-size: 0.8rem; }
    .pagination-summary { font-size: 0.78rem; }

    .def-item { flex-direction: column; gap: 0.3rem; }
    .def-num { min-width: 0; }

    .word-detail-card .word-header h1 { font-size: 2rem; }
    .word-detail-card .phonetic-large { font-size: 1.1rem; }
    .top-search-bar button { padding: 0.6rem 1rem; font-size: 0.8rem; }
    .definition-item { flex-direction: column; gap: 0.3rem; }
    .def-number { min-width: auto; }
    .detail-footer-note { flex-direction: column; align-items: flex-start; }
}