/* ===================================================
   JUNS_ REDESIGN v1.0
   技术博客完整改版样式
   =================================================== */

/* ==========================================
   1. DESIGN TOKENS (CSS Variables)
   ========================================== */
:root {
    /* Color Palette */
    --juns-primary: #2563EB;
    --juns-primary-dark: #1D4ED8;
    --juns-primary-light: #DBEAFE;
    --juns-accent: #F59E0B;
    --juns-accent-light: #FEF3C7;

    /* Neutrals */
    --juns-gray-50: #F9FAFB;
    --juns-gray-100: #F3F4F6;
    --juns-gray-200: #E5E7EB;
    --juns-gray-300: #D1D5DB;
    --juns-gray-500: #6B7280;
    --juns-gray-700: #374151;
    --juns-gray-800: #1F2937;
    --juns-gray-900: #111827;

    /* Typography */
    --juns-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    --juns-font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --juns-text-base: 1rem;
    --juns-text-sm: 0.875rem;
    --juns-text-xs: 0.75rem;
    --juns-leading-relaxed: 1.75;

    /* Spacing */
    --juns-space-xs: 0.5rem;
    --juns-space-sm: 0.75rem;
    --juns-space-md: 1rem;
    --juns-space-lg: 1.5rem;
    --juns-space-xl: 2rem;
    --juns-space-2xl: 3rem;

    /* Radius */
    --juns-radius-sm: 0.375rem;
    --juns-radius-md: 0.5rem;
    --juns-radius-lg: 0.75rem;
    --juns-radius-xl: 1rem;
    --juns-radius-full: 9999px;

    /* Shadows */
    --juns-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --juns-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --juns-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);

    /* Transitions */
    --juns-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --juns-transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --juns-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --juns-nav-height: 60px;
}

/* ==========================================
   2. GLOBAL LAYOUT
   ========================================== */
body {
    font-family: var(--juns-font-sans);
    color: var(--juns-gray-700);
    line-height: var(--juns-leading-relaxed);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--juns-gray-50);
}

.layui-container {
    max-width: 1300px !important;
}

.layui-content {
    padding-top: 80px;
}

.body-back {
    display: none;
}

/* ==========================================
   3. HEADER - Enhanced Glassmorphism
   ========================================== */
.layui-header {
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    background: rgba(255, 255, 255, 0.75) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background var(--juns-transition-normal),
                box-shadow var(--juns-transition-normal);
}

.layui-header.header-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Logo */
.layui-header .logo img {
    height: 36px;
    width: auto;
    margin-top: 12px;
}

/* Nav items */
.layui-header .layui-nav {
    background: transparent;
}

.layui-header .layui-nav .layui-nav-item {
    margin: 0 1px;
}

.layui-header .layui-nav .layui-nav-item a {
    padding: 0 14px !important;
    font-size: var(--juns-text-sm);
    font-weight: 500;
    color: var(--juns-gray-700);
    border-radius: var(--juns-radius-md);
    transition: all var(--juns-transition-fast);
}

.layui-header .layui-nav .layui-nav-item.layui-this a,
.layui-header .layui-nav .layui-nav-item a:hover {
    color: var(--juns-primary) !important;
    background: var(--juns-primary-light) !important;
}

.layui-header .layui-nav .layui-nav-item.layui-this::after {
    background: var(--juns-primary) !important;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.layui-header .layui-nav .layui-nav-more {
    border-top-color: var(--juns-gray-500);
}

.layui-header .layui-nav .layui-nav-mored,
.layui-header .layui-nav-itemed > a .layui-nav-more {
    border-color: transparent transparent var(--juns-gray-500);
    border-style: dashed dashed solid;
}

/* Search icon */
.layui-header .site-notice {
    left: auto;
    right: 20px;
    color: var(--juns-gray-700);
    cursor: pointer;
    transition: color var(--juns-transition-fast);
}

.layui-header .site-notice:hover {
    color: var(--juns-primary);
}

/* Mobile header */
@media (max-width: 991px) {
    .layui-header .logo1 img {
        height: 32px;
        width: auto;
    }
}

/* ==========================================
   4. SUB-NAV / BREADCRUMB
   ========================================== */
.map,
.pagemap {
    margin-bottom: var(--juns-space-md);
    margin-top: -10px;
}

.map ul,
.pagemap ul {
    background: #fff;
    border-radius: var(--juns-radius-lg);
    padding: 10px 20px;
    box-shadow: var(--juns-shadow-sm);
    border: 1px solid var(--juns-gray-100);
}

.map ul li,
.map ul li a,
.pagemap a {
    color: var(--juns-gray-500);
    font-size: var(--juns-text-sm);
}

.map ul li a:hover,
.pagemap a:hover {
    color: var(--juns-primary);
}

/* ==========================================
   5. SIDEBAR
   ========================================== */
/* Un-hide sidebar on desktop */
@media (min-width: 992px) {
    .sidebar.layui-col-md3.layui-col-lg3 {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .layui-col-md9.layui-col-lg9 {
        width: 72%;
    }
}

.sidebar {
    padding-left: var(--juns-space-lg);
}

/* Sidebar position left */
.qzdy-3-9 .sidebar {
    padding-left: 0;
    padding-right: var(--juns-space-lg);
}

/* Sidebar widgets */
.sidebar .widget {
    background: #fff;
    border-radius: var(--juns-radius-lg);
    padding: var(--juns-space-lg);
    margin-bottom: var(--juns-space-lg);
    box-shadow: var(--juns-shadow-sm);
    border: 1px solid var(--juns-gray-100);
}

.sidebar .widget:last-child {
    margin-bottom: 0;
}

.sidebar .widget-title,
.sidebar .title-sidebar {
    font-size: 1rem;
    font-weight: 700;
    color: var(--juns-gray-900);
    margin-bottom: var(--juns-space-md);
    padding-bottom: var(--juns-space-sm);
    border-bottom: 2px solid var(--juns-gray-100);
    position: relative;
}

.sidebar .widget-title::after,
.sidebar .title-sidebar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--juns-primary);
    border-radius: 1px;
}

/* Profile Card */
.juns-profile-card {
    text-align: center;
}

.juns-profile-card .juns-profile-avatar {
    margin-bottom: var(--juns-space-md);
}

.juns-profile-card .juns-profile-avatar img {
    border-radius: 50%;
    border: 3px solid var(--juns-primary-light);
    width: 80px;
    height: 80px;
    box-shadow: var(--juns-shadow-md);
}

.juns-profile-card .juns-profile-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--juns-gray-900);
    margin: 0 0 4px;
}

.juns-profile-card .juns-profile-bio {
    font-size: var(--juns-text-sm);
    color: var(--juns-gray-500);
    line-height: var(--juns-leading-relaxed);
    margin-bottom: var(--juns-space-md);
}

.juns-profile-stats {
    display: flex;
    justify-content: center;
    gap: var(--juns-space-xl);
    font-size: var(--juns-text-sm);
    color: var(--juns-gray-700);
}

.juns-profile-stats a {
    text-decoration: none;
    color: inherit;
    transition: color var(--juns-transition-fast);
}

.juns-profile-stats a:hover {
    color: var(--juns-primary);
}

.juns-profile-stats strong {
    display: block;
    font-size: 1.25rem;
    color: var(--juns-primary);
}

/* Hot Posts List */
.juns-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.juns-post-list li {
    margin-bottom: var(--juns-space-sm);
}

.juns-post-list li:last-child {
    margin-bottom: 0;
}

.juns-post-list a {
    display: flex;
    align-items: center;
    gap: var(--juns-space-sm);
    text-decoration: none;
    padding: var(--juns-space-xs) 0;
    border-radius: var(--juns-radius-md);
    transition: all var(--juns-transition-fast);
}

.juns-post-list a:hover {
    padding-left: 6px;
}

.juns-post-list .juns-post-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--juns-gray-100);
    color: var(--juns-gray-500);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.juns-post-list li:nth-child(1) .juns-post-num,
.juns-post-list li:nth-child(2) .juns-post-num,
.juns-post-list li:nth-child(3) .juns-post-num {
    background: var(--juns-primary);
    color: #fff;
}

.juns-post-list .juns-post-info {
    flex: 1;
    min-width: 0;
}

.juns-post-list .juns-post-title {
    display: block;
    font-size: var(--juns-text-sm);
    color: var(--juns-gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    line-height: 1.5;
}

.juns-post-list .juns-post-date {
    display: block;
    font-size: var(--juns-text-xs);
    color: var(--juns-gray-500);
}

/* Category List */
.juns-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.juns-category-list li {
    margin-bottom: 2px;
}

.juns-category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    color: var(--juns-gray-700);
    text-decoration: none;
    font-size: var(--juns-text-sm);
    border-radius: var(--juns-radius-sm);
    transition: all var(--juns-transition-fast);
}

.juns-category-list a:hover {
    background: var(--juns-primary-light);
    color: var(--juns-primary);
}

.juns-category-list .post-count {
    background: var(--juns-gray-100);
    padding: 1px 8px;
    border-radius: var(--juns-radius-full);
    font-size: var(--juns-text-xs);
    color: var(--juns-gray-500);
}

/* Tag Cloud */
.juns-tags-list a,
.tagcloud a {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 4px 8px 0;
    background: var(--juns-gray-50);
    color: var(--juns-gray-700);
    font-size: var(--juns-text-sm) !important;
    border-radius: var(--juns-radius-full);
    text-decoration: none;
    transition: all var(--juns-transition-fast);
    border: 1px solid var(--juns-gray-100);
}

.juns-tags-list a:hover,
.tagcloud a:hover {
    background: var(--juns-primary);
    color: #fff;
    border-color: var(--juns-primary);
}

/* ==========================================
   6. POST CARDS
   ========================================== */
.main .layui-col-md9.layui-col-lg9 {
    background: transparent;
}

/* Article list container */
.paging-aa {
    display: flex;
    flex-direction: column;
    gap: var(--juns-space-md);
}

/* Single card */
.title-article.list-card {
    display: flex;
    background: #fff;
    border-radius: var(--juns-radius-lg);
    overflow: hidden;
    box-shadow: var(--juns-shadow-sm);
    border: 1px solid var(--juns-gray-100);
    transition: transform var(--juns-transition-normal),
                box-shadow var(--juns-transition-normal);
    padding: 0;
    margin-bottom: 0;
}

.title-article.list-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--juns-shadow-lg);
}

/* Card thumbnail */
.index-post-img-small {
    flex-shrink: 0;
    width: 250px;
    overflow: hidden;
}

.item-thumb-small {
    height: 100%;
    min-height: 170px;
    position: relative;
    display: block;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    transition: transform var(--juns-transition-slow);
    border-radius: 0;
}

.title-article.list-card:hover .item-thumb-small {
    transform: scale(1.06);
}

.item-thumb-small svg {
    position: absolute;
    z-index: 1;
    top: 10px;
    left: 10px;
    width: 22px;
    height: 22px;
    fill: rgba(255,255,255,0.9);
    display: none;
}

/* Date badge on thumbnail */
.item-thumb-small .layui-badge {
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--juns-radius-sm);
    height: auto;
    line-height: 1.5;
}

/* Card text body */
.index-post-text-small {
    flex: 1;
    padding: var(--juns-space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* Card title */
.index-post-text-small .text-ellipsis a {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--juns-gray-900);
    line-height: 1.4;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--juns-transition-fast);
}

.index-post-text-small .text-ellipsis a:hover {
    color: var(--juns-primary);
}

/* Sticky badge */
.index-post-text-small .layui-badge {
    background: var(--juns-accent);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 6px;
    height: auto;
    line-height: 1.5;
}

/* Card excerpt */
.index-post-text-small .summary {
    font-size: var(--juns-text-sm);
    color: var(--juns-gray-500);
    line-height: var(--juns-leading-relaxed);
    margin: var(--juns-space-xs) 0 var(--juns-space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Divider line */
.index-post-text-small .line {
    margin: 0 0 var(--juns-space-sm);
    height: 1px;
    background: var(--juns-gray-100);
    width: 100%;
}

/* Card meta */
.text-muted.list-inline {
    display: flex;
    gap: var(--juns-space-md);
    font-size: var(--juns-text-xs);
    color: var(--juns-gray-500);
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.text-muted.list-inline li {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    color: var(--juns-gray-500);
}

.text-muted.list-inline li i,
.text-muted.list-inline li .fa {
    color: var(--juns-gray-300);
}

.text-muted.list-inline a {
    color: var(--juns-gray-500);
    text-decoration: none;
    transition: color var(--juns-transition-fast);
}

.text-muted.list-inline a:hover {
    color: var(--juns-primary);
}

.viewfloat {
    margin-left: auto !important;
}

/* Card entrance animation */
.title-article.list-card {
    opacity: 0;
    transform: translateY(20px);
    animation: juns-card-enter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.title-article.list-card:nth-child(1) { animation-delay: 0ms; }
.title-article.list-card:nth-child(2) { animation-delay: 60ms; }
.title-article.list-card:nth-child(3) { animation-delay: 120ms; }
.title-article.list-card:nth-child(4) { animation-delay: 180ms; }
.title-article.list-card:nth-child(5) { animation-delay: 240ms; }
.title-article.list-card:nth-child(6) { animation-delay: 300ms; }
.title-article.list-card:nth-child(n+7) { animation-delay: 360ms; }

@keyframes juns-card-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   7. PAGINATION
   ========================================== */
.pagination,
.paging-aa + .next-page {
    margin-top: var(--juns-space-xl);
    text-align: center;
}

.page-navigator {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-navigator li {
    display: inline-block;
}

.page-navigator li a,
.page-navigator li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    background: #fff;
    border: 1px solid var(--juns-gray-200);
    border-radius: var(--juns-radius-md);
    color: var(--juns-gray-700);
    font-size: var(--juns-text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--juns-transition-fast);
}

.page-navigator li a:hover {
    background: var(--juns-primary-light);
    border-color: var(--juns-primary);
    color: var(--juns-primary);
}

.page-navigator li span.current {
    background: var(--juns-primary);
    border-color: var(--juns-primary);
    color: #fff;
}

.next-page a {
    display: inline-block;
    padding: 10px 30px;
    background: #fff;
    border: 1px solid var(--juns-gray-200);
    border-radius: var(--juns-radius-lg);
    color: var(--juns-gray-700);
    font-size: var(--juns-text-sm);
    text-decoration: none;
    transition: all var(--juns-transition-fast);
}

.next-page a:hover {
    background: var(--juns-primary);
    color: #fff;
    border-color: var(--juns-primary);
}

/* ==========================================
   8. HERO / CAROUSEL
   ========================================== */
.layui-carousel {
    margin-bottom: var(--juns-space-xl);
    border-radius: var(--juns-radius-xl);
    overflow: hidden;
    box-shadow: var(--juns-shadow-lg);
}

.layui-carousel .layui-carousel-item > div {
    height: 380px;
}

.layui-carousel img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.layui-carousel .hdp-title {
    font-size: 1.125rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 60px 30px 20px;
}

/* Carousel dots */
.layui-carousel-ind {
    bottom: 16px;
}

.layui-carousel-ind li {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 3px;
    transition: all var(--juns-transition-fast);
}

.layui-carousel-ind li.layui-this {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* Sticky posts grid */
.qzdy_index__hot {
    background: #fff;
    border-radius: var(--juns-radius-lg);
    padding: var(--juns-space-md);
    margin-bottom: var(--juns-space-xl);
    box-shadow: var(--juns-shadow-sm);
    border: 1px solid var(--juns-gray-100);
}

.qzdy_index__hot-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--juns-space-md);
}

.qzdy_index__hot-list .item .link .inner {
    position: relative;
    overflow: hidden;
    border-radius: var(--juns-radius-md);
}

.qzdy_index__hot-list .item .link .inner .image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--juns-radius-md);
    transition: transform var(--juns-transition-slow);
}

.qzdy_index__hot-list .item .link .inner:hover .image {
    transform: scale(1.08);
}

.qzdy_index__hot-list .item .link .inner .title {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    padding: 0 8px;
    line-height: 28px;
    color: var(--juns-gray-700);
    background: var(--juns-gray-50);
    border-radius: 0 0 var(--juns-radius-md) var(--juns-radius-md);
    transition: background var(--juns-transition-fast);
}

.qzdy_index__hot-list .item .link .inner:hover .title {
    background: var(--juns-primary-light);
    color: var(--juns-primary);
}

/* ==========================================
   9. FOOTER
   ========================================== */
.juns-footer {
    background: var(--juns-gray-900);
    color: var(--juns-gray-300);
    margin-top: var(--juns-space-2xl);
    padding-top: var(--juns-space-2xl);
}

.juns-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--juns-space-xl);
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 var(--juns-space-xl);
}

.juns-footer-col h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--juns-space-md);
    position: relative;
    padding-bottom: var(--juns-space-sm);
}

.juns-footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--juns-primary);
    border-radius: 1px;
}

.juns-footer-about {
    font-size: var(--juns-text-sm);
    line-height: var(--juns-leading-relaxed);
    color: var(--juns-gray-500);
    margin-bottom: var(--juns-space-md);
}

.juns-footer-social {
    display: flex;
    gap: var(--juns-space-sm);
    margin-top: var(--juns-space-md);
}

.juns-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--juns-gray-300);
    text-decoration: none;
    font-size: var(--juns-text-xs);
    transition: all var(--juns-transition-fast);
}

.juns-footer-social a:hover {
    background: var(--juns-primary);
    color: #fff;
}

.juns-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.juns-footer-col ul li {
    margin-bottom: 6px;
}

.juns-footer-col ul li a {
    color: var(--juns-gray-300);
    text-decoration: none;
    font-size: var(--juns-text-sm);
    transition: all var(--juns-transition-fast);
    display: inline-block;
    padding: 2px 0;
}

.juns-footer-col ul li a:hover {
    color: #fff;
    transform: translateX(4px);
}

.juns-footer-bottom {
    margin-top: var(--juns-space-2xl);
    padding: var(--juns-space-lg) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: var(--juns-text-xs);
    color: var(--juns-gray-500);
}

.juns-footer-bottom a {
    color: var(--juns-gray-300);
    text-decoration: none;
    transition: color var(--juns-transition-fast);
}

.juns-footer-bottom a:hover {
    color: #fff;
}

/* Hide old footer */
.copyright {
    display: none;
}

.copyright_link {
    display: none;
}

/* ==========================================
   10. TYPOGRAPHY
   ========================================== */
h1, .h1 { font-size: 2rem; font-weight: 800; line-height: 1.3; color: var(--juns-gray-900); }
h2, .h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.35; color: var(--juns-gray-900); }
h3, .h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.4; color: var(--juns-gray-900); }
h4, .h4 { font-size: 1.1rem; font-weight: 600; line-height: 1.45; color: var(--juns-gray-900); }

p {
    margin-bottom: var(--juns-space-md);
    line-height: var(--juns-leading-relaxed);
}

a {
    color: var(--juns-primary);
    transition: color var(--juns-transition-fast);
}

a:hover {
    color: var(--juns-primary-dark);
}

/* Code */
code {
    padding: 2px 6px;
    background: var(--juns-gray-100);
    color: var(--juns-primary-dark);
    border-radius: var(--juns-radius-sm);
    font-family: var(--juns-font-mono);
    font-size: 0.875em;
}

pre {
    padding: var(--juns-space-md);
    background: var(--juns-gray-100);
    border-radius: var(--juns-radius-md);
    overflow-x: auto;
}

pre code {
    padding: 0;
    background: transparent;
}

/* Blockquote */
blockquote {
    border-left: 4px solid var(--juns-primary);
    padding: var(--juns-space-sm) var(--juns-space-lg);
    margin: var(--juns-space-lg) 0;
    background: var(--juns-primary-light);
    border-radius: 0 var(--juns-radius-md) var(--juns-radius-md) 0;
    color: var(--juns-gray-700);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--juns-space-lg) 0;
    font-size: var(--juns-text-sm);
}

table th {
    background: var(--juns-gray-100);
    color: var(--juns-gray-900);
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
}

table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--juns-gray-100);
}

/* ==========================================
   11. ARTICLE CONTENT (Single Post)
   ========================================== */
.text, .reward, .copy-text, .relates, .user-text, .comment-text, .tags-text, .time-text {
    background: #fff;
    border-radius: var(--juns-radius-lg);
    box-shadow: var(--juns-shadow-sm);
    border: 1px solid var(--juns-gray-100);
}

.text {
    padding: var(--juns-space-xl);
}

.text img {
    max-width: 100%;
    height: auto;
    border-radius: var(--juns-radius-md);
    margin: var(--juns-space-lg) auto;
    display: block;
}

.title-article h1 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--juns-gray-900);
    text-align: left;
}

.title-article .title-msg {
    margin-left: 0;
}

.title-article .title-msg span {
    font-size: var(--juns-text-sm);
    color: var(--juns-gray-500);
}

/* Tags section */
.tags a {
    display: inline-block;
    padding: 3px 12px;
    background: var(--juns-gray-50);
    color: var(--juns-gray-700);
    border-radius: var(--juns-radius-full);
    font-size: var(--juns-text-xs);
    text-decoration: none;
    margin: 0 4px 6px 0;
    transition: all var(--juns-transition-fast);
    border: 1px solid var(--juns-gray-100);
}

.tags a:hover {
    background: var(--juns-primary);
    color: #fff;
    border-color: var(--juns-primary);
}

/* ==========================================
   12. FLOATING TOOLBAR
   ========================================== */
.rollbar {
    right: 20px;
    bottom: 80px;
}

.rollbar .rollbar-item {
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: #fff;
    border-radius: var(--juns-radius-md);
    box-shadow: var(--juns-shadow-md);
    margin-bottom: 8px;
    text-align: center;
    color: var(--juns-gray-700);
    transition: all var(--juns-transition-fast);
    cursor: pointer;
    border: 1px solid var(--juns-gray-100);
}

.rollbar .rollbar-item:hover {
    background: var(--juns-primary);
    color: #fff;
    border-color: var(--juns-primary);
    transform: translateY(-2px);
    box-shadow: var(--juns-shadow-lg);
}

/* ==========================================
   13. SEARCH OVERLAY
   ========================================== */
.search-main .search-wrap {
    background: #fff;
    border-radius: var(--juns-radius-xl);
    box-shadow: var(--juns-shadow-xl);
    max-width: 600px;
    margin: 15vh auto 0;
}

.search-main .searchbar input {
    height: 50px;
    border: none;
    border-bottom: 2px solid var(--juns-gray-100);
    font-size: 1rem;
    padding: 0 20px;
    border-radius: var(--juns-radius-lg) var(--juns-radius-lg) 0 0;
    background: #fff;
    color: var(--juns-gray-900);
    width: 100%;
    box-sizing: border-box;
}

.search-main .searchbar input:focus {
    outline: none;
    border-bottom-color: var(--juns-primary);
}

.search-main .searchbar button {
    height: 50px;
    background: var(--juns-primary);
    border: none;
    padding: 0 20px;
    border-radius: 0 0 var(--juns-radius-lg) var(--juns-radius-lg);
    cursor: pointer;
    transition: background var(--juns-transition-fast);
}

.search-main .searchbar button:hover {
    background: var(--juns-primary-dark);
}

/* ==========================================
   14. RESPONSIVE
   ========================================== */
/* Tablet: under 992px */
@media (max-width: 992px) {
    .layui-row.flex {
        flex-direction: column;
    }
    .layui-row.flex .layui-col-md9,
    .layui-row.flex .layui-col-md3 {
        width: 100% !important;
        flex: none;
        max-width: 100%;
    }
    .sidebar {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-top: var(--juns-space-xl);
        position: static;
    }
    .juns-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--juns-space-lg);
    }
}

/* Mobile: under 768px */
@media (max-width: 768px) {
    .layui-content {
        padding-top: 65px;
    }
    .layui-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .title-article.list-card {
        flex-direction: column;
    }
    .index-post-img-small {
        width: 100%;
    }
    .item-thumb-small {
        height: 180px;
    }
    .index-post-text-small {
        padding: var(--juns-space-md);
    }
    .qzdy_index__hot-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .layui-carousel .layui-carousel-item > div {
        height: 220px;
    }
    .juns-footer-grid {
        grid-template-columns: 1fr;
        gap: var(--juns-space-lg);
    }
    .text-muted.list-inline li:nth-child(3) {
        display: none;
    }
}

/* Small mobile: under 480px */
@media (max-width: 480px) {
    .item-thumb-small {
        height: 150px;
    }
    .index-post-text-small .text-ellipsis a {
        font-size: 1rem;
    }
    .layui-carousel .layui-carousel-item > div {
        height: 180px;
    }
    .page-navigator li a,
    .page-navigator li span {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
    .text {
        padding: var(--juns-space-md);
    }
}

/* ==========================================
   15. ANIMATIONS & UTILITIES
   ========================================== */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Lazy load fade */
img.lazyload,
img.lazyloading {
    opacity: 0;
    transition: opacity var(--juns-transition-normal);
}

img.lazyloaded {
    opacity: 1;
}

/* Selection */
::selection {
    background: var(--juns-primary);
    color: #fff;
}

/* Focus ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--juns-primary);
    outline-offset: 2px;
    border-radius: var(--juns-radius-sm);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--juns-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--juns-gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--juns-gray-500);
}

/* My-info sidebar card (overrides existing) */
.my-info {
    background: #fff;
    border-radius: var(--juns-radius-lg);
    box-shadow: var(--juns-shadow-sm);
    border: 1px solid var(--juns-gray-100);
    overflow: hidden;
}

.my-info .background {
    border-radius: var(--juns-radius-lg) var(--juns-radius-lg) 0 0;
}

.my-info .user-info .avatar img {
    border: 3px solid #fff;
    box-shadow: var(--juns-shadow-md);
}

.my-info .web-info li {
    color: var(--juns-gray-700);
    border-right: 1px solid var(--juns-gray-100);
}

.my-info .web-info li span {
    color: var(--juns-primary);
}

/* Component sidebar widgets */
.component_s {
    background: #fff;
    border-radius: var(--juns-radius-lg);
    padding: var(--juns-space-lg);
    margin-bottom: var(--juns-space-lg);
    box-shadow: var(--juns-shadow-sm);
    border: 1px solid var(--juns-gray-100);
}

.column {
    background: #fff;
    border-radius: var(--juns-radius-lg);
    padding: var(--juns-space-lg);
    margin-bottom: var(--juns-space-lg);
    box-shadow: var(--juns-shadow-sm);
    border: 1px solid var(--juns-gray-100);
}

.title-sidebar {
    font-weight: 700;
    color: var(--juns-gray-900);
    border-bottom: 2px solid var(--juns-gray-100);
}

/* Hide some mobile-only elements on desktop */
@media (min-width: 992px) {
    .layui-side {
        display: none !important;
    }
}

/* === MOBILE NAV FIX: Neutral colors instead of blue === */
@media (max-width: 991px) {
    .layui-side .layui-nav a,
    .layui-side .layui-nav .layui-nav-item a,
    .layui-side .layui-nav-tree .layui-nav-item a {
        color: var(--juns-gray-700) !important;
        background: transparent !important;
    }
    .layui-side .layui-nav .layui-nav-item.layui-this a,
    .layui-side .layui-nav .layui-nav-item a:hover {
        color: var(--juns-gray-900) !important;
        background: var(--juns-gray-100) !important;
    }
    .layui-side .layui-nav .layui-this::after {
        background: var(--juns-gray-600) !important;
    }
}
