/* style.css */
:root {
    --bg: #fff;
    --bg-alt: #f5f5f5;
    --text: #1a1a1a;
    --border: #ddd;
    --radius: 6px;
    --shadow: 0 1px 4px rgba(0,0,0,0.08);
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg-alt); color: var(--text); line-height:1.6; display:flex; flex-direction:column; min-height:100vh; }
a { color: var(--text); text-decoration:none; }
a:hover { text-decoration:underline; }
.header { background:#fff; border-bottom:1px solid var(--border); padding:14px 0; position:sticky; top:0; z-index:100; }
.header-inner { max-width:1100px; margin:0 auto; padding:0 20px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; }
.logo { font-size:1.5rem; font-weight:700; color:#000; display:flex; align-items:center; }
.btn {
    display:inline-flex; align-items:center; gap:6px; padding:9px 18px;
    border:1.5px solid #333; background:#fff; color:#1a1a1a;
    cursor:pointer; font-size:0.9rem; border-radius:var(--radius);
    transition:0.2s; white-space:nowrap;
}
.btn:hover { background:#1a1a1a; color:#fff; }
.btn-dark { background:#1a1a1a; color:#fff; }
.btn-dark:hover { background:#000; }
.btn-sm { padding:5px 12px; font-size:0.8rem; }
.main { flex:1; max-width:1100px; margin:28px auto; padding:0 20px; width:100%; }
.tabs { display:flex; border-bottom:2px solid #e0e0e0; margin-bottom:24px; }
.tab-btn {
    padding:12px 28px; cursor:pointer; border:none; background:transparent;
    font-size:1rem; font-weight:500; color:#888; transition:0.2s; position:relative;
}
.tab-btn.active { color:#000; font-weight:600; }
.tab-btn.active::after { content:''; position:absolute; bottom:-2px; left:0; right:0; height:2px; background:#000; }
.tab-content { display:none; }
.tab-content.active { display:block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from{opacity:0;transform:translateY(6px);} to{opacity:1;transform:translateY(0);} }
.sort-bar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid #e8e8e8; }
.sort-btn { padding:6px 14px; border:1px solid #ccc; background:#fff; cursor:pointer; border-radius:20px; font-size:0.82rem; transition:0.2s; }
.sort-btn.active { background:#1a1a1a; color:#fff; border-color:#1a1a1a; }
.search-box input { padding:8px 14px; border:1px solid #ccc; border-radius:20px; width:200px; transition:0.2s; background:#fff; }
.search-box input:focus { outline:none; border-color:#1a1a1a; box-shadow:0 0 0 3px rgba(0,0,0,0.05); width:240px; }
.links-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap:16px; }
.link-card { background:#fff; border:1px solid #e8e8e8; border-radius:10px; padding:18px 20px; transition:0.2s; box-shadow: var(--shadow); position:relative; }
.link-card:hover { box-shadow:0 4px 16px rgba(0,0,0,0.12); transform:translateY(-2px); }
.link-card .avatar { width:40px; height:40px; border-radius:50%; background:#1a1a1a; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; }
.link-card .nickname { font-weight:600; }
.link-card .description { font-size:0.85rem; color:#555; margin-top:6px; }
.link-card .report-btn { position:absolute; top:10px; right:10px; background:none; border:none; color:#999; cursor:pointer; font-size:0.9rem; }
.link-card .report-btn:hover { color:#c0392b; }
.articles-list { display:flex; flex-direction:column; gap:10px; }
.article-item { background:#fff; border:1px solid #e8e8e8; border-radius:6px; padding:14px 18px; transition:0.2s; }
.article-item:hover { box-shadow:0 4px 12px rgba(0,0,0,0.1); }
.modal-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:1000; justify-content:center; align-items:center; }
.modal-overlay.show { display:flex; }
.modal { background:#fff; border-radius:10px; padding:28px; max-width:520px; width:90%; max-height:85vh; overflow-y:auto; position:relative; }
.modal .rules-box { background:#f9f9f9; border:1px solid #e8e8e8; color:red; border-radius:6px; padding:16px; margin-bottom:18px; font-size:0.85rem; max-height:200px; overflow-y:auto; white-space:pre-wrap; }
.modal .form-group { margin-bottom:14px; }
.modal .form-group label { display:block; font-weight:600; margin-bottom:4px; font-size:0.85rem; }
.modal .form-group input, .modal .form-group textarea { width:100%; padding:10px 14px; border:1px solid #ccc; border-radius:6px; font-size:0.9rem; }
.modal .captcha-row { display:flex; gap:10px; align-items:center; }
.modal .captcha-row img { height:38px; border:1px solid #ddd; border-radius:4px; cursor:pointer; }
.admin-table { width:100%; border-collapse:collapse; font-size:0.85rem; }
.admin-table th, .admin-table td { padding:10px 12px; border-bottom:1px solid #e8e8e8; text-align:left; }
.admin-table th { background:#fafafa; font-weight:600; }
.badge { display:inline-block; padding:3px 10px; border-radius:12px; font-size:0.73rem; }
.badge-pending { background:#f5f5f5; color:#666; }
.badge-approved { background:#1a1a1a; color:#fff; }
.badge-rejected { background:#fce4e4; color:#c0392b; }
.footer { background:#fff; border-top:1px solid #ddd; padding:18px; text-align:center; font-size:0.8rem; color:#999; margin-top:auto; }
.toast { position:fixed; top:20px; right:20px; z-index:2000; padding:12px 22px; border-radius:6px; color:#fff; font-weight:500; animation:slideIn 0.3s; }
.toast.success { background:#1a1a1a; }
.toast.error { background:#c0392b; }
@keyframes slideIn { from{transform:translateX(120%);} }
/* 回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 42px;
    height: 42px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: #000;
    transform: translateY(-2px);
}

/* 加载指示器 */
.load-more-indicator {
    text-align: center;
    padding: 20px 0;
    color: #888;
    font-size: 0.9rem;
}