/* ============================================================
   NavLux 豪华网址导航 — 主样式
   深色顶栏 #0f1b2d + 金色 #c9a24a + 浅色内容区 #f5f3ee
   ============================================================ */
:root {
    --nl-bg: #f5f3ee;
    --nl-surface: #ffffff;
    --nl-ink: #1c2433;
    --nl-muted: #7d879c;
    --nl-dark: #0f1b2d;
    --nl-dark2: #14243d;
    --nl-gold: #c9a24a;
    --nl-gold-2: #e6c878;
    --nl-line: #e7e2d6;
    --nl-radius: 14px;
    --nl-shadow: 0 6px 24px rgba(20, 35, 60, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.nl-body, body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--nl-bg);
    color: var(--nl-ink);
    font-size: 15px;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--nl-gold); }
img { max-width: 100%; }
.nl-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.nl-header {
    background: linear-gradient(180deg, #0c1626, #0f1b2d);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 18px rgba(0,0,0,.25);
}
.nl-header-inner { display: flex; align-items: center; height: 64px; gap: 28px; }
.nl-logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: #f4ecd6; letter-spacing: 1px; }
.nl-logo .mark {
    width: 36px; height: 36px; border-radius: 9px;
    background: linear-gradient(135deg, var(--nl-gold-2), var(--nl-gold));
    display: flex; align-items: center; justify-content: center; color: #231a06; font-weight: 900;
}
.nl-logo img { height: 42px; width: auto; border-radius: 8px; }
.nl-logo .nl-logo-text { font-size: 22px; font-weight: 800; color: var(--nl-gold-2); letter-spacing: 1px; }
.nl-nav { display: flex; gap: 4px; flex: 1; align-items: center; }
.nl-nav a {
    color: #cfd9ea; padding: 8px 14px; border-radius: 8px; font-size: 15px;
}
.nl-nav a:hover, .nl-nav a.active { color: var(--nl-gold-2); background: rgba(201,162,74,.12); }
/* 「更多」下拉（桌面端 hover 展开） */
.nl-nav-more { position: relative; }
.nl-nav-more .nl-more-arrow { font-size: 11px; margin-left: 3px; }
.nl-nav-more .nl-more-menu {
    display: none; position: absolute; top: 100%; right: 0; min-width: 150%;
    background: #0c1626; border: 1px solid #1d2c49; border-radius: 8px; padding: 6px;
    box-shadow: 0 8px 22px rgba(0,0,0,.35); flex-direction: column; z-index: 999;
}
.nl-nav-more:hover .nl-more-menu { display: flex; }
.nl-nav-more .nl-more-menu a { white-space: nowrap; }
.nl-user { display: flex; gap: 8px; align-items: center; }
.nl-user a {
    color: #e8dfc4; font-size: 14px; padding: 7px 16px; border-radius: 999px;
    border: 1px solid rgba(201,162,74,.5);
}
.nl-user a.primary { background: linear-gradient(135deg, var(--nl-gold-2), var(--nl-gold)); color: #231a06; font-weight: 700; border: none; }
.nl-user a:hover { opacity: .88; }
.nl-toggle { display: none; background: none; border: 1px solid #33466a; color: #cfd9ea; font-size: 22px; border-radius: 8px; padding: 4px 12px; cursor: pointer; }

/* ---------- 公告条 ---------- */
.nl-announce {
    background: #13233f; color: #b9c6dd; font-size: 13px;
    border-bottom: 1px solid #22385e;
}
.nl-announce-inner { display: flex; gap: 24px; overflow: hidden; padding: 8px 0; }
.nl-announce b { color: var(--nl-gold-2); margin-right: 6px; }

/* ---------- 主体布局 ---------- */
.nl-main { padding: 28px 0 48px; }
.nl-layout { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
.nl-content { min-width: 0; }
.nl-aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 84px; }

/* ---------- 首页搜索区 ---------- */
.nl-hero {
    background:
        radial-gradient(1100px 320px at 50% -60px, rgba(201,162,74,.18), transparent 70%),
        linear-gradient(180deg, #13233f, #0f1b2d);
    border-radius: 0 0 28px 28px;
    padding: 56px 20px 60px; text-align: center; margin-bottom: 28px;
}
.nl-hero h1 { color: #f4ecd6; font-size: 34px; font-weight: 800; margin: 0 0 8px; letter-spacing: 1px; }
.nl-hero p { color: #9db0cc; margin: 0 0 26px; font-size: 15px; }
.nl-searchbox {
    max-width: 720px; margin: 0 auto; background: #fff; border-radius: 34px;
    display: flex; align-items: center; padding: 8px 8px 8px 8px;
    box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.nl-engine-tabs { display: flex; flex-direction: column; }
.nl-engine-tabs .nl-etabs { display: flex; }
.nl-engine-tabs .nl-etabs a {
    padding: 6px 14px; border-radius: 22px; color: #5b6b86; font-size: 14px;
}
.nl-engine-tabs .nl-etabs a.on { background: #1c2f52; color: #fff; }
.nl-searchbox input[type=text] {
    flex: 1; border: none; outline: none; font-size: 16px; padding: 0 14px; min-width: 0; background: transparent;
}
.nl-searchbox button {
    background: linear-gradient(135deg, var(--nl-gold-2), var(--nl-gold));
    border: none; color: #231a06; font-weight: 700; font-size: 16px;
    padding: 12px 30px; border-radius: 26px; cursor: pointer; white-space: nowrap;
}
.nl-hotwords { max-width: 720px; margin: 16px auto 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.nl-hotwords span { color: #9db0cc; font-size: 13px; }
.nl-hotwords a {
    color: #cdd8ea; font-size: 13px; padding: 3px 12px; border: 1px solid #2c4166; border-radius: 999px;
}
.nl-hotwords a:hover { color: var(--nl-gold-2); border-color: var(--nl-gold); }

/* ---------- 区块标题 ---------- */
.nl-section-title {
    display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px;
}
.nl-section-title h2 { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 10px; }
.nl-section-title h2::before { content: ""; width: 4px; height: 20px; background: linear-gradient(var(--nl-gold-2), var(--nl-gold)); border-radius: 2px; }
.nl-section-title a { font-size: 13px; color: var(--nl-muted); }
.nl-section-title a:hover { color: var(--nl-gold); }

/* ---------- 网站卡片宫格 ---------- */
.nl-card {
    background: var(--nl-surface); border: 1px solid var(--nl-line); border-radius: var(--nl-radius);
    padding: 18px; box-shadow: var(--nl-shadow); transition: transform .15s, box-shadow .15s;
}
.nl-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(20,35,60,.14); }
.nl-site-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nl-site { display: flex; gap: 12px; }
.nl-site .ico {
    width: 46px; height: 46px; border-radius: 12px; flex: none; background: #eef2f7; overflow: hidden;
}
.nl-site .ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nl-site .body { min-width: 0; flex: 1; }
.nl-site h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.nl-site p { margin: 0; font-size: 12.5px; color: var(--nl-muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nl-site .meta { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--nl-muted); }
.wt-badge {
    display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 4px;
    background: #fdf0d6; color: #9a7420; font-weight: 600;
}
.nl-hot { color: #d9534f; font-size: 11px; font-weight: 700; }

/* 分类块 */
.nl-catblock { margin-bottom: 22px; }
.nl-catblock .nl-card { padding: 20px; }
.nl-catgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ---------- 侧栏 ---------- */
.nl-widget {
    background: var(--nl-surface); border: 1px solid var(--nl-line); border-radius: var(--nl-radius);
    padding: 18px; box-shadow: var(--nl-shadow);
}
.nl-widget h4 { margin: 0 0 14px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.nl-widget h4::before { content: ""; width: 4px; height: 16px; background: var(--nl-gold); border-radius: 2px; }
.nl-rank-list { list-style: none; margin: 0; padding: 0; }
.nl-rank-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--nl-line); }
.nl-rank-list li:last-child { border-bottom: none; }
.nl-rank-list .no {
    width: 22px; height: 22px; border-radius: 6px; flex: none; text-align: center; line-height: 22px;
    font-size: 12px; font-weight: 700; background: #eef2f7; color: #7d879c;
}
.nl-rank-list li:nth-child(-n+3) .no { background: linear-gradient(135deg, var(--nl-gold-2), var(--nl-gold)); color: #231a06; }
.nl-rank-list .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.nl-rank-list .v { font-size: 12px; color: var(--nl-muted); }
.nl-news-list { list-style: none; margin: 0; padding: 0; }
.nl-news-list li { padding: 8px 0; border-bottom: 1px dashed var(--nl-line); font-size: 13.5px; }
.nl-news-list li:last-child { border-bottom: none; }
.nl-news-list .d { color: var(--nl-muted); font-size: 12px; }

/* ---------- 通用面板 / 列表 ---------- */
.nl-panel { background: var(--nl-surface); border: 1px solid var(--nl-line); border-radius: var(--nl-radius); padding: 24px; box-shadow: var(--nl-shadow); margin-bottom: 20px; }
.nl-panel h1, .nl-panel h2 { margin-top: 0; }
.nl-crumb { font-size: 13px; color: var(--nl-muted); margin-bottom: 16px; }
.nl-crumb a { color: var(--nl-muted); }
.nl-crumb a:hover { color: var(--nl-gold); }

/* 文章列表行 */
.nl-rowlist { list-style: none; margin: 0; padding: 0; }
.nl-rowlist li {
    display: flex; align-items: center; gap: 16px; padding: 14px 6px; border-bottom: 1px solid var(--nl-line);
}
.nl-rowlist li:last-child { border-bottom: none; }
.nl-rowlist .ico { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex: none; background: #eef2f7; }
.nl-rowlist .ico img { width: 100%; height: 100%; object-fit: cover; }
.nl-rowlist .mid { flex: 1; min-width: 0; }
.nl-rowlist .mid h3 { margin: 0 0 4px; font-size: 15px; }
.nl-rowlist .mid p { margin: 0; font-size: 12.5px; color: var(--nl-muted);
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.nl-rowlist .right { text-align: right; font-size: 12px; color: var(--nl-muted); white-space: nowrap; }

/* 搜索结果 */
.nl-result-head { font-size: 15px; color: var(--nl-muted); margin-bottom: 18px; }
.nl-result-head b { color: var(--nl-gold); }
.nl-empty { text-align: center; color: var(--nl-muted); padding: 60px 0; }

/* ---------- 按钮 ---------- */
.nl-btn {
    display: inline-block; background: linear-gradient(135deg, var(--nl-gold-2), var(--nl-gold));
    color: #231a06; font-weight: 700; padding: 10px 26px; border-radius: 999px; border: none; cursor: pointer; font-size: 15px;
}
.nl-btn:hover { opacity: .9; color: #231a06; }
.nl-btn.ghost { background: #fff; color: var(--nl-ink); border: 1px solid var(--nl-line); }
.nl-btn.sm { padding: 7px 18px; font-size: 13px; }

/* ---------- 表单 / 认证 ---------- */
.nl-auth { max-width: 440px; margin: 30px auto; background: var(--nl-surface); border: 1px solid var(--nl-line); border-radius: var(--nl-radius); padding: 32px; box-shadow: var(--nl-shadow); }
.nl-auth h2 { margin-top: 0; text-align: center; }
.nl-auth .field { margin-bottom: 14px; }
.nl-auth input, .nl-auth select, .nl-auth textarea,
.nl-form input, .nl-form select, .nl-form textarea {
    width: 100%; box-sizing: border-box; padding: 11px 14px; border: 1px solid var(--nl-line);
    border-radius: 10px; font-size: 14px; outline: none; background: #fff;
}
.nl-auth input:focus, .nl-auth textarea:focus, .nl-form input:focus, .nl-form select:focus, .nl-form textarea:focus { border-color: var(--nl-gold); }
.nl-auth .btn-submit, .nl-form .btn-submit { width: 100%; margin-top: 6px; }
.auth-links { text-align: center; margin-top: 16px; font-size: 13px; color: var(--nl-muted); }
.auth-links a { color: var(--nl-gold); }
.nl-msg { padding: 10px 14px; border-radius: 8px; background: #fdecea; color: #c0392b; font-size: 13px; margin-bottom: 14px; }
.nl-msg.ok { background: #e8f6ee; color: #1e8e5a; }

/* ---------- 会员中心 ---------- */
.member-nav {
    display: flex; flex-wrap: wrap; gap: 6px; background: var(--nl-surface); border: 1px solid var(--nl-line);
    border-radius: var(--nl-radius); padding: 10px; margin-bottom: 18px;
}
.member-nav a { padding: 8px 16px; border-radius: 8px; font-size: 14px; color: var(--nl-ink); }
.member-nav a.active { background: var(--nl-dark); color: var(--nl-gold-2); }
.member-nav .logout-form { margin-left: auto; }
.member-nav .logout-form button {
    border: 1px solid var(--nl-line); background: #fff; color: var(--nl-muted);
    padding: 7px 16px; border-radius: 8px; cursor: pointer;
}
.member-table { width: 100%; border-collapse: collapse; background: var(--nl-surface); border-radius: var(--nl-radius); overflow: hidden; box-shadow: var(--nl-shadow); }
.member-table th, .member-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--nl-line); font-size: 14px; }
.member-table th { background: #faf8f2; font-weight: 700; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--nl-surface); border: 1px solid var(--nl-line); border-radius: var(--nl-radius); padding: 18px; text-align: center; box-shadow: var(--nl-shadow); }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--nl-gold); }
.stat-card .lbl { font-size: 13px; color: var(--nl-muted); }

/* 下载 */
.nl-dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nl-dl-card { background: var(--nl-surface); border: 1px solid var(--nl-line); border-radius: var(--nl-radius); padding: 18px; box-shadow: var(--nl-shadow); }
.nl-dl-ico {
    width: 52px; height: 52px; border-radius: 12px; background: linear-gradient(135deg, #1c2f52, #2c4166);
    color: #e6c878; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; margin-bottom: 12px;
}

/* 文章详情 */
.nl-article h1 { font-size: 28px; margin: 0 0 12px; }
.nl-article-meta { color: var(--nl-muted); font-size: 13px; margin-bottom: 20px; display: flex; gap: 16px; flex-wrap: wrap; }
.nl-article-content { font-size: 16px; line-height: 1.9; }
.nl-article-content img { border-radius: 10px; }

/* 分页 */
.tpl-pagination { margin-top: 22px; display: flex; gap: 8px; justify-content: center; }
.tpl-pagination a, .tpl-pagination span {
    padding: 7px 14px; border: 1px solid var(--nl-line); border-radius: 8px; font-size: 14px; background: #fff;
}
.tpl-pagination span.active { background: var(--nl-dark); color: var(--nl-gold-2); border-color: var(--nl-dark); }

/* 标签云 */
.nl-tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.nl-tagcloud a { padding: 5px 14px; border: 1px solid var(--nl-line); border-radius: 999px; font-size: 13px; background: #fff; }
.nl-tagcloud a:hover { border-color: var(--nl-gold); color: var(--nl-gold); }

/* ---------- 页脚 ---------- */
.nl-footer { background: #0c1626; color: #9db0cc; margin-top: 40px; }
.nl-footer a { color: #b9c6dd; }
.nl-footer a:hover { color: var(--nl-gold-2); }
.nl-footer-inner { padding: 40px 0 24px; }
.nl-footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 30px; margin-bottom: 26px; }
.nl-footer h5 { color: #f4ecd6; font-size: 15px; margin: 0 0 12px; }
.nl-footer .fl-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0; padding: 0; }
.nl-footer .fl-links { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0; padding: 0; }
.nl-footer-desc { font-size: 13px; line-height: 1.8; }
.nl-copyright { border-top: 1px solid #1d2c49; padding-top: 18px; font-size: 13px; text-align: center; line-height: 2; }
.nl-backtop {
    position: fixed; right: 24px; bottom: 30px; width: 44px; height: 44px; border-radius: 50%;
    background: var(--nl-dark); color: var(--nl-gold-2); display: flex; align-items: center; justify-content: center;
    font-size: 20px; box-shadow: 0 6px 18px rgba(0,0,0,.3); cursor: pointer;
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .nl-layout { grid-template-columns: 1fr; }
    .nl-aside { position: static; }
    .nl-site-grid, .nl-catgrid, .nl-dl-grid { grid-template-columns: repeat(2, 1fr); }
    .nl-footer-cols { grid-template-columns: 1fr; gap: 20px; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .nl-nav {
        display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
        background: #0c1626; padding: 12px 20px; gap: 2px; border-bottom: 1px solid #1d2c49;
    }
    .nl-nav.open { display: flex; }
    .nl-nav-more { width: 100%; }
    .nl-nav-more .nl-more-menu { display: flex; position: static; border: none; box-shadow: none; padding: 0 0 0 12px; }
    .nl-toggle { display: block; margin-left: auto; }
    .nl-header-inner { gap: 12px; }
    .nl-user a { padding: 6px 12px; font-size: 13px; }
    .nl-hero h1 { font-size: 24px; }
    .nl-hero { padding: 36px 14px 40px; }
    .nl-searchbox { flex-wrap: wrap; border-radius: 18px; padding: 8px; }
    .nl-searchbox button { width: 100%; margin-top: 8px; }
    .nl-engine-tabs { width: 100%; overflow-x: auto; flex-direction: row; }
    .nl-engine-tabs .nl-etabs { width: 100%; }
    .nl-site-grid, .nl-catgrid, .nl-dl-grid { grid-template-columns: 1fr; }
    .nl-rowlist .right { display: none; }
}
