* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background:
        radial-gradient(circle at top left, rgba(255, 220, 160, 0.22), transparent 28%),
        linear-gradient(180deg, #f5f7fb 0%, #eef2f7 100%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: #343a40;
    color: #adb5bd;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border-bottom: 1px solid #5a6c7d;
    width: 100%;
    position: relative;
}

.navbar-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 1rem;
    box-sizing: border-box;
    gap: 1rem;
    position: relative;
}

.navbar-brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    transition: opacity 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
    z-index: 1001;
}

.navbar-brand:hover {
    opacity: 0.8;
}

/* 汉堡菜单按钮 */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    margin-left: 0;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.navbar-center {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex: 0;
    margin: 0;
    min-width: 0;
}

.navbar-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

/* 导航栏搜索框 */
.navbar-search {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s;
}

.navbar-search:hover {
    border-color: rgba(255,255,255,0.25);
}

.navbar-search-input {
    flex: 1;
    min-width: 140px;
    padding: 0.45rem 0.7rem;
    border: none;
    background: transparent;
    color: #adb5bd;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.navbar-search-input::placeholder {
    color: rgba(173,181,189,0.6);
}

.navbar-search-input:focus {
    outline: none;
    color: #fff;
}

.navbar-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.6rem;
    border: none;
    background: transparent;
    color: #adb5bd;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.navbar-search-btn:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.navbar-search-btn:active {
    transform: scale(0.95);
}

.navbar-search-btn svg {
    width: 16px;
    height: 16px;
}

/* Navbar Breadcrumb */
.navbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.breadcrumb-link {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.breadcrumb-link:hover {
    color: #fff;
}

.breadcrumb-separator {
    color: #6c757d;
    font-size: 0.8rem;
}

.breadcrumb-current {
    color: #fff;
    font-weight: 600;
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    height: 100%;
}

.dropdown-arrow {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.3s;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(225deg) translateY(1px);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    padding: 0.5rem 0;
    z-index: 1000;
    margin-top: 0;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.6rem 1.2rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background-color: #f0f7ff;
    color: #0969da;
}

.dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 6px 6px;
}

.navbar-center .nav-link {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    white-space: nowrap;
}

.navbar-center .nav-link:hover {
    color: #fff;
}

.navbar-right .nav-link {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    white-space: nowrap;
}

.navbar-right .nav-link:hover {
    color: #fff;
}

.navbar-right .nav-link-right {
    font-size: 0.9rem;
}

.navbar-right .nav-link-user {
    color: #ff6b6b;
}

.navbar-right .nav-link-user:hover {
    color: #ff5252;
}

/* Main Content */
.main-content {
    padding: 2.5rem 1.5rem;
    min-height: calc(100vh - 200px);
    max-width: 1600px;
    margin: 0 auto;
}

/* Row Layout */
.row {
    display: flex;
    gap: 2rem;
    width: 100%;
    margin: 0;
    padding: 0;
    align-items: flex-start;
}

.col-main {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 320px);
}

.col-sidebar {
    width: 300px;
    flex-shrink: 0;
    min-width: 300px;
}

/* 面包屑导航容器 */
.breadcrumb-container {
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* ===== 首页布局：Grid双列文章 + 右侧侧边栏 ===== */
.index-page > .row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 310px !important;
    gap: 1.15rem !important;
    align-items: start !important;
    width: 100% !important;
    margin: 0 !important;
}

.index-page > .row > .col-main {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    order: 1 !important;
}

.index-page > .row > .col-sidebar {
    width: 310px !important;
    min-width: 310px !important;
    flex-shrink: 0 !important;
    order: 2 !important;
}

/* 首页文章列表：双列 grid */
.index-page .article-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

/* 首页双列卡片覆盖：图片 110×80，内容区防溢出 */
.index-page .article-grid .search-result-card {
    align-items: flex-start;
    min-height: 0;
    overflow: hidden;
}

.index-page .article-grid .search-result-cover {
    width: 110px;
    height: 80px;
    flex-shrink: 0;
}

.index-page .article-grid .search-result-content {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.content-site-home {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 1rem;
    align-items: stretch;
}

.home-hero-main,
.hero-feature-card,
.home-panel,
.main-feed-panel,
.content-card,
.sidebar-note {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(214, 223, 233, 0.95);
    box-shadow: 0 14px 35px rgba(28, 39, 60, 0.06);
}

.home-hero-main {
    border-radius: 20px;
    padding: 1.45rem 1.55rem;
}

.hero-kicker {
    margin-bottom: 0.45rem;
    color: #9a5a12;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.home-hero-main h1 {
    font-size: 2rem;
    line-height: 1.15;
    color: #102033;
    margin-bottom: 0.65rem;
}

.hero-summary {
    color: #4f5f73;
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 720px;
}

.hero-meta-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}

.hero-meta-row span {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #f4ede4;
    color: #7a4d1d;
    font-size: 0.82rem;
}

.hero-feature-card {
    border-radius: 20px;
    padding: 0.85rem;
    display: grid;
    grid-template-columns: 152px minmax(0, 1fr);
    gap: 0.85rem;
}

.hero-feature-cover,
.hero-feature-cover img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    border-radius: 14px;
    object-fit: cover;
}

.hero-feature-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-feature-label {
    margin-bottom: 0.3rem;
    color: #bd6f16;
    font-weight: 600;
    font-size: 0.82rem;
}

.hero-feature-content h2 {
    font-size: 1.18rem;
    line-height: 1.3;
    margin-bottom: 0.45rem;
}

.hero-feature-content h2 a,
.compact-pick-card h3 a,
.related-card h3 a {
    color: #102033;
    text-decoration: none;
}

.hero-feature-content h2 a:hover,
.compact-pick-card h3 a:hover,
.related-card h3 a:hover {
    color: #0d5ea8;
}

.hero-feature-content p {
    color: #56657a;
    font-size: 0.92rem;
    line-height: 1.6;
}

.hero-feature-meta,
.related-meta,
.content-card-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    color: #6a7686;
    font-size: 0.88rem;
}

.home-top-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.home-panel {
    border-radius: 18px;
    padding: 1rem 1.05rem;
}

.panel-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #e8edf3;
}

.panel-heading h2 {
    margin: 0;
    color: #102033;
    font-size: 1.15rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.panel-heading p {
    margin: 0;
    color: #6a7686;
    font-size: 0.84rem;
    line-height: 1.45;
    max-width: 34rem;
}

.compact-pick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.compact-pick-card {
    background: #f8fafc;
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
}

.compact-pick-card h3 {
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.compact-pick-card p,
.related-card p {
    color: #5e6b7d;
    font-size: 0.88rem;
    line-height: 1.55;
}

.topic-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.topic-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    min-width: 170px;
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    text-decoration: none;
    background: linear-gradient(135deg, #fffaf0 0%, #eef6ff 100%);
    border: 1px solid #e3e8ef;
    color: #20334a;
}

.topic-chip strong {
    color: #a45b11;
}

.panel-heading-main {
    margin-bottom: 0.8rem;
}

.main-feed-panel {
    border-radius: 20px;
    padding: 1rem 1rem 0.3rem;
}

.feed-toolbar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.feed-toolbar-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.62rem;
    border-radius: 999px;
    background: #f3f6fa;
    border: 1px solid #e1e8f0;
    color: #5f6f81;
    font-size: 0.8rem;
    white-space: nowrap;
}

.content-card-latest {
    border-radius: 14px;
    padding: 0.2rem;
    box-shadow: 0 8px 22px rgba(28, 39, 60, 0.05);
}

.content-card-latest .search-result-content {
    padding-right: 0.25rem;
}

/* 平板/手机：单列布局，侧边栏移到下方 */
@media (max-width: 768px) {
    .index-page > .row {
        grid-template-columns: 1fr !important;
    }

    .index-page > .row > .col-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        order: 2 !important;
    }

    .index-page > .row > .col-main {
        order: 1 !important;
    }

    .index-page .article-grid {
        grid-template-columns: 1fr !important;
    }
}

/* 响应式布局 */
@media (max-width: 992px) {
    .row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .col-sidebar {
        width: 100%;
    }
}

/* Post Card */
.posts-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* 双列布局 */
    gap: 20px;
    padding: 0;
}

/* 响应式：小屏幕单栏 */
@media (max-width: 1200px) {
    .admin-sections {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-sections {
        grid-template-columns: 1fr;
    }
    
    .posts-list {
        grid-template-columns: 1fr;  /* 移动端单列 */
        gap: 15px;
    }
}

/* 基础 post-card 样式 - 默认垂直布局 */
.post-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* 水平布局的文章卡片 */
.post-card.post-card-horizontal {
    flex-direction: row !important;
    height: 180px;
    padding: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
}

.post-card.post-card-horizontal:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    border-color: #007bff30;
}

.post-card.post-card-horizontal .post-cover {
    width: 220px !important;
    flex-shrink: 0;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.post-card.post-card-horizontal .post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card.post-card-horizontal:hover .post-cover img {
    transform: scale(1.05);
}

.post-card.post-card-horizontal .post-content-wrapper {
    flex: 1;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.post-card.post-card-horizontal .post-title {
    font-size: 1.15rem;
    margin: 0 0 8px 0;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    position: relative;
}

.post-card.post-card-horizontal .post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
    position: relative;
    cursor: pointer;
}

.post-card.post-card-horizontal .post-title a:hover {
    color: #007bff;
}

.post-card.post-card-horizontal .post-meta {
    display: flex;
    align-items: center;
    gap: 6px;  /* ✅ 间距减小到 6px */
    font-size: 0.65rem;  /* ✅ 字体减小到 0.65rem */
    color: #6c757d;
    margin-bottom: 6px;  /* ✅ 底部间距增加到 6px */
    flex-wrap: wrap;
}

.post-card.post-card-horizontal .post-category a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    padding: 1px 3px;  /* ✅ 内边距减小 */
    border-radius: 3px;
    transition: all 0.2s;
}

.post-card.post-card-horizontal .post-category a:hover {
    text-decoration: none;
    background: #007bff10;
}

.post-card.post-card-horizontal .post-summary {
    color: #5a6c7d;
    font-size: 0.7rem;  /* ✅ 字体减小到 0.7rem */
    line-height: 1.45;  /* ✅ 行高稍小 */
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;  /* ✅ 底部间距增加到 6px */
    background: linear-gradient(to bottom, transparent, transparent);
}

.post-card.post-card-horizontal .post-tags {
    display: flex;
    gap: 3px;  /* ✅ 间距减小到 3px */
    flex-wrap: wrap;
    margin-top: auto;
}

.post-card.post-card-horizontal .post-tags .tag {
    padding: 1px 4px;
    background: #f6f8fa;
    border-radius: 4px;
    color: #57606a;
    font-size: 0.6rem;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
    font-weight: 400;
}

.post-card.post-card-horizontal .post-tags .tag:hover {
    background: #e9ecef;
    color: #24292f;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .post-card.post-card-horizontal {
        flex-direction: column !important;
        height: auto;
    }
    
    .post-card.post-card-horizontal .post-cover {
        width: 100% !important;
        height: 200px;
    }
    
    .post-card.post-card-horizontal .post-content-wrapper {
        padding: 16px;
    }
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #d0d7de;
}

.post-cover {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-cover img {
    transform: scale(1.08);
}

.post-content-wrapper {
    padding: 1.5rem 2rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-info {
    flex: 1;
    padding: 0 16px !important;
}

.post-title {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-left: 0;
}

.post-title a {
    color: #24292f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a:hover {
    color: #0969da;
}

.post-meta {
    display: flex;
    gap: 0.75rem;
    color: #656d76;
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-meta a {
    color: #0969da;
    text-decoration: none;
}

.post-meta a:hover {
    color: #0550ae;
    text-decoration: underline;
}

.post-summary {
    color: #57606a;
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.tag {
    display: inline-block;
    background: #f6f8fa;
    color: #24292f;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid #d0d7de;
    transition: all 0.2s;
}

.tag:hover {
    background: #f3f4f6;
    border-color: #0969da;
    color: #0969da;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tag:hover {
    background: #007bff;
    color: white;
}

/* Sidebar */
.sidebar-widget {
    background: white;
    padding: 1.1rem 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.widget-title {
    font-size: 0.98rem;
    margin-bottom: 0.85rem;
    color: #24292f;
    border-bottom: 1px solid #dbe5ef;
    padding-bottom: 0.45rem;
    font-weight: 600;
    padding-left: 0.1rem;
    line-height: 1.25;
}

.content-sidebar {
    position: sticky;
    top: 1rem;
}

.sidebar-note {
    background:
        linear-gradient(180deg, rgba(255, 250, 240, 0.95) 0%, rgba(245, 249, 255, 0.95) 100%);
    border-color: #e7dcc9;
}

.sidebar-note-kicker {
    margin: 0 0 0.35rem;
    color: #a06018;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.widget-title-note {
    border-bottom: none;
    margin-bottom: 0.4rem;
    padding-bottom: 0;
}

.sidebar-note-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.sidebar-note-points span {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.75);
    border: 1px solid #eadfcb;
    color: #7d5a32;
    font-size: 0.76rem;
}

.category-list,
.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li,
.recent-posts li {
    margin-bottom: 0.5rem;
}

.category-list a,
.recent-posts a {
    color: #57606a;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    transition: all 0.2s;
    border-radius: 6px;
    font-size: 0.9rem;
    margin: 0.125rem 0;
}

.category-list a:hover,
.recent-posts a:hover {
    color: #0969da;
    background: #f6f8fa;
}

.count {
    color: #8c959f;
    font-size: 0.8rem;
    background: #f6f8fa;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.category-count {
    color: #8c959f;
    font-size: 0.8rem;
    background: #f6f8fa;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

/* 最新文章列表 */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-post-item {
    padding: 0.68rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-link {
    color: #24292f;
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.4;
    transition: color 0.2s;
}

.recent-post-link:hover {
    color: #0969da;
}

.recent-post-date {
    color: #8c959f;
    font-size: 0.75rem;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.search-btn {
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #0056b3;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.page-link {
    color: #007bff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #007bff;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-link:hover {
    background: #007bff;
    color: white;
}

.page-info {
    color: #7f8c8d;
}

/* Post Detail */
.post-detail {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.post-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #f8f9fa;
    color: #333;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid #e9ecef;
}

.post-content pre code {
    background: transparent;
    color: inherit;
}

.post-shell {
    max-width: 1080px;
    margin: 0 auto;
}

.post-breadcrumb {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    color: #617187;
    font-size: 0.92rem;
}

.post-breadcrumb a {
    color: #0d5ea8;
    text-decoration: none;
}

.post-detail-enhanced {
    border-radius: 18px;
    padding: 2.2rem;
    box-shadow: 0 14px 35px rgba(28, 39, 60, 0.08);
}

.post-header-enhanced {
    padding-bottom: 1.25rem;
}

.post-header-topline {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.9rem;
}

.post-category-link {
    color: #0d5ea8;
    text-decoration: none;
    font-weight: 600;
}

.post-summary {
    margin: 1rem 0 0;
    color: #4e5d71;
    font-size: 1.02rem;
    line-height: 1.8;
}

.post-meta-enhanced {
    gap: 0.8rem 1rem;
    display: flex;
    flex-wrap: wrap;
    margin-top: 1rem;
    color: #6b7787;
    font-size: 0.92rem;
}

.source-callout {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin: 0 0 1.6rem;
    padding: 1.2rem 1.3rem;
    background: linear-gradient(135deg, #fff6e8 0%, #eef6ff 100%);
    border: 1px solid #eadfcb;
    border-radius: 16px;
}

.source-callout-copy h2 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.source-callout-copy p {
    margin: 0;
    color: #59697c;
}

.source-callout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    background: #0d5ea8;
    color: white;
    white-space: nowrap;
}

.related-reading {
    background: rgba(255,255,255,0.92);
    border: 1px solid #d6dfe9;
    border-radius: 18px;
    padding: 1.4rem;
    margin-bottom: 2rem;
    box-shadow: 0 14px 35px rgba(28, 39, 60, 0.06);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.related-card {
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    padding: 1rem;
    background: #f9fbfd;
}

.related-card h3 {
    margin-bottom: 0.45rem;
    font-size: 1rem;
}

/* Comments */
.comments-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.comment {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: bold;
    color: #333;
}

.comment-content {
    color: #555;
    line-height: 1.6;
}

.comment-replies {
    margin-left: 2rem;
    margin-top: 1rem;
}

.comment-form-container {
    margin-top: 2rem;
}

.comment-form .form-group {
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
}

/* Footer */
.footer {
    background: #343a40;
    color: #adb5bd;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-meta {
    margin-top: 0.45rem;
    font-size: 0.95rem;
}

.footer-meta a {
    color: #adb5bd;
    text-decoration: none;
}

.footer-meta a:hover {
    color: #fff;
}

/* Search Results */
.search-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.search-result-card {
    display: flex;
    flex-direction: row;
    gap: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 10px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    align-items: flex-start;
}

.search-result-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.search-result-cover {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #f6f8fa;
}

.search-result-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.search-result-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-title {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-title a {
    color: #24292f;
    text-decoration: none;
    transition: color 0.3s;
}

.search-result-title a:hover {
    color: #007bff;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #57606a;
    flex-wrap: wrap;
}

.search-result-meta .post-date,
.search-result-meta .post-category,
.search-result-meta .post-views {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.search-result-meta .post-category {
    background: #f6f8fa;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
}

.search-result-summary {
    color: #57606a;
    font-size: 0.65rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.search-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 1px;
}

.search-result-tags .tag {
    padding: 1px 2px;
    background: #f6f8fa;
    border-radius: 2px;
    color: #57606a;
    font-size: 0.45rem;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
    font-weight: 400;
}

.search-result-tags .tag:hover {
    background: #e9ecef;
    color: #24292f;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Search Header */
.search-header,
.tag-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.search-header h1,
.tag-header h1 {
    font-size: 1.8rem;
    color: #24292f;
    margin: 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 0;
    color: #57606a;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .search-results {
        grid-template-columns: 1fr;
    }
    
    .search-result-card {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-result-cover {
        width: 100%;
        height: 160px;
    }
    
    .search-result-title {
        font-size: 0.95rem;
    }
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    color: #7f8c8d;
}

.auth-footer a {
    color: #007bff;
    text-decoration: none;
}

.auth-footer a:hover {
    color: #0056b3;
}

/* Forms */
.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.error {
    color: #e74c3c;
    font-size: 0.85rem;
    display: block;
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn:hover {
    background: #5a6268;
}

.btn-primary {
    background: #007bff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Admin Dashboard */
.admin-dashboard {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.page-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.admin-sections {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.admin-section .section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.admin-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-link {
    color: #3498db;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.admin-link:hover {
    background: #e3f2fd;
}

.pending-alert {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    text-transform: capitalize;
}

.status-published,
.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-draft,
.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-archived,
.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #3498db;
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Admin Form */
.admin-page {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.col-half {
    flex: 1;
}

.form-help {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Image Upload */
.image-upload-container {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.image-upload-container:hover {
    border-color: #3498db;
    background: #e3f2fd;
}

.current-image {
    margin-top: 1rem;
}

.current-image p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.current-image img {
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Game Resources */
.resources-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    text-align: center;
}

/* Markdown Content Styles */
.markdown-body {
    font-size: 1rem;
    line-height: 1.8;
    color: #2c3e50;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.25;
    color: #1a202c;
}

.markdown-body h1 {
    font-size: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eaecef;
}

.markdown-body h2 {
    font-size: 1.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #eaecef;
}

.markdown-body h3 {
    font-size: 1.25rem;
}

.markdown-body p {
    margin-bottom: 1.2rem;
}

.markdown-body a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

.markdown-body a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.markdown-body code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: #f6f8fa;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #e83e8c;
}

.markdown-body pre {
    background-color: #f6f8fa;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #e1e4e8;
}

.markdown-body pre code {
    padding: 0;
    margin: 0;
    font-size: 100%;
    background: transparent;
    color: inherit;
    border-radius: 0;
}

.markdown-body blockquote {
    padding: 0.5rem 1rem;
    margin: 1.5rem 0;
    color: #6a737d;
    border-left: 0.25rem solid #dfe2e5;
    background-color: #f6f8fa;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 2rem;
    margin-bottom: 1.2rem;
}

.markdown-body li {
    margin-bottom: 0.5rem;
}

.markdown-body li > ul,
.markdown-body li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    display: block;
    overflow-x: auto;
}

.markdown-body th,
.markdown-body td {
    padding: 0.75rem;
    border: 1px solid #dfe2e5;
}

.markdown-body th {
    background-color: #f6f8fa;
    font-weight: 600;
}

.markdown-body tr:nth-child(even) {
    background-color: #f6f8fa;
}

.markdown-body hr {
    height: 0.25em;
    padding: 0;
    margin: 2rem 0;
    background-color: #e1e4e8;
    border: 0;
}

/* Code Highlight (Pygments) */
.codehilite {
    background: #282c34;
    color: #abb2bf;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.codehilite pre {
    background: transparent;
    border: none;
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
}

.codehilite code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Pygments syntax highlighting colors */
.codehilite .hll { background-color: #49483e }
.codehilite .c { color: #75715e } /* Comment */
.codehilite .err { color: #960050; background-color: #1e0010 } /* Error */
.codehilite .k { color: #66d9ef } /* Keyword */
.codehilite .l { color: #ae81ff } /* Literal */
.codehilite .n { color: #f8f8f2 } /* Name */
.codehilite .o { color: #f92672 } /* Operator */
.codehilite .p { color: #f8f8f2 } /* Punctuation */
.codehilite .cm { color: #75715e } /* Comment.Multiline */
.codehilite .cp { color: #75715e } /* Comment.Preproc */
.codehilite .c1 { color: #75715e } /* Comment.Single */
.codehilite .cs { color: #75715e } /* Comment.Special */
.codehilite .ge { font-style: italic } /* Generic.Emph */
.codehilite .gs { font-weight: bold } /* Generic.Strong */
.codehilite .kc { color: #66d9ef } /* Keyword.Constant */
.codehilite .kd { color: #66d9ef } /* Keyword.Declaration */
.codehilite .kn { color: #f92672 } /* Keyword.Namespace */
.codehilite .kp { color: #66d9ef } /* Keyword.Pseudo */
.codehilite .kr { color: #66d9ef } /* Keyword.Reserved */
.codehilite .kt { color: #66d9ef } /* Keyword.Type */
.codehilite .ld { color: #e6db74 } /* Literal.Date */
.codehilite .m { color: #ae81ff } /* Literal.Number */
.codehilite .s { color: #e6db74 } /* Literal.String */
.codehilite .na { color: #a6e22e } /* Name.Attribute */
.codehilite .nb { color: #f8f8f2 } /* Name.Builtin */
.codehilite .nc { color: #a6e22e } /* Name.Class */
.codehilite .no { color: #66d9ef } /* Name.Constant */
.codehilite .nd { color: #a6e22e } /* Name.Decorator */
.codehilite .ni { color: #f8f8f2 } /* Name.Entity */
.codehilite .ne { color: #a6e22e } /* Name.Exception */
.codehilite .nf { color: #a6e22e } /* Name.Function */
.codehilite .nl { color: #f8f8f2 } /* Name.Label */
.codehilite .nn { color: #f8f8f2 } /* Name.Namespace */
.codehilite .nx { color: #a6e22e } /* Name.Other */
.codehilite .py { color: #f8f8f2 } /* Name.Property */
.codehilite .nt { color: #f92672 } /* Name.Tag */
.codehilite .nv { color: #f8f8f2 } /* Name.Variable */
.codehilite .ow { color: #f92672 } /* Operator.Word */
.codehilite .w { color: #f8f8f2 } /* Text.Whitespace */
.codehilite .mf { color: #ae81ff } /* Literal.Number.Float */
.codehilite .mh { color: #ae81ff } /* Literal.Number.Hex */
.codehilite .mi { color: #ae81ff } /* Literal.Number.Integer */
.codehilite .mo { color: #ae81ff } /* Literal.Number.Oct */
.codehilite .sb { color: #e6db74 } /* Literal.String.Backtick */
.codehilite .sc { color: #e6db74 } /* Literal.String.Char */
.codehilite .sd { color: #e6db74 } /* Literal.String.Doc */
.codehilite .s2 { color: #e6db74 } /* Literal.String.Double */
.codehilite .se { color: #ae81ff } /* Literal.String.Escape */
.codehilite .sh { color: #e6db74 } /* Literal.String.Heredoc */
.codehilite .si { color: #e6db74 } /* Literal.String.Interpol */
.codehilite .sx { color: #e6db74 } /* Literal.String.Other */
.codehilite .sr { color: #e6db74 } /* Literal.String.Regex */
.codehilite .s1 { color: #e6db74 } /* Literal.String.Single */
.codehilite .ss { color: #e6db74 } /* Literal.String.Symbol */
.codehilite .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.codehilite .vc { color: #f8f8f2 } /* Name.Variable.Class */
.codehilite .vg { color: #f8f8f2 } /* Name.Variable.Global */
.codehilite .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.codehilite .il { color: #ae81ff } /* Literal.Number.Integer.Long */

/* Responsive images */
.img-responsive {
    max-width: 100%;
    height: auto;
}

.resource-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.resources-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1.5rem;
    transition: transform 0.2s;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.resource-title a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.2rem;
}

.resource-title a:hover {
    color: #3498db;
}

.resource-type-badge {
    background: #3498db;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.resource-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.resource-description {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.resource-date {
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* Resource Detail */
.resource-detail {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.resource-detail .resource-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 1rem;
}

.download-link {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.download-tip {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.back-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    margin-top: 1rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #2980b9;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 1rem;
        flex-wrap: wrap;
        position: relative;
        min-height: 60px;
        align-items: center;
        justify-content: space-between;
    }
    
    /* 显示汉堡菜单按钮 */
    .navbar-toggle {
        display: flex;
        order: 2;
        margin-left: 0;
        flex-shrink: 0;
        position: relative;
        right: 0;
    }
    
    .navbar-brand {
        order: 1;
        flex-shrink: 0;
    }
    
    /* 移动端菜单样式 - 默认隐藏，点击后显示 */
    .navbar-center {
        display: none;
        width: 100%;
        order: 3;
        flex-basis: 100%;
    }
    
    .navbar-right {
        display: none;
        width: 100%;
        order: 4;
        flex-basis: 100%;
    }
    
    /* 移动端展开状态 - 统一显示在一个容器内 */
    .navbar-center.active {
        display: flex;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #343a40;
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        border-top: 1px solid rgba(255,255,255,0.1);
        z-index: 1000;
    }
    
    .navbar-right.active {
        display: flex;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 0;
    }
    
    /* 移动端搜索框 */
    .navbar-search {
        width: 100%;
        padding: 0.6rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.15);
    }
    
    .navbar-search-input {
        width: 100%;
        background: transparent;
    }
    
    .navbar-search-btn {
        padding: 0.5rem 0.8rem;
        background: transparent;
        border-left: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-center .nav-link {
        padding: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
        color: #fff;
        font-weight: 500;
    }
    
    .navbar-center .nav-link:hover {
        background-color: rgba(255,255,255,0.1);
        color: #fff;
    }
    
    /* 移动端下拉菜单 */
    .nav-dropdown {
        width: 100%;
        position: static;
    }
    
    .nav-dropdown-toggle {
        width: 100%;
        padding: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        justify-content: space-between;
        color: #fff;
        font-weight: 500;
    }
    
    .nav-dropdown-toggle:hover {
        background-color: rgba(255,255,255,0.1);
        color: #fff;
    }
    
    .nav-dropdown:hover .dropdown-menu {
        display: none;
    }
    
    .nav-dropdown.mobile-open .dropdown-menu {
        display: block;
        position: static;
        box-shadow: none;
        background-color: rgba(0,0,0,0.2);
        min-width: 100%;
    }
    
    .dropdown-item {
        padding: 0.8rem 2rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        color: #fff;
        font-weight: 500;
    }
    
    .dropdown-item:hover {
        background-color: rgba(255,255,255,0.1);
        color: #fff;
    }
    
    .dropdown-arrow {
        transition: transform 0.3s;
    }
    
    .nav-dropdown.mobile-open .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    /* 移动端右侧导航 */
    .navbar-right {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #343a40;
        flex-direction: column;
        gap: 0;
        padding: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        z-index: 1000;
    }
    
    .navbar-right.active {
        display: flex;
    }
    
    .navbar-right .nav-link {
        padding: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
        color: #fff;
        font-weight: 500;
    }
    
    .navbar-right .nav-link:hover {
        background-color: rgba(255,255,255,0.1);
        color: #fff;
    }
    
    .navbar-right .nav-link-right {
        font-size: 1rem;
    }
    
    .row {
        flex-direction: column;
    }
    
    .col-sidebar {
        width: 100%;
    }
    
    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats-grid,
    .admin-sections {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .resources-list {
        grid-template-columns: 1fr;
    }
    
    /* 移动端内容调整 */
    .main-content {
        padding: 1rem;
    }
    
    .posts-list {
        grid-template-columns: 1fr;
    }
}

/* 平板尺寸优化 */
@media (min-width: 769px) and (max-width: 992px) {
    .navbar-container {
        padding: 0 1rem;
    }
    
    .navbar-center {
        gap: 1rem;
    }
    
    .navbar-center .nav-link {
        font-size: 0.9rem;
    }
}

/* Pagination Styles */
.pagination-container {
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid #e1e4e8;
}

.pagination-info {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.per-page-selector label {
    color: #6c757d;
    font-size: 0.9rem;
}

.per-page-selector select {
    padding: 0.4rem 0.8rem;
    border: 1px solid #dfe2e5;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

.per-page-selector select:hover {
    border-color: #007bff;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.9rem;
    border: 1px solid #dfe2e5;
    border-radius: 4px;
    text-decoration: none;
    color: #007bff;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.pagination a:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.pagination span.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: 600;
}

.pagination span.disabled {
    color: #6c757d;
    border-color: #e1e4e8;
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 注意：首页布局规则统一在文件前部 .index-page 区块中定义，此处不重复 */

.article-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin: 2rem 0;
}

.article-card-grid {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.article-card-grid:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.article-cover {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card-grid:hover .article-cover img {
    transform: scale(1.1);
}

.article-cover a {
    display: block;
    width: 100%;
    height: 100%;
}

.article-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-title-grid {
    font-size: 1rem;
    margin: 0 0 10px 0;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-title-grid a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.article-title-grid a:hover {
    color: #007bff;
}

.article-summary-grid {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 10px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #999;
    border-top: 1px solid #e9ecef;
    padding-top: 10px;
    margin-top: auto;
}

.article-date {
    white-space: nowrap;
}

.article-views {
    white-space: nowrap;
}

/* 响应式布局 */
@media (max-width: 1400px) {
    .article-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .article-cover {
        height: 150px;
    }
    
    .article-info {
        padding: 12px;
    }
    
    .article-title-grid {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .article-grid {
        grid-template-columns: 1fr;
    }
}

/* 查看更多按钮 */
.view-more {
    text-align: center;
    margin: 2rem 0;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid #007bff;
    color: #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

/* 空状态 */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .pagination span.ellipsis {
    border: none;
    color: #6c757d;
    padding: 0.5rem 0.3rem;
}

@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .per-page-selector {
        justify-content: center;
    }
    
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* 资源下载区域 */
.resource-download-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.resource-download-section h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.3rem;
}

.resource-card {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.resource-info {
    flex: 1;
}

.resource-points {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

.badge-free {
    background: #28a745;
    color: white;
}

.badge-points {
    background: #007bff;
    color: white;
}

.resource-points .desc {
    color: #6c757d;
    font-size: 0.9rem;
}

.resource-action .btn-download {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}

.resource-action .btn-download:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.post-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.type-link {
    background: #e8f1fb;
    color: #145ea8;
}

.type-text {
    background: #f3ebff;
    color: #7246b8;
}

.type-article {
    background: #e9f7ef;
    color: #18794e;
}

.sidebar-action-link {
    display: inline-block;
    margin-top: 0.8rem;
    color: #0d5ea8;
    text-decoration: none;
    font-weight: 600;
}

.sidebar-note p {
    color: #5c6a7c;
}

.footer-divider {
    margin: 0 0.45rem;
    color: #74808d;
}

@media (max-width: 992px) {
    .home-hero,
    .home-top-strip,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .index-page > .row {
        grid-template-columns: 1fr !important;
    }

    .index-page > .row > .col-sidebar {
        width: 100% !important;
        min-width: 100% !important;
    }

    .content-sidebar {
        position: static;
    }

    .hero-feature-card,
    .compact-pick-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home-hero-main,
    .hero-feature-card,
    .home-panel,
    .main-feed-panel,
    .post-detail-enhanced,
    .related-reading {
        border-radius: 16px;
        padding: 1.2rem;
    }

    .home-hero-main h1 {
        font-size: 1.8rem;
    }

    .source-callout {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-meta-enhanced,
    .hero-meta-row {
        gap: 0.55rem;
    }

    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .feed-toolbar {
        width: 100%;
    }
}
