:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-page: #cfd8e5;
    --border-color: #cbd5e1;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.12), 0 2px 6px -2px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 20px -4px rgba(0, 0, 0, 0.15), 0 6px 10px -4px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --max-width: 1200px;
    --sidebar-width: 320px;
    --header-bg: #ffffff;
    --header-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    --header-border: 1px solid #e2e8f0;
    --header-radius: 0 0 18px 18px;
    --header-padding-y: 14px;
    --logo-color: #1d4ed8;
    --logo-color-hover: #1e3a8a;
    --link-color: #4b5563;
    --link-hover: #1d4ed8;
    --toggle-bg: #e5e7eb;
    --toggle-knob: #ffffff;
    --toggle-icon: #f59e0b;
    --code-bg: #f1f5f9;
    --card-bg: #ffffff;
}

/* 夜间模式变量 */
html.dark {
    --primary-color: #60a5fa;
    --primary-hover: #3b82f6;
    --secondary-color: #94a3b8;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-tertiary: #334155;
    --bg-page: #0b1320;
    --border-color: #475569;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.5), 0 2px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 20px -4px rgba(0, 0, 0, 0.5), 0 6px 10px -4px rgba(0, 0, 0, 0.3);
    --header-bg: #1e293b;
    --header-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
    --header-border: 1px solid #334155;
    --logo-color: #60a5fa;
    --logo-color-hover: #93c5fd;
    --link-color: #cbd5e1;
    --link-hover: #60a5fa;
    --toggle-bg: #475569;
    --toggle-knob: #1e293b;
    --toggle-icon: #cbd5e1;
    --code-bg: #334155;
    --card-bg: #1e293b;
    color-scheme: dark;
}

html.dark body {
    background-color: var(--bg-page);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-page);
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

#header {
    background: var(--header-bg);
    border-bottom: var(--header-border);
    border-radius: var(--header-radius);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--header-shadow);
    margin: 0;
    transition: background-color 0.3s, border-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
    padding: 0 16px;
}

.blog-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: row;
}

#blogname {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.3px;
    position: relative;
    overflow: hidden;
}

#blogname a {
    color: var(--logo-color);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
}

#blogname a:hover {
    color: var(--logo-color-hover);
}

#blogname .blog-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    vertical-align: middle;
    margin-right: 6px;
    background: var(--bg-tertiary);
    transition: transform 0.3s, border-color 0.3s;
}

#blogname .blog-logo-image {
    max-width: 180px;
    max-height: 36px;
    width: auto;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
}

#blogname .blog-text-logo {
    display: inline-block;
    color: var(--logo-color);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

#blogname.logo-shine a::after {
    content: "";
    position: absolute;
    top: -45%;
    left: -85%;
    width: 42%;
    height: 190%;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.18) 35%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0.18) 65%, transparent 100%);
    transform: skewX(-24deg);
    opacity: 0;
}

#blogname.logo-shine a:hover::after {
    animation: cnlmLogoShine 0.85s ease forwards;
}

@keyframes cnlmLogoShine {
    0% {
        left: -85%;
        opacity: 0;
    }
    18% {
        opacity: 1;
    }
    100% {
        left: 125%;
        opacity: 0;
    }
}

#blogname a:hover .blog-avatar {
    transform: rotate(8deg) scale(1.05);
    border-color: var(--primary-color);
}

#blogdescription {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
    display: none;
}

#nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

#nav a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    padding: 4px 0;
}

#nav a:hover,
#nav a.active {
    color: var(--link-hover);
}

#nav a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 2px;
    background: var(--link-hover);
    border-radius: 2px;
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 0;
    margin: -10px 0;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-dropdown-arrow {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown.active > .nav-dropdown-toggle {
    color: var(--link-hover);
}

.nav-dropdown.active > .nav-dropdown-toggle::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 2px;
    background: var(--link-hover);
    border-radius: 2px;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 132px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 12px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 1200;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    left: -10px;
    right: -10px;
    top: 100%;
    height: 10px;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.96);
    border-left: 1px solid rgba(226, 232, 240, 0.95);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    transform: translateX(-50%) rotate(45deg);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 8px 10px !important;
    border-radius: 9px;
    white-space: nowrap;
}

.nav-dropdown-menu a::after {
    display: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    color: var(--link-hover);
    background: rgba(59, 130, 246, 0.1);
}

html.dark .nav-dropdown-menu,
html.dark .nav-dropdown-menu::before {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(71, 85, 105, 0.9);
}

#nav .search-toggle,
#search-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--toggle-bg);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    color: var(--link-color);
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s, transform 0.2s, border-color 0.3s;
    flex-shrink: 0;
    padding: 0;
}

#nav .search-toggle:hover,
#search-toggle:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: scale(1.08);
}

#search-toggle svg {
    width: 16px;
    height: 16px;
}

html.dark #search-toggle {
    background: #475569;
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.15);
}

html.dark #search-toggle:hover {
    background: #cbd5e1;
    color: #1e293b;
    border-color: #cbd5e1;
}

#nav svg { width: 14px; height: 14px; }
#nav button, #nav a.btn, #nav a.button, #nav a[class*="btn"] {
    font-size: 13px;
    padding: 4px 10px;
    height: auto;
    min-height: unset;
}

/* 夜间模式开关 —— 简化版图标按钮 */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--toggle-bg);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    outline: none;
    position: relative;
    color: #334155;
    transition: background-color 0.3s, color 0.3s, transform 0.2s, border-color 0.3s;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: scale(1.08);
}

.theme-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.theme-toggle__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* 浅色模式：显示月亮图标（点击进入深色） */
.theme-toggle__icon--sun { display: none; }
.theme-toggle__icon--moon { display: inline-flex; }

/* 深色模式：显示太阳图标（点击返回浅色） */
html.dark .theme-toggle {
    background: #334155;
    color: #fbbf24;
    border-color: rgba(255, 255, 255, 0.15);
}

html.dark .theme-toggle:hover {
    background: #fbbf24;
    color: #1e293b;
    border-color: #fbbf24;
}

html.dark .theme-toggle__icon--sun { display: inline-flex; }
html.dark .theme-toggle__icon--moon { display: none; }

/* 旧 knob 元素（模板中遗留，不再显示） */
.theme-toggle__knob { display: none; }

html.dark .side {
    border-color: #334155;
}

html.dark .side-post a,
html.dark .side-category a,
html.dark .side-link a,
html.dark .side-archive a {
    color: var(--text-secondary);
}

html.dark .side-post a:hover,
html.dark .side-category a:hover,
html.dark .side-link a:hover,
html.dark .side-archive a:hover {
    color: var(--primary-color);
}

html.dark .side-post li,
html.dark .side-category li,
html.dark .side-link li,
html.dark .side-archive li {
    border-bottom-color: #334155;
}

html.dark .post-views,
html.dark .post-author {
    color: var(--text-light);
}

html.dark .item-chip,
html.dark .tag-item {
    background: #334155;
    color: var(--text-secondary);
}

html.dark .item-chip:hover,
html.dark .tag-item:hover {
    background: var(--primary-color);
    color: #fff;
}

html.dark .widget-icon {
    color: var(--primary-color);
}

html.dark .search-form input {
    background: #334155;
    border-color: #475569;
    color: var(--text-primary);
}

html.dark .search-form input:focus {
    border-color: var(--primary-color);
}

html.dark .blogger-card .blogger-avatar {
    border-color: #1e293b;
}

.mobile-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mobile-menu-toggle {
    display: none;
    background: var(--toggle-bg, #e5e7eb);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}

.mobile-menu-toggle:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.hamburger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 18px;
    height: 14px;
    color: var(--text-primary, #1e293b);
}

.hamburger-icon span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease, top 0.3s ease, opacity 0.2s ease;
}

.hamburger-icon span:nth-child(1) { top: 0; }
.hamburger-icon span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-icon span:nth-child(3) { top: auto; bottom: 0; }

.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) rotate(-45deg);
}

html.dark .mobile-menu-toggle {
    background: #334155;
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

html.dark .mobile-menu-toggle:hover {
    background: #475569;
}

#main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 10px 20px;
}

#content {
    display: flex;
    gap: 10px;
}

#loglist {
    flex: 1;
}

.featured-section {
    margin-bottom: 5px;
}

.featured-carousel {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    padding: 8px;
}

.featured-carousel-inner {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    height: 300px;
}

.featured-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s;
}

.featured-item:hover {
    transform: translateY(-2px);
}

.featured-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.featured-item:hover img {
    transform: scale(1.08);
}

.featured-item.featured-main {
    grid-row: span 2;
}

.featured-main-slider {
    position: relative;
}

.featured-main-slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 0, 0);
    filter: none;
    transition: opacity 0.55s ease, visibility 0.55s ease, transform 0.55s ease, filter 0.55s ease;
}

.featured-main-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.featured-main-slide.effect-zoom {
    animation: mainSlideZoom 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.featured-main-slide.effect-slide-left {
    animation: mainSlideLeft 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.featured-main-slide.effect-slide-up {
    animation: mainSlideUp 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.featured-main-slide.effect-blur {
    animation: mainSlideBlur 0.78s ease;
}

.featured-main-slide.effect-tilt {
    animation: mainSlideTilt 0.78s cubic-bezier(0.22, 1, 0.36, 1);
}

.featured-main-slide.active img {
    animation: mainSlideImageDrift 5.6s ease-out both;
}

.featured-main-slider .featured-overlay {
    top: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 22px 28px 26px;
    text-align: center;
    background:
        radial-gradient(circle at center, rgba(59, 130, 246, 0.2), transparent 34%),
        linear-gradient(to top, rgba(8, 14, 26, 0.5) 0%, rgba(8, 14, 26, 0.2) 52%, rgba(8, 14, 26, 0.12) 100%);
}

.featured-main-slider .featured-title {
    display: inline-block;
    width: auto;
    max-width: min(82%, 620px);
    margin-top: 0;
    padding: 10px 18px 11px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.18));
    backdrop-filter: blur(8px);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.4px;
    line-height: 1.25;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.65),
        0 0 18px rgba(96, 165, 250, 0.45);
    -webkit-line-clamp: 2;
    animation: mainTitlePop 0.62s ease both;
}

@keyframes mainSlideZoom {
    from { opacity: 0; transform: scale(1.08); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes mainSlideLeft {
    from { opacity: 0; transform: translateX(46px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes mainSlideUp {
    from { opacity: 0; transform: translateY(38px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes mainSlideBlur {
    from { opacity: 0; filter: blur(10px); transform: scale(1.035); }
    to { opacity: 1; filter: blur(0); transform: scale(1); }
}

@keyframes mainSlideTilt {
    from { opacity: 0; transform: perspective(900px) rotateY(-8deg) scale(1.04); }
    to { opacity: 1; transform: perspective(900px) rotateY(0) scale(1); }
}

@keyframes mainSlideImageDrift {
    from { transform: scale(1.03); }
    to { transform: scale(1.1); }
}

@keyframes mainTitlePop {
    from { opacity: 0; transform: translateY(16px); filter: blur(4px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.featured-item.featured-sub {
    height: 100%;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    color: white;
    pointer-events: none;
}

.featured-overlay .featured-title {
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-overlay .featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px 4px 9px;
    background: linear-gradient(135deg, #fff7ad 0%, #facc15 28%, #f97316 68%, #ef4444 100%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.3px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(120, 53, 15, 0.45);
    box-shadow:
        0 6px 14px rgba(249, 115, 22, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    position: relative;
    overflow: hidden;
}

.featured-overlay .featured-badge::before {
    content: '★';
    font-size: 10px;
    line-height: 1;
    color: #fffbea;
    text-shadow: 0 1px 2px rgba(120, 53, 15, 0.35);
}

.featured-overlay .featured-badge::after {
    content: '';
    position: absolute;
    inset: 1px 2px auto 2px;
    height: 45%;
    border-radius: 999px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.featured-sub .featured-overlay {
    padding: 12px 14px;
}

.featured-sub .featured-overlay .featured-title {
    font-size: 13px;
    font-weight: 500;
    margin-top: 6px;
}

.featured-sub .featured-overlay .featured-badge {
    font-size: 10px;
    padding: 4px 9px 4px 8px;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, opacity 0.3s;
    z-index: 10;
    opacity: 0;
}

.featured-carousel:hover .carousel-prev,
.featured-carousel:hover .carousel-next {
    opacity: 1;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: 22px;
}

.carousel-next {
    right: 22px;
}

.featured-main-only-carousel .carousel-next {
    right: calc(33.333% + 22px);
}

.carousel-prev svg,
.carousel-next svg {
    width: 18px;
    height: 18px;
}

.carousel-indicators {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s, transform 0.3s, width 0.3s;
}

.indicator-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.indicator-dot.active {
    background: white;
    width: 22px;
    border-radius: 4px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

.section-title-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-left: 10px;
}

.section-title-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.section-title-dots span:nth-child(1) {
    background: #ef4444;
}

.section-title-dots span:nth-child(2) {
    background: #f59e0b;
}

.section-title-dots span:nth-child(3) {
    background: #10b981;
}

.loglist-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.loglist-header {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.loglist-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--bg-secondary);
}

.loglist-header .section-title {
    margin-bottom: 0;
}

.loglist-header .section-title span:first-child {
    color: var(--text-primary);
    font-weight: 700;
}

.loglist-header .section-title-dots span {
    width: 6px;
    height: 6px;
}

.loglist-header .section-title-dots span:nth-child(1) {
    background: #ef4444;
}

.loglist-header .section-title-dots span:nth-child(2) {
    background: #f59e0b;
}

.loglist-header .section-title-dots span:nth-child(3) {
    background: #10b981;
}

.loglist-header .section-title::after {
    display: none;
}

.loglist-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.log-item {
    display: flex;
    align-items: stretch;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    min-height: 140px;
}

.log-item:hover {
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.log-item-wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    gap: 14px;
}

.log-thumbnail {
    flex-shrink: 0;
    width: 160px;
    height: 120px;
    overflow: hidden;
    position: relative;
    border-radius: 6px;
    background: var(--bg-primary);
    align-self: center;
}

.log-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.log-thumbnail a::after {
    content: "";
    position: absolute;
    top: -35%;
    left: -80%;
    width: 45%;
    height: 170%;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.16) 35%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0.16) 65%, transparent 100%);
    transform: skewX(-24deg);
    opacity: 0;
    z-index: 2;
}

.log-thumbnail:hover a::after {
    animation: cnlmCoverShine 0.75s ease forwards;
}

.log-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.log-thumbnail:hover img {
    transform: scale(1.04);
}

@keyframes cnlmCoverShine {
    0% {
        left: -80%;
        opacity: 0;
    }
    18% {
        opacity: 1;
    }
    100% {
        left: 125%;
        opacity: 0;
    }
}

.log-content-area {
    flex: 1;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.loglist-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loglist-title a {
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.3;
}

.loglist-title a:hover {
    color: var(--primary-color);
}

.loglist-title .external-icon {
    width: 13px;
    height: 13px;
    opacity: 0;
    transition: opacity 0.3s;
    color: var(--text-light);
    flex-shrink: 0;
}

.log-item:hover .loglist-title .external-icon {
    opacity: 1;
}

.new-badge,
.top-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    margin-left: 4px;
    flex-shrink: 0;
}

.new-badge {
    background: #ef4444;
    color: white;
}

.top-badge {
    background: var(--primary-color);
    color: white;
}

.loglist-content {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.loglist-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
    flex-wrap: wrap;
    line-height: 1.4;
    margin-top: auto;
}

.loglist-info span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.loglist-info a {
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 3px;
}

.loglist-info a:hover {
    color: var(--primary-color);
}

.loglist-info .separator {
    color: var(--border-color);
}

.view-icon,
.comment-icon {
    font-size: 14px;
}

.separator {
    color: var(--border-color);
}

.view-icon {
    margin-right: 2px;
}

#sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.side {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #ececec;
    overflow: hidden;
    word-break: break-word;
}

.side img,
.side iframe,
.side video,
.side embed,
.side object {
    max-width: 100%;
    height: auto;
}

.side table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.widget-icon {
    width: 16px;
    height: 16px;
    color: #5b8def;
    flex-shrink: 0;
}

.widget-dots {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.widget-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.widget-dot.green { background: #4ade80; }
.widget-dot.yellow { background: #facc15; }
.widget-dot.red { background: #f87171; }

.side h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.blogger {
    text-align: center;
}

.blogger-card {
    padding: 0;
    overflow: hidden;
}

.blogger-banner {
    height: 105px;
    overflow: hidden;
    background: #f5f5f5;
}

.blogger-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blogger-info {
    padding: 0 20px 6px;
    text-align: center;
}

.blogger-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: -36px;
    margin-bottom: 6px;
    border: 3px solid var(--bg-primary);
    background: var(--bg-primary);
}

.blogger-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    text-align: center;
}

.blogger-social {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 5px 0 10px;
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

.social-icon:hover {
    background: #e8f0fe;
    color: #3b82f6;
}

.blogger-stats {
    display: flex;
    padding: 6px 0;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-num {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
}

.stat-divider {
    width: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.search-widget {
    padding: 12px 16px;
}

.search-widget .search-form {
    display: flex;
    gap: 8px;
}

.search-widget .search-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
    height: auto;
    min-height: 0;
}

.search-widget .search-form input:focus {
    border-color: #3b82f6;
}

.search-widget .search-form button {
    padding: 8px 18px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
    flex-shrink: 0;
    height: auto;
    min-height: 0;
}

.search-widget .search-form button:hover {
    background: #2563eb;
}

.side-post,
.side-category,
.side-link,
.side-comment,
.side-archive {
    list-style: none;
}

.side-post li,
.side-category li,
.side-link li,
.side-archive li {
    margin-bottom: 0;
    padding: 8px 0;
    border-bottom: 1px dashed #ececec;
    font-size: 13px;
}

.side-post li:last-child,
.side-category li:last-child,
.side-link li:last-child,
.side-archive li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.side-post li:first-child,
.side-category li:first-child,
.side-link li:first-child,
.side-archive li:first-child {
    padding-top: 0;
}

.side-post a,
.side-category a,
.side-link a,
.side-archive a {
    color: #444;
    text-decoration: none;
    font-size: 13px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s, padding-left 0.2s;
}

.side-post a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.side-post a .post-title-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-post a:hover,
.side-category a:hover,
.side-link a:hover,
.side-archive a:hover {
    color: #3b82f6;
    padding-left: 4px;
}

.post-views {
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.post-author {
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}

.item-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.item-chip {
    padding: 5px 14px;
    background: #f0f4f8;
    border-radius: 4px;
    font-size: 12px;
    color: #444;
    text-decoration: none;
    transition: all 0.2s;
}

.item-chip:hover {
    background: #3b82f6;
    color: white;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 5px 14px;
    background: #f0f4f8;
    border-radius: 4px;
    font-size: 12px;
    color: #444;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-item:hover {
    background: #3b82f6;
    color: white;
}

.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.comment-item:first-child {
    padding-top: 2px;
}

.comment-item:last-child {
    border-bottom: none;
    padding-bottom: 2px;
}

.side-comment li:hover .comment-item {
    background-color: transparent;
}

.comment-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comment-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px;
    align-items: center;
    gap: 6px;
    width: 100%;
    overflow: hidden;
}

.comment-meta-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

.comment-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 38%;
    line-height: 18px;
}

.comment-name::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary-color, #3b82f6);
    vertical-align: middle;
    margin-right: 6px;
    margin-top: -2px;
}

.comment-time {
    font-size: 11px;
    color: #b0b0b0;
    font-weight: 400;
    white-space: nowrap;
    width: 64px;
    overflow: hidden;
    text-align: right;
    line-height: 18px;
}

.comment-content {
    display: block;
    font-size: 12.5px;
    color: var(--text-light, #666);
    line-height: 1.55;
    text-decoration: none;
    word-break: break-word;
    transition: color 0.2s ease;
}

.comment-content:hover {
    color: var(--primary-color, #3b82f6);
}

.comment-source {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    color: #aaa;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    transition: color 0.2s ease;
    padding-left: 7px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    line-height: 18px;
}

.comment-source span {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-source:hover {
    color: var(--primary-color, #3b82f6);
}

#footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 15px 0;
    margin-top: 10px;
}

#footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: var(--text-light);
}

#footer a {
    color: var(--text-light);
    text-decoration: none;
}

#footer a:hover {
    color: var(--primary-color);
}

.page-navigator {
    text-align: center;
    margin-top: 30px;
}

.page-navigator a {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 4px;
    transition: all 0.2s;
}

.page-navigator .current {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    color: white;
    margin: 0 4px;
    font-weight: 500;
}

.page-navigator a:hover,
.page-navigator a.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.category-notice,
.tag-notice {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 1px;
    font-size: 14px;
}

.category-name,
.tag-name {
    color: var(--primary-color);
    font-weight: 500;
}

.article-count {
    margin-left: 10px;
    color: var(--text-light);
}

/* ===== 搜索结果页 ===== */
.search-breadcrumb {
    margin-bottom: 8px;
}

.search-notice-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 1px; /* 与卡片层次感保持一致 */
}

.search-notice-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
}

.search-notice-text {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.search-notice-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: var(--bg-tertiary);
    border-radius: 999px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}

.search-notice-keyword {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 15px;
}

.search-notice-count {
    color: var(--text-light);
}

.search-notice-count strong {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0 2px;
}

.search-result-form {
    margin-top: 12px;
    display: flex;
    gap: 0;
    align-items: stretch;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.search-result-form input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.search-result-form input[type="text"]::placeholder {
    color: var(--text-light);
}

.search-result-form button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.search-result-form button:hover {
    opacity: 0.9;
}

/* 关键词高亮 */
.search-highlight {
    background: linear-gradient(120deg, rgba(52, 152, 219, 0.18), rgba(52, 152, 219, 0.08));
    color: var(--primary-color);
    padding: 0 4px;
    border-radius: 3px;
    font-weight: 600;
}

.search-loglist-card {
    margin-top: 1px;
}

.search-empty-summary {
    color: var(--text-light);
    font-style: italic;
}

/* 无结果卡片 */
.search-empty-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 60px 24px;
    text-align: center;
}

.search-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-light);
    margin-bottom: 20px;
}

.search-empty-title {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.search-empty-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 22px;
}

.search-empty-actions {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.search-btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--primary-color);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    transition: opacity 0.2s;
}

.search-btn-link:hover {
    opacity: 0.9;
}

.search-btn-link.search-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* 暗色模式 —— 搜索页样式自动继承变量；对以下特殊元素做少量补偿 */
html.dark .search-highlight {
    background: linear-gradient(120deg, rgba(52, 152, 219, 0.30), rgba(52, 152, 219, 0.15));
}

/* 响应式 */
@media (max-width: 768px) {
    .search-notice-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .search-result-form {
        flex-direction: row;
    }
    .search-result-form button {
        padding: 8px 12px;
    }
}

.no-posts-card {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
}

.no-posts-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.no-posts-card p {
    color: var(--text-light);
}

.friend-links-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin: 5px auto 10px;
    max-width: 1200px;
    padding: 0 15px;
}

.friend-links-header {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.friend-links-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.friend-links-icon {
    width: 16px;
    height: 16px;
    color: #3b82f6;
}

.friend-links-body {
    padding: 12px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.friend-links-body a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.friend-links-body a:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

@media (max-width: 992px) {
    #content {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
    }

    .featured-carousel {
        padding: 6px;
    }

    .featured-carousel-inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
    }

    .featured-item.featured-main {
        grid-row: span 1;
        height: 220px;
    }

    .featured-item.featured-sub {
        height: 160px;
    }

    .carousel-prev,
    .carousel-next {
        width: 34px;
        height: 34px;
        opacity: 1;
    }

    .carousel-prev {
        left: 14px;
    }

    .carousel-next {
        right: 14px;
    }

    .carousel-prev svg,
    .carousel-next svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 768px) {
    #nav {
        display: none;
    }

    #sidebar {
        display: none !important;
    }

    .featured-section,
    .featured-carousel {
        display: none !important;
    }

    #content {
        display: block;
        gap: 0;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    #header .container {
        height: 56px;
        gap: 8px;
    }

    .blog-info {
        gap: 6px;
    }

    #blogname {
        font-size: 16px;
    }

    #blogname .blog-avatar {
        width: 28px;
        height: 28px;
    }

    .log-item-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .log-thumbnail {
        width: 100%;
        height: 140px;
    }

    .log-content-area {
        padding: 0;
    }

    .log-item {
        padding: 12px;
        gap: 10px;
    }

    .loglist-title {
        font-size: 15px;
    }

    .loglist-content {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .loglist-info {
        font-size: 11px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    #main {
        padding: 8px 12px;
    }

    #header .container {
        padding: 0 12px;
    }

    .log-item {
        padding: 12px;
    }

    .featured-item.featured-sub {
        height: 160px;
    }

    .blog-info #blog-description,
    #blogdescription {
        display: none;
    }
}

/* ========================================================
   文章详情页 (Article Detail Page)
   ======================================================== */

.article-detail {
    flex: 1;
    max-width: 100%;
    display: block;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    margin-bottom: 1px;
}
.article-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}
.article-breadcrumb a:hover { color: var(--primary-color); }
.article-breadcrumb .breadcrumb-sep {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1;
    opacity: 0.6;
}
.article-breadcrumb .breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.article-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 18px 40px 36px;
    box-shadow: var(--shadow-md);
    border: 1.5px solid var(--border-color);
    position: relative;
}
.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #8b5cf6);
    opacity: 0.9;
}

.article-header { margin-bottom: 18px; }
.article-title-wrap {
    margin-bottom: 20px;
    padding-bottom: 22px;
    border-bottom: 1.5px dashed var(--border-color);
}
.article-title-main {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}
.article-tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}
.article-tag-hot {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.article-author-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 0 0;
    flex-wrap: wrap;
}
.author-avatar-col { flex-shrink: 0; }
.author-avatar-big {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.author-info-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.author-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.author-display-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}
.author-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    font-weight: 500;
}
.author-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    transition: all 0.2s;
    text-decoration: none;
}
.meta-pill svg { flex-shrink: 0; }
.meta-pill-soft { background: rgba(100, 116, 139, 0.08); }
.meta-pill-link:hover {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-color);
}
.author-actions-col { flex-shrink: 0; }
.btn-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-mini:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.08);
}
.btn-mini-edit { color: var(--primary-color); }

.article-cover {
    margin: 24px 0 10px;
    padding: 0;
    text-align: center;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.article-cover img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: block;
    margin: 0 auto;
}

.article-body {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text-primary);
    margin: 24px 0 10px;
    padding: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    margin: 28px 0 14px;
    line-height: 1.5;
    font-weight: 700;
    color: var(--text-primary);
}
.article-body h1 { font-size: 22px; }
.article-body h2 { font-size: 20px; }
.article-body h3 { font-size: 18px; }
.article-body h4 { font-size: 16px; }
.article-body p {
    margin: 0 0 16px;
    text-align: justify;
}
.article-body a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dashed rgba(59, 130, 246, 0.3);
    transition: all 0.2s;
}
.article-body a:hover {
    color: #2563eb;
    border-bottom-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.04);
    padding: 1px 2px;
    border-radius: 3px;
}
.article-body ul,
.article-body ol {
    margin: 0 0 16px;
    padding-left: 28px;
}
.article-body li {
    margin-bottom: 6px;
    line-height: 1.8;
}
.article-body blockquote {
    margin: 20px 0;
    padding: 14px 20px 14px 18px;
    background: linear-gradient(90deg, rgba(59,130,246,0.08), rgba(59,130,246,0.02));
    border-left: 4px solid var(--primary-color);
    border-radius: 0 6px 6px 0;
    color: var(--text-secondary);
    font-style: italic;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body code {
    font-family: Consolas, Monaco, "Courier New", monospace;
    background: var(--bg-tertiary);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 13.5px;
    color: #e11d48;
    word-break: break-all;
}
html.dark .article-body code { color: #fb7185; }
.article-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 18px 22px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 20px 0;
    font-size: 13px;
    line-height: 1.7;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.article-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
    word-break: normal;
}
.article-inline-image,
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 16px auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.article-body hr {
    border: none;
    border-top: 1px dashed var(--border-color);
    margin: 28px 0;
}
.article-body strong,
.article-body b { font-weight: 700; color: var(--text-primary); }
.article-body em,
.article-body i { font-style: italic; color: var(--text-secondary); }
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14px;
}
.article-body th,
.article-body td {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    text-align: left;
}
.article-body th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}
.article-body tr:nth-child(even) td {
    background: var(--bg-secondary);
}

.article-tags-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0 16px;
    margin: 24px 0 0;
    border-top: 1.5px dashed var(--border-color);
    flex-wrap: wrap;
}
.tags-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}
.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 12.5px;
    background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(99,102,241,0.08));
    color: var(--primary-color);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(59, 130, 246, 0.15);
}
.tag-chip:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.25);
}

.article-reactions-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 0 8px;
    flex-wrap: wrap;
}
.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
}
.reaction-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.18);
}
.reaction-btn.active {
    background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(251,113,133,0.12));
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.2);
}
.reaction-btn:nth-child(2).active {
    background: linear-gradient(135deg, rgba(251,146,60,0.14), rgba(251,191,36,0.14));
    border-color: #f59e0b;
    color: #f59e0b;
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.22);
}
.reaction-btn:active {
    transform: scale(0.97);
}
.reaction-btn svg {
    transition: transform 0.3s ease;
}
.reaction-btn:hover svg { transform: scale(1.1) rotate(-6deg); }
.reaction-btn.active svg { transform: scale(1.15); }
html.dark .reaction-btn { color: var(--text-secondary); }
html.dark .reaction-btn:hover { color: var(--primary-color); }
html.dark .reaction-btn.active { color: #ef4444; }
html.dark .reaction-btn:nth-child(2).active { color: #f59e0b; }
.reaction-count {
    font-weight: 700;
    font-size: 14px;
    min-width: 18px;
    text-align: center;
}

.share-group {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.share-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.share-chip:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.25);
}

.article-footer-info {
    margin-top: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    border: 1.5px dashed var(--border-color);
    box-shadow: var(--shadow-sm);
}
.footer-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.footer-info-item a {
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-all;
}
.footer-info-item a:hover { text-decoration: underline; }

.article-nav-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.article-nav-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    box-shadow: var(--shadow-sm);
}
.article-nav-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.1);
}
.article-nav-item.nav-prev { text-align: left; }
.article-nav-item.nav-next { text-align: right; }
.article-nav-item.nav-prev:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.12);
}
.article-nav-item.article-nav-empty {
    background: transparent;
    border: 1px dashed var(--border-color);
    box-shadow: none;
    cursor: default;
}
.nav-direction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}
.nav-title-text {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ========================================================
   评论区 (Comments Section)
   ======================================================== */
.comments-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    box-shadow: var(--shadow-md);
    border: 1.5px solid var(--border-color);
    position: relative;
}
.comments-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1px;
    right: 1px;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, var(--primary-color));
    border-radius: 0 0 3px 3px;
    opacity: 0.6;
}
.comments-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1.5px dashed var(--border-color);
}
.comments-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.comments-title svg { color: var(--primary-color); flex-shrink: 0; }
.comments-count-badge {
    display: inline-block;
    min-width: 28px;
    padding: 2px 10px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.login-required-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px dashed #f59e0b;
    border-radius: var(--radius-md);
    color: #92400e;
    font-size: 14px;
    text-align: center;
    justify-content: center;
}
html.dark .login-required-box {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.08);
}
.link-primary {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}
.link-primary:hover { text-decoration: underline; }

.comment-form-area {
    margin-bottom: 28px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.comment-form-main { display: flex; flex-direction: column; gap: 12px; }
.comment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}
.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}
.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.comment-form-hint {
    font-size: 12px;
    color: var(--text-light);
}
.btn-primary-comment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary-comment:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}
.btn-primary-comment:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.comment-list-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.no-comments-yet {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}
.no-comments-yet svg { margin-bottom: 8px; opacity: 0.5; }
.no-comments-yet p { margin: 4px 0 0; font-size: 14px; }

.comment-row {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    transition: all 0.2s;
}
.comment-row:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}
.comment-row.comment-row-reply {
    margin-left: 50px;
    margin-top: -10px;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.03);
    border-left: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
}

.comment-row.comment-row-reply .comment-avatar-img {
    width: 32px;
    height: 32px;
}
.comment-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-primary);
}
.comment-body { flex: 1; min-width: 0; }
.comment-body-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 12.5px;
    flex-wrap: wrap;
}
.comment-user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13.5px;
}
.comment-at-tag {
    color: var(--text-secondary);
    font-size: 12px;
}
.comment-at-tag a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.comment-date-tag { color: var(--text-light); font-size: 12px; }
.comment-reply-tag,
.comment-delete-tag,
.comment-report-btn {
    color: var(--text-light);
    text-decoration: none;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background: transparent;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px dashed transparent;
    margin-left: auto;
}
.comment-delete-tag { margin-left: 0; color: #ef4444; }
.comment-report-btn { margin-left: 0; color: #f59e0b; }
.comment-reply-tag:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}
.comment-delete-tag:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}
.comment-report-btn:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}
.comment-body-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    word-break: break-word;
    white-space: pre-wrap;
}

.comment-pagination-area {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
    flex-wrap: wrap;
    justify-content: center;
}
.page-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 17px;
    text-decoration: none;
    transition: all 0.2s;
}
.page-chip:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: white;
}
html.dark .page-chip:hover { background: rgba(59, 130, 246, 0.1); }
.page-chip-active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
.page-chip-dots {
    background: transparent;
    border-color: transparent;
    color: var(--text-light);
    padding: 0 4px;
    min-width: auto;
}
.page-chip-total {
    margin-left: 10px;
    padding-left: 14px;
    border-left: 1px solid var(--border-color);
    background: transparent;
    border-top: none;
    border-bottom: none;
    border-right: none;
    border-radius: 0;
    color: var(--text-light);
    font-size: 12px;
}

.article-not-found {
    padding: 60px 40px;
    text-align: center;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}
.article-not-found p {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

@media (max-width: 900px) {
    .article-card,
    .comments-card { padding: 24px 20px; }
    .article-title-main { font-size: 22px; }
    .article-nav-wrap { grid-template-columns: 1fr; }
    .article-nav-item.nav-next { text-align: left; }
    .comment-form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    #main { padding: 10px; }
    .article-breadcrumb { font-size: 12px; padding: 8px 14px; }
    .article-breadcrumb .breadcrumb-current { max-width: 200px; }
    .article-card,
    .comments-card { padding: 20px 16px; border-radius: var(--radius-md); }
    .article-title-main { font-size: 20px; gap: 8px; }
    .article-author-bar { gap: 12px; }
    .author-avatar-big { width: 44px; height: 44px; }
    .author-meta-row { gap: 6px; }
    .meta-pill { padding: 3px 8px; font-size: 11.5px; }
    .article-body { font-size: 14px; }
    .article-reactions-row { gap: 10px; justify-content: center; }
    .reaction-card { padding: 10px 16px; gap: 8px; }
    .reaction-icon { width: 28px; height: 28px; }
    .reaction-number { font-size: 14px; }
    .share-group { margin-left: 0; width: 100%; justify-content: center; }
    .share-chip { width: 38px; height: 38px; }
    .share-chip svg { width: 14px; height: 14px; }
    .article-footer-info { font-size: 12px; padding: 12px 14px; }
    .comment-form-area { padding: 14px; }
    .comment-row { padding: 12px; gap: 10px; }
    .comment-row.comment-row-reply { margin-left: 20px; }
    .comment-avatar-img { width: 34px; height: 34px; }
    .comments-title { font-size: 16px; }
    .page-chip-total {
        margin-left: 0; padding-left: 0; border-left: none;
        width: 100%; text-align: center;
    }
}

@keyframes toastFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ========================================================
   内联回复框 (Inline Reply Form)
   ======================================================== */

.reply-form-area {
    margin-top: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(99, 102, 241, 0.03));
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    border-top: 1px dashed rgba(59, 130, 246, 0.15);
    border-right: 1px dashed rgba(59, 130, 246, 0.1);
    border-bottom: 1px dashed rgba(59, 130, 246, 0.1);
    animation: replyBoxSlideDown 0.25s ease-out;
}

html.dark .reply-form-area {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(99, 102, 241, 0.08));
    border-left-color: var(--primary-color);
}

@keyframes replyBoxSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

.reply-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reply-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.reply-form .form-input,
.reply-form .form-textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 13.5px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
}

.reply-form .form-input:focus,
.reply-form .form-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.reply-form .form-textarea {
    resize: vertical;
    min-height: 72px;
    line-height: 1.6;
}

.reply-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.reply-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

.reply-btns .btn-mini {
    padding: 7px 16px;
    font-size: 13px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.reply-btns .btn-mini:hover {
    color: var(--text-primary);
    border-color: var(--text-light);
    background: var(--bg-primary);
}

.reply-btns .btn-primary-comment {
    padding: 7px 18px;
    font-size: 13px;
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.reply-btns .btn-primary-comment:hover:not(:disabled) {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.reply-btns .btn-primary-comment:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 评论项本身，hover 高亮更明显 */
.comment-row {
    transition: background 0.2s, border-color 0.2s;
}

.comment-row:hover {
    background: rgba(59, 130, 246, 0.025);
}

/* 响应式：移动端 */
@media (max-width: 640px) {
    .reply-form-row {
        grid-template-columns: 1fr;
    }
    .reply-form-area {
        padding: 12px 14px;
    }
    .reply-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .reply-btns {
        justify-content: flex-end;
    }
}

/* 页面主背景色 — 强制生效，防止被其他样式覆盖 */
body {
    background-color: var(--bg-page) !important;
}

/* ===== 全站列表项：渐显 + 上升 动画 ===== */
@keyframes cnlmListItemRise {
    0%   { opacity: 0; transform: translateY(28px); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: translateY(0); }
}

/* JS 添加该类来启动动画：设置 animation-delay 实现逐条显现
   fill-mode: both → 延迟期间保持隐藏（0%关键帧），动画结束后保持显示（100%关键帧）
   动画结束后 JS 会自动移除该类，恢复 CSS hover 正常工作 */
.featured-section.list-animating,
.loglist-card.list-animating,
.log-item.list-animating,
#sidebar .side.list-animating,
.friend-links-card.list-animating,
.article-card.list-animating,
.comments-card.list-animating,
.profile-header-card.list-animating,
.profile-content-card.list-animating {
    animation: cnlmListItemRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--cnlm-list-delay, 0ms);
    backface-visibility: hidden;
    will-change: transform, opacity;
}

/* 移动端动画加快 */
@media (max-width: 768px) {
    .featured-section.list-animating,
    .loglist-card.list-animating,
    .log-item.list-animating,
    #sidebar .side.list-animating,
    .friend-links-card.list-animating,
    .article-card.list-animating,
    .comments-card.list-animating,
    .profile-header-card.list-animating,
    .profile-content-card.list-animating {
        animation-duration: 0.45s;
    }
}
