/* ============================================
   Beautiful WP Theme — Design System v4
   规范: Inter 字体 | Notion/Linear 风格 | 8px spacing | xl rounded
   ============================================ */

/* === Bootstrap CSS 变量覆盖 === */
:root {
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bs-body-bg: #fafbfc;
    --bs-body-color: #1e293b;
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79,70,229;
    --bs-link-color: #4f46e5;
    --bs-link-hover-color: #4338ca;
    --bs-border-radius: 0.75rem;
    --bs-border-radius-lg: 1rem;
    --bs-border-radius-sm: 0.5rem;
    --bs-border-color: #e2e8f0;
    --bs-card-border-radius: 1rem;
    --bs-card-border-color: #e2e8f0;
    --bs-card-cap-bg: #fff;
    --bs-btn-border-radius: 0.5rem;
    --bs-input-border-radius: 0.5rem;
    --bs-nav-link-color: #64748b;
}

/* === 全局 === */
body {
    font-family: 'Inter', var(--bs-body-font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.7;
    letter-spacing: -0.1px;
    background: #fafbfc;
}
a { color: #4f46e5; text-decoration: none; transition: color .15s; }
a:hover { color: #4338ca; }

/* === 排版 === */
h1,h2,h3,h4,h5,h6 { font-weight: 700; letter-spacing: -.02em; color: #0f172a; }
h1 { font-size: 2.25rem; } h2 { font-size: 1.875rem; } h3 { font-size: 1.5rem; }
.display-5 { font-weight: 800; letter-spacing: -.03em; }

/* === 导航栏 — 毛玻璃 === */
.apm-header .navbar {
    background: rgba(255,255,255,.88) !important;
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid #e2e8f0;
    padding: 4px 0;
}
.apm-header .nav-link { font-size: .875rem; font-weight: 500; border-radius: .5rem; padding: .35rem .75rem; color: #475569; }
.apm-header .nav-link:hover { background: #f1f5f9; color: #0f172a; }
.apm-header .nav-link.active { background: #eef2ff; color: #4f46e5; }
.apm-header .navbar-brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }

/* === 按钮 === */
.btn { font-weight: 600; letter-spacing: -.01em; padding: .5rem 1.25rem; transition: all .15s ease; }
.btn-primary { background: #4f46e5; border-color: #4f46e5; }
.btn-primary:hover { background: #4338ca; border-color: #4338ca; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.25); }
.btn-outline-primary { color: #4f46e5; border-color: #cbd5e1; }
.btn-outline-primary:hover { background: #eef2ff; border-color: #4f46e5; color: #4f46e5; }
.btn-light { background: #fff; border: 1px solid #e2e8f0; }
.btn-light:hover { background: #f8fafc; }
.btn-lg { padding: .65rem 1.5rem; font-size: 1rem; border-radius: .625rem; }
.btn-sm { padding: .3rem .75rem; font-size: .8rem; }

/* === 卡片 === */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    transition: all .25s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.card:hover { box-shadow: 0 8px 25px rgba(0,0,0,.07); }
.card-header { border-bottom: 1px solid #f1f5f9; font-weight: 600; padding: 1rem 1.25rem; font-size: .9rem; }
.card-body { padding: 1.25rem; }
.card-footer { background: #f8fafc; border-top: 1px solid #f1f5f9; }

/* === 表单 === */
.form-control, .form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: .5rem;
    font-size: .9rem;
    padding: .5rem .8rem;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
    outline: none;
}
.form-control-lg { padding: .65rem 1rem; font-size: .95rem; }
.form-label { font-weight: 500; color: #334155; font-size: .85rem; margin-bottom: .3rem; }

/* === 徽标 === */
.badge { font-weight: 600; letter-spacing: .2px; border-radius: 9999px; padding: .3em .7em; font-size: .72rem; }

/* === 分页 === */
.pagination { gap: 4px; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; height: 2.25rem; border-radius: .5rem; font-size: .85rem; font-weight: 600; border: 1px solid #e2e8f0; color: #475569; transition: all .15s; }
.page-numbers.current { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.page-numbers:hover:not(.current) { background: #f1f5f9; }

/* === 表格 === */
.table { --bs-table-hover-bg: #f8fafc; }
.table thead th { font-weight: 600; color: #475569; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; border-bottom-width: 2px; }

/* === 页脚 === */
.apm-footer { background: #0f172a; color: #94a3b8; padding: 3rem 0 1.5rem; font-size: .9rem; }
.apm-footer h5,.apm-footer h6 { color: #fff; font-weight: 700; }
.apm-footer a { color: #94a3b8; }
.apm-footer a:hover { color: #fff; }

/* === 导航栏层级 === */
.apm-header { position: sticky; top: 0; z-index: 9999; }
.apm-header .dropdown-menu { z-index: 99999 !important; position: absolute; }

/* === 轮播 === */
.carousel { border-radius: 1rem; overflow: hidden; position: relative; z-index: 1; }

/* === Toast === */
.apm-toast { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 9999; padding: .75rem 1.5rem; border-radius: .75rem; color: #fff; font-size: .875rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.15); animation: slideIn .25s ease; }
@keyframes slideIn { from{transform:translateX(60px);opacity:0} to{transform:none;opacity:1} }
.apm-toast.success { background: #059669; }
.apm-toast.error { background: #dc2626; }

/* === 加载 spinner === */
.apm-loading { width: 1.25rem; height: 1.25rem; border: 2.5px solid #e2e8f0; border-top-color: #4f46e5; border-radius: 50%; animation: spin .5s linear infinite; display: inline-block; }
@keyframes spin { to{transform:rotate(360deg)} }

/* === Prose 排版（文章内容） === */
.apm-content h1 { font-size: 2rem; font-weight: 800; margin: 1.5rem 0 .75rem; }
.apm-content h2 { font-size: 1.5rem; font-weight: 700; margin: 1.25rem 0 .5rem; }
.apm-content h3 { font-size: 1.25rem; font-weight: 600; margin: 1rem 0 .5rem; }
.apm-content p { margin-bottom: 1rem; line-height: 1.75; }
.apm-content img { border-radius: .75rem; max-width: 100%; height: auto; margin: 1rem 0; }
.apm-content blockquote { border-left: 4px solid #e2e8f0; padding-left: 1rem; font-style: italic; color: #64748b; margin: 1rem 0; }
.apm-content code { background: #f1f5f9; padding: .15rem .35rem; border-radius: .25rem; font-size: .88em; font-family: 'JetBrains Mono','SF Mono',monospace; }
.apm-content pre { background: #1e293b; color: #e2e8f0; padding: 1rem 1.25rem; border-radius: .75rem; overflow-x: auto; font-size: .85rem; line-height: 1.6; }

/* === Tab 导航 === */
.nav-tabs { border-bottom: 2px solid #e2e8f0; }
.nav-tabs .nav-link { border: none; color: #64748b; font-weight: 500; border-radius: 0; padding: .55rem 1rem; }
.nav-tabs .nav-link.active { color: #4f46e5; border-bottom: 2px solid #4f46e5; background: transparent; }
.nav-pills .nav-link { border-radius: 9999px; font-size: .8rem; font-weight: 500; padding: .3rem .9rem; color: #475569; }
.nav-pills .nav-link.active { background: #4f46e5; color: #fff; }

/* === 面包屑 === */
.breadcrumb { font-size: .8rem; }
.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }

/* === 列表组 === */
.list-group-item { border-color: #f1f5f9; padding: .85rem 1.1rem; }
.list-group-item-action:hover { background: #f8fafc; }
