/* ============================================
   KCAUJ.COM - 单栏居中 + 侧边浮动
   ============================================ */

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #60A5FA;
    --accent: #F97316;
    --bg: #F8FAFC;
    --bg-card: #FFFFFF;
    --text: #0F172A;
    --text-light: #475569;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --gradient: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; transition: all 0.25s; }
img { max-width: 100%; height: auto; display: block; }

/* HEADER */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo img { height: 40px; width: auto; border-radius: var(--radius-sm); }

.main-nav { flex: 1; display: flex; justify-content: center; }

.main-nav ul {
    display: flex;
    gap: 4px;
    list-style: none;
    background: var(--bg);
    padding: 4px;
    border-radius: 50px;
    border: 1px solid var(--border);
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s;
}

.main-nav a:hover { color: var(--primary); background: var(--bg-card); }
.main-nav a.active { background: var(--gradient); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3); }

.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; padding: 8px; }

/* HERO */
.hero {
    margin-top: 64px;
    padding: 48px 24px 40px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 100%);
}

.hero-content { max-width: 720px; margin: 0 auto; }

.hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.hero p { font-size: 1rem; color: var(--text-light); max-width: 500px; margin: 0 auto; line-height: 1.7; }

/* MAIN CONTAINER 单栏居中 */
.main-container { max-width: 800px; margin: 0 auto; padding: 40px 20px 80px; }

/* SECTION TITLE */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}

.section-title i { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--gradient); color: #fff; border-radius: 8px; font-size: 14px; }

/* ARTICLE CARD */
.article-card {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.25s;
    position: relative;
}

.article-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); }

.card-link { position: absolute; inset: 0; z-index: 10; }

.article-thumb { width: 88px; height: 100%; min-height: 70px; flex-shrink: 0; overflow: hidden; }

.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.article-card:hover .article-thumb img { transform: scale(1.05); }

.article-content { flex: 1; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; }

.article-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.article-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.article-meta { display: flex; gap: 12px; font-size: 11px; color: var(--text-muted); }
.article-meta i { color: var(--accent); margin-right: 3px; }

/* SIDEBAR FLOAT 侧边浮动 */
.sidebar-float {
    position: fixed;
    top: 84px;
    right: 24px;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-widget { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }

.widget-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--border); color: var(--text); }
.widget-title i { color: var(--accent); font-size: 14px; }

.sidebar-list { list-style: none; }
.sidebar-list li { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.sidebar-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.sidebar-list a { display: flex; justify-content: space-between; align-items: center; color: var(--text-light); font-size: 12px; transition: all 0.25s; padding: 2px 0; }
.sidebar-list a:hover { color: var(--primary); transform: translateX(3px); }
.sidebar-list .count { background: var(--bg); color: var(--text-muted); font-size: 10px; padding: 2px 8px; border-radius: 50px; border: 1px solid var(--border); }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-item { display: inline-block; padding: 5px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 50px; font-size: 11px; color: var(--text-light); transition: all 0.25s; }
.tag-item:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* PAGE HEADER */
.page-header { margin-top: 64px; padding: 48px 24px 32px; text-align: center; background: var(--bg-card); border-bottom: 1px solid var(--border); }
.page-header-inner { max-width: 800px; margin: 0 auto; }
.page-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.page-breadcrumb { font-size: 13px; color: var(--text-muted); }
.page-breadcrumb a { color: var(--text-light); }
.page-breadcrumb a:hover { color: var(--primary); }

/* ARTICLE DETAIL */
.article-detail { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-bottom: 24px; box-shadow: var(--shadow); }
.detail-category { display: inline-block; background: var(--gradient); color: #fff; font-size: 10px; font-weight: 600; padding: 4px 12px; border-radius: 6px; margin-bottom: 12px; }
.detail-title { font-size: 1.6rem; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.detail-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.detail-meta i { color: var(--accent); margin-right: 4px; }
.detail-content { font-size: 14px; line-height: 1.9; color: var(--text-light); }
.detail-content p { margin-bottom: 16px; }
.detail-content img { border-radius: var(--radius-sm); margin: 20px 0; box-shadow: var(--shadow); max-width: 100%; height: auto; }
.detail-content h2, .detail-content h3 { color: var(--text); margin: 28px 0 12px; font-weight: 700; }
.detail-content a { color: var(--primary); }
.detail-content a:hover { text-decoration: underline; }
.detail-tags { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.detail-tags i { color: var(--accent); margin-right: 6px; }

/* RELATED */
.related-articles { margin-top: 32px; }
.related-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.related-title i { color: var(--accent); }
.related-articles .article-card { margin-bottom: 10px; }
.related-articles .article-thumb { width: 80px; height: 60px; }

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.pagination a, .pagination span { min-width: 36px; height: 36px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-light); transition: all 0.25s; }
.pagination a:hover { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25); }
.pagination .current { background: var(--gradient); border-color: transparent; color: #fff; }

/* FOOTER */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 32px 0; text-align: center; }
.footer-bottom { font-size: 13px; color: var(--text-muted); }
.footer-bottom a { color: var(--text-light); }
.footer-bottom a:hover { color: var(--primary); }

/* RESPONSIVE */
@media (max-width: 1200px) { .sidebar-float { display: none; } .main-container { max-width: 100%; } }
@media (max-width: 768px) { .main-nav { display: none; } .nav-toggle { display: block; } .hero { padding: 32px 20px 24px; } .article-card { flex-direction: column; } .article-thumb { width: 100%; height: 140px; min-height: auto; } .article-detail { padding: 20px; } .detail-title { font-size: 1.3rem; } }
@media (max-width: 480px) { .hero h1 { font-size: 1.4rem; } }

/* ANIMATION */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.article-card { animation: fadeInUp 0.4s ease forwards; }
