* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #FF7A00;
    --primary-dark: #E66A00;
    --primary-light: #FF9533;
    --dark: #222222;
    --gray: #666666;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --border: #E5E5E5;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --sidebar-bg: #FAFAFA;
}
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--dark); line-height: 1.6; background: var(--white);
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.page-banner {
    position: relative;
    background: linear-gradient(135deg, #FF7A00 0%, #FF9533 50%, #FFB366 100%);
    padding: 120px 20px 60px;
    text-align: center;
    overflow: hidden;
}
.page-banner::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.page-banner-content { position: relative; z-index: 1; }
.page-banner-title {
    font-size: 40px; font-weight: 700; color: var(--white);
    margin-bottom: 12px; letter-spacing: 2px;
}
.page-banner-subtitle {
    font-size: 18px; color: rgba(255,255,255,0.9);
    max-width: 600px; margin: 0 auto;
}

.breadcrumb {
    padding: 16px 0;
    background: var(--light-gray);
    border-bottom: 1px solid var(--border);
}
.breadcrumb-list {
    display: flex; align-items: center; gap: 8px;
    list-style: none; font-size: 14px; color: var(--gray);
}
.breadcrumb-list a {
    color: var(--gray); text-decoration: none;
    transition: color 0.3s ease;
}
.breadcrumb-list a:hover { color: var(--primary); }
.breadcrumb-list .separator { color: #ccc; }
.breadcrumb-list .current { color: var(--dark); font-weight: 500; }

.news-section {
    padding: 40px 0 80px;
}
.news-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.news-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    position: sticky;
    top: 90px;
}
.sidebar-header {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-header svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}
.sidebar-tree {
    padding: 8px 0;
}
.tree-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--gray);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    gap: 4px;
}
.tree-item .tree-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tree-item:hover {
    background: rgba(255,122,0,0.06);
    color: var(--primary);
}
.tree-item.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(255,122,0,0.1);
}
.tree-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}
.tree-item.level-1 {
    padding-left: 40px;
    font-size: 13px;
}
.tree-item.level-2 {
    padding-left: 58px;
    font-size: 13px;
    color: #999;
}
.tree-toggle {
    display: inline-block;
    width: 16px;
    margin-right: 2px;
    font-size: 10px;
    color: #bbb;
    transition: transform 0.2s;
    vertical-align: middle;
    text-align: center;
    flex-shrink: 0;
}
.tree-toggle.expanded {
    transform: rotate(90deg);
}
.tree-toggle.empty {
     visibility: hidden;
 }
.tree-item .count {
    float: right;
    font-size: 12px;
    color: #bbb;
    font-weight: 400;
}
.tree-item.active .count { color: var(--primary); }

.news-main {
    flex: 1;
    min-width: 0;
}

.news-search {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.search-input-wrap {
    flex: 1;
    position: relative;
}
.search-input-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #bbb;
}
.search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--dark);
    background: var(--white);
    outline: none;
    transition: border-color 0.3s ease;
}
.search-input:focus {
    border-color: var(--primary);
}
.search-input::placeholder {
    color: #bbb;
}
.search-btn {
    height: 44px;
    padding: 0 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.search-btn:hover {
    background: var(--primary-dark);
}

.news-list {}
.news-item {
    display: block;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: none; }
.news-item:hover { opacity: 0.9; }
.news-item-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.news-item-date {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}
.news-item-category {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
    background: var(--primary);
}
.news-item-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.5;
    margin-bottom: 10px;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item:hover .news-item-title { color: var(--primary); }
.news-item-summary {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.news-item-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--light-gray);
    color: #999;
    font-size: 12px;
    border-radius: 4px;
}

.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--gray);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}
.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}
.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.page-btn.disabled:hover {
    border-color: var(--border);
    color: var(--gray);
}
.page-ellipsis {
    color: #ccc;
    padding: 0 8px;
}
.page-info {
    font-size: 13px;
    color: #999;
    margin-left: 12px;
}

.news-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray);
}
.news-empty svg {
    width: 60px;
    height: 60px;
    color: #ddd;
    margin-bottom: 16px;
}
.news-empty p { font-size: 15px; }

.news-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}
.loading-spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
    opacity: 1; transform: translateY(0);
}

.mobile-category-bar {
    display: none;
    margin-bottom: 20px;
}
.mobile-category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.mobile-category-scroll::-webkit-scrollbar { display: none; }
.mobile-cat-btn {
    flex-shrink: 0;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--white);
    color: var(--gray);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.mobile-cat-btn:hover { border-color: var(--primary); color: var(--primary); }
.mobile-cat-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

@media (max-width: 1024px) {
    .news-sidebar { width: 200px; }
    .news-layout { gap: 24px; }
}
@media (max-width: 768px) {
    .page-banner { padding: 100px 20px 40px; }
    .page-banner-title { font-size: 28px; }
    .page-banner-subtitle { font-size: 15px; }
    .news-section { padding: 24px 0 60px; }

    .news-layout { flex-direction: column; }
    .news-sidebar { display: none; }

    .mobile-category-bar { display: block; }

    .news-search { flex-direction: column; gap: 10px; }
    .search-btn { width: 100%; }

    .news-item-title { font-size: 16px; }
    .news-item { padding: 20px 0; }

    .news-pagination { gap: 6px; }
    .page-btn { min-width: 36px; height: 36px; padding: 0 10px; font-size: 13px; }
}
@media (max-width: 480px) {
    .page-banner-title { font-size: 24px; }
}

/* ===== 归档页追加规则（不改动原有类） ===== */
.news-item-title a { color: inherit; text-decoration: none; display: block; }
.news-item-title a:hover { color: var(--primary); }
a.tree-item { text-decoration: none; display: flex; }
a.tree-item:hover { color: var(--primary); background: var(--light-gray); }
.tree-count { margin-left: auto; font-size: 12px; color: #aaa; }
.arc-pager {
    display: flex; flex-wrap: wrap; justify-content: center;
    align-items: center; gap: 8px; margin-top: 40px;
}
.arc-pager a, .arc-pager span {
    min-width: 38px; height: 38px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; color: var(--gray); text-decoration: none;
    transition: all 0.2s ease;
}
.arc-pager a:hover { border-color: var(--primary); color: var(--primary); }
.arc-pager .current {
    background: var(--primary); border-color: var(--primary);
    color: #fff; font-weight: 600;
}
.arc-pager .disabled { color: #ccc; }
.arc-total {
    text-align: center; font-size: 13px; color: #999;
    margin-top: 18px;
}
