/* ============================================================
   风云导航 - 前台���式
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:      #0f0e17;
    --bg2:     #1a1a2e;
    --card:    #16213e;
    --border:  #0f3460;
    --accent:  #e94560;
    --gold:    #f0a500;
    --text:    #e0e0e0;
    --muted:   #8892a4;
    --radius:  12px;
    --shadow:  0 4px 24px rgba(0,0,0,.4);
}

html, body { min-height: 100vh; background: var(--bg); color: var(--text);
    font-family: 'PingFang SC','Microsoft YaHei',sans-serif; }

/* ── 粒子 ── */
.particles { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.particle  { position: absolute; bottom: -30px; animation: floatUp linear infinite; user-select: none; }
@keyframes floatUp {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: .5; }
    100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* ── 页面容器 ── */
.page { position: relative; z-index: 1; min-height: 100vh;
    display: flex; flex-direction: column; }

/* ── Header ── */
.site-header {
    background: linear-gradient(135deg, #0f0e17 0%, #1a1a2e 100%);
    border-bottom: 2px solid var(--accent);
    padding: 20px 0;
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(10px);
}
.header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.logo-wrap { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; }
.logo-icon { font-size: 36px; filter: drop-shadow(0 0 12px rgba(240,165,0,.6)); }
.logo-title {
    font-size: clamp(20px, 4vw, 28px); font-weight: 900; letter-spacing: 3px;
    background: linear-gradient(135deg, #f0a500, #ffd700, #f0a500);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ── 搜索 ── */
.search-wrap { flex: 0 0 auto; }
.search-input {
    background: rgba(255,255,255,.07);
    border: 1px solid var(--border);
    border-radius: 24px;
    color: #fff; font-size: 14px;
    padding: 9px 18px;
    width: 240px; max-width: 100%;
    outline: none;
    transition: border-color .2s, width .3s;
}
.search-input:focus { border-color: var(--gold); width: 280px; }
.search-input::placeholder { color: var(--muted); }

/* ── 分类导航 ── */
.cat-nav {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 16px;
    display: flex; gap: 4px; align-items: center;
    white-space: nowrap;
}
.cat-btn {
    background: none; border: none;
    color: var(--muted); font-size: 14px; font-weight: 500;
    padding: 14px 16px; cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
    white-space: nowrap; flex-shrink: 0;
    display: flex; align-items: center; gap: 5px;
}
.cat-btn:hover { color: var(--text); }
.cat-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.cat-icon { font-size: 15px; }

/* ── 主内容 ── */
.main-content {
    flex: 1;
    max-width: 1200px; margin: 0 auto; width: 100%;
    padding: 28px 20px 60px;
}

/* ── 分区标��� ── */
.cat-section { margin-bottom: 36px; }
.section-title {
    font-size: 16px; font-weight: 700; color: var(--gold);
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
    padding-left: 4px;
    border-left: 3px solid var(--gold); padding-left: 12px;
}
.section-icon { font-size: 18px; }

/* ── 链接网格 ── */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

/* ── 链接卡片 ── */
.link-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex; align-items: flex-start; gap: 14px;
    text-decoration: none; color: var(--text);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative; overflow: hidden;
}
.link-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(240,165,0,.04));
    opacity: 0; transition: opacity .2s;
}
.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(233,69,96,.25);
    border-color: var(--accent);
    color: #fff;
}
.link-card:hover::before { opacity: 1; }
.card-icon { font-size: 28px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.card-body { flex: 1; min-width: 0; }
.card-name {
    font-size: 15px; font-weight: 600;
    line-height: 1.5;
    word-break: break-all;
    white-space: normal;
}
.card-desc {
    font-size: 12px; color: var(--muted); margin-top: 4px;
    line-height: 1.5;
    word-break: break-all;
    white-space: normal;
}
.card-arrow { font-size: 14px; color: var(--muted); flex-shrink: 0;
    transition: transform .2s, color .2s; }
.link-card:hover .card-arrow { transform: translateX(4px); color: var(--accent); }

/* ── 无结果 / 空状态 ── */
.no-result, .empty-tip {
    text-align: center; color: var(--muted); padding: 80px 20px;
    font-size: 16px; display: flex; flex-direction: column;
    align-items: center; gap: 8px;
}
.no-result { display: none; }

/* ── Footer ── */
.site-footer {
    text-align: center; color: var(--muted); font-size: 13px;
    padding: 20px 20px; border-top: 1px solid var(--border);
    display: flex; justify-content: center; align-items: center;
    gap: 16px; flex-wrap: wrap;
}

/* ── 响���式 ── */
@media (max-width: 768px) {
    .search-input { width: 180px; }
    .search-input:focus { width: 200px; }
    .link-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .link-card { padding: 12px 14px; gap: 10px; }
    .card-icon { font-size: 22px; }
    .card-name { font-size: 14px; }
}
@media (max-width: 480px) {
    .header-inner { gap: 12px; }
    .logo-icon { font-size: 28px; }
    .link-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .search-wrap { flex: 1 1 100%; order: 3; }
    .search-input { width: 100%; }
    .search-input:focus { width: 100%; }
}
