/* ===== 网址导航前台样式 · 扁平风格 ===== */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --accent: #f59e0b;
    --bg: #f5f6f7;
    --card: #ffffff;
    --border: #e5e7eb;
    --text: #1d2129;
    --text-2: #4e5969;
    --text-3: #86909c;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(29, 33, 41, 0.04);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s;
    background: none; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #d97706; }
.btn-plain { border-color: var(--border); color: var(--text-2); background: #fff; }
.btn-plain:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-small { padding: 4px 10px; font-size: 12px; }
.btn-danger { background: #fff; border-color: #fecaca; color: #dc2626; }
.btn-danger:hover { background: #fef2f2; }

/* 头部 */
.header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--primary); flex-shrink: 0; }
.brand-name { font-size: 18px; font-weight: 700; color: var(--text); }
.search-box {
    flex: 1; max-width: 480px; display: flex; align-items: center; gap: 8px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 7px 8px 7px 14px;
}
.search-box svg { color: var(--text-3); flex-shrink: 0; }
.search-box input { flex: 1; border: none; outline: none; background: none; font-size: 14px; color: var(--text); min-width: 0; }
.search-box button {
    border: none; background: var(--primary); color: #fff; border-radius: 14px;
    padding: 5px 16px; font-size: 13px; cursor: pointer;
}
.search-box button:hover { background: var(--primary-hover); }
.header-nav { margin-left: auto; }
.menu-toggle { display: none; border: none; background: none; color: var(--text-2); cursor: pointer; padding: 4px; }

/* Hero */
.hero { background: var(--card); border-bottom: 1px solid var(--border); padding: 56px 0 44px; text-align: center; }
.hero-title { font-size: 32px; font-weight: 700; letter-spacing: 1px; }
.hero-desc { color: var(--text-3); margin-top: 10px; font-size: 15px; }
.hero-search {
    max-width: 560px; margin: 28px auto 0; display: flex; align-items: center; gap: 10px;
    background: #fff; border: 2px solid var(--primary); border-radius: 28px; padding: 6px 6px 6px 18px;
}
.hero-search svg { color: var(--text-3); flex-shrink: 0; }
.hero-search input { flex: 1; border: none; outline: none; font-size: 15px; color: var(--text); min-width: 0; }
.hero-search button {
    border: none; background: var(--primary); color: #fff; border-radius: 22px;
    padding: 10px 28px; font-size: 14px; cursor: pointer;
}
.hero-search button:hover { background: var(--primary-hover); }
.hero-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip {
    padding: 6px 16px; border-radius: 20px; font-size: 13px; color: var(--text-2);
    background: var(--bg); border: 1px solid var(--border); transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.hero-stats { display: flex; justify-content: center; gap: 56px; margin-top: 30px; }
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 22px; font-weight: 700; color: var(--primary); }
.hero-stat span { font-size: 12px; color: var(--text-3); }

/* 排行榜 */
.rank-list { list-style: none; }
.rank-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--bg); }
.rank-list li:last-child { border-bottom: none; }
.rank-num {
    width: 18px; height: 18px; border-radius: 5px; background: var(--bg); color: var(--text-3);
    font-size: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rank-num.rank-hot { background: #fef2f2; color: #dc2626; font-weight: 700; }
.rank-list a { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list a:hover { color: var(--primary); }
.rank-views { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.icon-new { color: #059669; }

/* 布局 */
.layout { display: flex; gap: 24px; padding-top: 24px; padding-bottom: 48px; align-items: flex-start; }
.sidebar { width: 220px; flex-shrink: 0; position: sticky; top: 88px; }
.sidebar-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.sidebar-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.sidebar-submit p { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.price { color: #dc2626; }
.cat-menu { list-style: none; }
.cat-menu a {
    display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--text-2); font-size: 14px; transition: background .15s, color .15s;
}
.cat-menu a:hover { background: var(--bg); color: var(--text); }
.cat-menu a.active { background: #eff6ff; color: var(--primary); font-weight: 600; }
.content { flex: 1; min-width: 0; }

/* 网址区块 */
.site-section { margin-bottom: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.icon-fire { color: var(--accent); }
.section-count { font-size: 12px; color: var(--text-3); }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }

/* 网址卡片 */
.site-card {
    display: flex; align-items: flex-start; gap: 12px; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
    box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.site-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08); transform: translateY(-2px); }
.site-card { transition: border-color .15s, box-shadow .15s, transform .15s; }
.site-logo { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; object-fit: cover; }
.site-logo-text {
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; font-weight: 700;
}
.site-card-body { min-width: 0; }
.site-card-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.site-card-desc {
    color: var(--text-3); font-size: 12px; margin-top: 4px;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.badge-top {
    display: inline-flex; align-items: center; gap: 3px;
    background: #fffbeb; color: #b45309; border: 1px solid #fde68a;
    font-size: 11px; padding: 1px 7px; border-radius: 20px; font-weight: 500;
}

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.page-btn {
    min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text-2); transition: all .15s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.current { background: var(--primary); border-color: var(--primary); color: #fff; cursor: default; }
.page-dots { color: var(--text-3); }
.page-total { font-size: 12px; color: var(--text-3); margin-left: 8px; }

/* 区块更多 */
.section-more { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--text-3); }
.section-more:hover { color: var(--primary); }

/* 头部 Logo 图片 */
.brand-logo { height: 32px; width: auto; border-radius: 6px; display: block; }

/* 空态 */
.empty { background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--text-3); }

/* 页脚 */
.footer { background: var(--card); border-top: 1px solid var(--border); padding: 32px 0 16px; margin-top: 24px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-info p { color: var(--text-3); font-size: 13px; margin-top: 6px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-2); font-size: 13px; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { color: var(--text-3); font-size: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* 详情页 */
.detail-layout { display: flex; gap: 24px; padding-top: 24px; padding-bottom: 48px; align-items: flex-start; }
.detail-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.detail-side { width: 280px; flex-shrink: 0; position: sticky; top: 88px; }
.detail-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.detail-head { display: flex; align-items: center; gap: 16px; }
.detail-head .site-logo { width: 56px; height: 56px; font-size: 24px; }
.detail-actions { display: flex; gap: 10px; flex-shrink: 0; }
.detail-head-info { flex: 1; min-width: 0; }
.detail-head-info h1 { font-size: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-url { color: var(--text-3); font-size: 13px; margin-top: 4px; word-break: break-all; }
.detail-meta { display: flex; gap: 20px; flex-wrap: wrap; margin: 18px 0; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 13px; }
.detail-meta span { display: inline-flex; align-items: center; gap: 6px; }
.detail-desc h3 { font-size: 15px; margin-bottom: 8px; }
.detail-desc p { color: var(--text-2); }

/* 置顶推广卡片 */
.top-promo { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-color: #fde68a; background: #fffdf5; }
.top-promo-info { display: flex; gap: 14px; align-items: flex-start; color: #b45309; }
.top-promo-info h3 { color: var(--text); font-size: 16px; margin-bottom: 4px; }
.top-promo-info p { color: var(--text-2); font-size: 13px; }
.top-promo-action { text-align: right; }
.top-price { font-size: 26px; font-weight: 700; color: #dc2626; margin-bottom: 10px; }
.top-price small { font-size: 14px; }
.top-price span { font-size: 13px; color: var(--text-3); font-weight: 400; margin-left: 4px; }

/* 同类推荐 */
.related-list { list-style: none; }
.related-list li a { display: flex; align-items: center; gap: 10px; padding: 8px 4px; color: var(--text-2); font-size: 13px; border-bottom: 1px solid var(--bg); }
.related-list li:last-child a { border-bottom: none; }
.related-list li a:hover { color: var(--primary); }
.related-list .site-logo { width: 28px; height: 28px; border-radius: 7px; font-size: 13px; }

/* 表单页 */
.narrow { max-width: 720px; }
.page-head { text-align: center; padding: 36px 0 24px; }
.page-head h1 { font-size: 24px; }
.page-head p { color: var(--text-3); margin-top: 8px; }
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-bottom: 48px; }
.site-form .form-row { margin-bottom: 18px; }
.site-form label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.site-form label i { color: #dc2626; font-style: normal; }
.site-form input, .site-form select, .site-form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #dcdfe3; border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit; color: var(--text); outline: none; transition: border-color .15s;
    background: #fff;
}
.site-form input:focus, .site-form select:focus, .site-form textarea:focus { border-color: var(--primary); }
.form-tip { font-size: 12px; color: var(--text-3); margin-top: 10px; text-align: center; }
.form-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.form-success { text-align: center; padding: 24px 0; color: var(--text-2); }
.form-success svg { color: #059669; }
.form-success h2 { margin: 12px 0 6px; color: var(--text); }
.form-success .btn { margin-top: 18px; }
.pay-summary {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px;
}
.pay-amount { font-size: 22px; font-weight: 700; color: #dc2626; }

/* 支付结果页 */
.pay-result { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.pay-result-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 48px 56px; text-align: center; max-width: 460px; }
.pay-result-icon { display: flex; justify-content: center; margin-bottom: 16px; }
.pay-result-icon.success { color: #059669; }
.pay-result-icon.fail { color: #f59e0b; }
.pay-result-card h1 { font-size: 22px; margin-bottom: 10px; }
.pay-result-desc { color: var(--text-3); font-size: 14px; }
.pay-result-actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; }

/* 响应式 */
@media (max-width: 900px) {
    .layout, .detail-layout { flex-direction: column; }
    .sidebar, .detail-side { width: 100%; position: static; }
    .search-box { display: none; }
    .menu-toggle { display: block; margin-left: auto; }
    .header-nav { display: none; }
    .header-inner { gap: 12px; }
    .hero { padding: 36px 0 30px; }
    .hero-title { font-size: 24px; }
    .hero-stats { gap: 32px; }
    .hero-search button { padding: 10px 18px; }
    .top-promo-action { text-align: left; width: 100%; }
    .pay-result-card { padding: 36px 24px; }
    /* 移动端菜单展开 */
    .sidebar { display: none; }
    body.menu-open .sidebar { display: block; }
}
