/*
Theme Name: LangYuPro
Theme URI: https://example.com/langyupro
Author: LangYu
Author URI: https://example.com
Description: A clean starter WordPress theme structure following official handbook conventions.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: langyupro
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --langyu-primary: #111111;
    --langyu-primary-hover: #2b2b2b;
    --langyu-secondary: #666666;
    --langyu-text: #222222;
    --langyu-muted: #7a7a7a;
    --langyu-border: #d9d9d9;
    --langyu-soft-bg: #f5f5f5;
    --langyu-surface: #ffffff;
    --langyu-button-bg: #111111;
    --langyu-button-text: #ffffff;
}

/* ==========================================================================
   Tag Archive & Masonry Styles
   ========================================================================== */

.langyu-tag-header {
    position: relative;
    margin-bottom: 24px;
    padding: 40px 32px;
    background: var(--langyu-surface);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    justify-content: space-between;
}

.tag-header-right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--langyu-soft-bg);
    padding: 4px;
    border-radius: 20px;
    position: relative;
    z-index: 2;
}

.tag-action-btn {
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--langyu-muted);
    background: transparent;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tag-action-btn.active {
    background: var(--langyu-surface);
    color: var(--langyu-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tag-bg-hash {
    position: absolute;
    top: -30px;
    left: -10px;
    font-size: 160px;
    font-weight: 900;
    line-height: 1;
    color: var(--langyu-border);
    opacity: 0.3;
    pointer-events: none;
    font-family: Arial, sans-serif;
    z-index: 1;
}

.tag-header-content {
    position: relative;
    z-index: 2;
}

.tag-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: var(--langyu-text);
}

.tag-description {
    font-size: 14px;
    color: var(--langyu-muted);
}

.langyu-masonry-list {
    column-count: 4;
    column-gap: 20px;
    margin-bottom: 32px;
}

.langyu-masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    background: var(--langyu-surface);
    border-radius: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

.langyu-masonry-item:hover {
    transform: translateY(-4px);
}

.masonry-thumbnail a {
    display: block;
    width: 100%;
}

.masonry-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 0 !important;
}

.masonry-content {
    padding: 12px 8px;
}

.masonry-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.masonry-title a {
    color: var(--langyu-text);
    text-decoration: none;
    transition: color 0.2s;
}

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

.masonry-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--langyu-muted);
}

.masonry-author-link {
    display: flex;
    align-items: center;
    color: var(--langyu-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.masonry-author-link:hover {
    color: var(--langyu-text);
}

.masonry-avatar-wrapper {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.masonry-avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 0 !important;
}

.masonry-author-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.masonry-likes {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 1200px) {
    .langyu-masonry-list {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .langyu-masonry-list {
        column-count: 2;
        column-gap: 12px;
    }
    
    .langyu-masonry-item {
        margin-bottom: 12px;
    }
    
    .masonry-content {
        padding: 12px;
    }
    
    .masonry-title {
        font-size: 14px;
    }
}

/* ==========================================================================
   Theme Toggle
   ========================================================================== */
.langyu-theme-toggle-wrapper {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
}

.langyu-theme-toggle {
    position: relative;
    width: 64px;
    height: 32px;
    border-radius: 16px;
    background: #111;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    box-sizing: border-box;
    transition: background 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.langyu-theme-toggle .icon-sun,
.langyu-theme-toggle .icon-moon {
    width: 16px;
    height: 16px;
    z-index: 2;
    transition: all 0.3s ease;
}

.langyu-theme-toggle .icon-sun {
    color: #111;
    opacity: 1;
}

.langyu-theme-toggle .icon-moon {
    color: #fff;
    opacity: 1;
}

.langyu-theme-toggle .toggle-indicator {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 50%;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Dark Mode State */
html.is-dark-mode .langyu-theme-toggle {
    background: #111;
}

html.is-dark-mode .langyu-theme-toggle .toggle-indicator {
    transform: translateX(32px);
    background: #fff;
}

html.is-dark-mode .langyu-theme-toggle .icon-sun {
    color: #fff;
    opacity: 1;
}

html.is-dark-mode .langyu-theme-toggle .icon-moon {
    color: #111;
    opacity: 1;
}

/* ==========================================================================
   Header User Menu & Dropdown
   ========================================================================== */
.langyu-user-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.langyu-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.langyu-user-avatar-link .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.langyu-user-menu-wrapper:hover .langyu-header-avatar,
.langyu-user-menu-wrapper.is-active .langyu-header-avatar {
    border-color: var(--langyu-primary);
}

.langyu-user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: -10px;
    width: 200px;
    background: var(--langyu-surface);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.langyu-user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.langyu-user-dropdown-menu::after {
    content: '';
    position: absolute;
    top: -6px;
    right: 22px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #fff;
}

.langyu-user-menu-wrapper:hover .langyu-user-dropdown-menu,
.langyu-user-menu-wrapper.is-active .langyu-user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--langyu-border);
}

.dropdown-username {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--langyu-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.dropdown-list li {
    padding: 0;
}

.dropdown-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--langyu-muted);
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.dropdown-list a:hover {
    background: var(--langyu-soft-bg);
    color: var(--langyu-primary);
}

.dropdown-list a svg {
    color: var(--langyu-muted);
    transition: color 0.2s;
}

.dropdown-list a:hover svg {
    color: var(--langyu-primary);
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 0;
}

/* Mobile User Menu */
.langyu-mobile-user-profile {
    padding: 16px 0;
}

.mobile-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--langyu-border);
    margin-bottom: 8px;
}

.mobile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-username {
    font-size: 16px;
    font-weight: 600;
    color: var(--langyu-text);
}

.mobile-user-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-user-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--langyu-muted);
    font-size: 15px;
    text-decoration: none;
}

.mobile-user-menu a:active {
    background: var(--langyu-soft-bg);
}

.logout-link {
    color: #dc3545 !important;
}

.logout-link svg {
    color: #dc3545 !important;
}

/* ==========================================================================
   User Interactions (Like, Favorite, Follow)
   ========================================================================== */
.langyu-post-interactions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0;
}

.langyu-post-actions-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.interaction-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent !important;
    border-radius: 0;
    font-size: 14px;
    color: var(--langyu-muted);
    cursor: pointer;
    transition: color 0.24s ease, transform 0.24s ease, opacity 0.24s ease;
    outline: none;
}

.interaction-btn:hover {
    color: var(--langyu-primary);
    transform: translateY(-1px);
    background: transparent !important;
}

.interaction-btn:active {
    background: transparent !important;
}

.interaction-btn.active.action-like {
    color: #f53f3f;
    background: transparent !important;
}

.interaction-btn.active.action-favorite {
    color: #f7b500;
    background: transparent !important;
}

@keyframes langyu-icon-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.interaction-btn.is-animating svg {
    animation: langyu-icon-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.interaction-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.interaction-icon-btn svg {
    display: block;
    fill: none;
    stroke: currentColor;
    transition: fill 0.24s ease, stroke 0.24s ease, color 0.24s ease;
}

.interaction-btn.active.action-like svg {
    fill: currentColor !important;
    stroke: currentColor !important;
}

.interaction-btn.active.action-favorite svg {
    fill: currentColor !important;
    stroke: currentColor !important;
}

.langyu-report-trigger {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--langyu-muted);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.24s ease;
}

.langyu-report-trigger:hover {
    color: #d14b4b;
}

.langyu-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.langyu-report-modal {
    position: fixed;
    inset: 0;
    z-index: 10010;
    display: none;
}

.langyu-report-modal.is-active {
    display: block;
}

.langyu-report-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(4px);
}

.langyu-report-dialog {
    position: relative;
    width: min(92vw, 520px);
    margin: 10vh auto 0;
    padding: 24px;
    border-radius: 16px;
    background: var(--langyu-surface);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
    box-sizing: border-box;
}

.langyu-report-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: transparent;
    color: var(--langyu-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.langyu-report-title {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--langyu-text);
}

.langyu-report-desc {
    margin: 0 0 16px;
    color: var(--langyu-muted);
    font-size: 14px;
    line-height: 1.7;
}

.langyu-report-input {
    width: 100%;
    min-height: 140px;
    padding: 14px 16px;
    border: 1px solid var(--langyu-border);
    border-radius: 12px;
    background: var(--langyu-surface);
    color: var(--langyu-text);
    font: inherit;
    line-height: 1.7;
    box-sizing: border-box;
    resize: vertical;
}

.langyu-report-input:focus {
    outline: none;
    border-color: var(--langyu-primary);
    box-shadow: 0 0 0 3px rgba(41, 98, 255, 0.08);
}

.langyu-report-feedback {
    min-height: 22px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--langyu-muted);
}

.langyu-report-feedback.is-error {
    color: #d14b4b;
}

.langyu-report-feedback.is-success {
    color: #1e8e5a;
}

.langyu-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.langyu-report-cancel,
.langyu-report-submit {
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.24s ease;
}

.langyu-report-cancel {
    border: 1px solid var(--langyu-border);
    background: transparent;
    color: var(--langyu-muted);
}

.langyu-report-submit {
    border: 1px solid var(--langyu-primary);
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
}

.langyu-report-submit:hover {
    background: var(--langyu-primary-hover);
    border-color: var(--langyu-primary-hover);
}

.langyu-report-submit.loading,
.langyu-report-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .langyu-post-interactions {
        gap: 16px;
        margin: 32px 0;
    }

    .langyu-post-actions-left {
        gap: 16px;
    }

    .langyu-report-dialog {
        width: min(94vw, 520px);
        margin-top: 7vh;
        padding: 22px 18px 18px;
    }
}

.author-actions {
    margin-top: 16px;
}

.author-follow-btn {
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
    border: 1px solid var(--langyu-primary);
    padding: 6px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.author-follow-btn:hover {
    background: var(--langyu-primary-hover);
    border-color: var(--langyu-primary-hover);
}

.author-follow-btn.active {
    background: var(--langyu-soft-bg);
    border-color: #f0f2f5;
    color: var(--langyu-muted);
}

.author-follow-btn.active:hover {
    background: #e6e8eb;
    border-color: #e6e8eb;
}

.author-edit-btn {
    display: inline-block;
    background: transparent;
    color: var(--langyu-muted);
    border: 1px solid #d3dbe3;
    padding: 5px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.author-edit-btn:hover {
    color: var(--langyu-muted);
    border-color: var(--langyu-muted);
    background: var(--langyu-soft-bg);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--langyu-surface);
    color: var(--langyu-text);
}

/* ==========================================================================
   Header Styles (InfoQ 1:1)
   ========================================================================== */

.langyu-header {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    height: 60px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--langyu-surface);
    transition: border-bottom-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none;
}

.langyu-header.is-stuck {
    border-bottom-color: var(--langyu-border);
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); 如果以后需要吸顶阴影可以开启 */
}

.langyu-header-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.langyu-header.is-editor-header .langyu-header-inner {
    gap: 24px;
}

.langyu-editor-header-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.langyu-editor-save-state {
    font-size: 13px;
    color: var(--langyu-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Logo */
.langyu-logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
    margin-right: 40px;
    transition: opacity 0.2s ease;
}

.langyu-logo img {
    display: block;
    max-height: 34px;
    width: auto;
}

html.is-dark-mode .langyu-logo .langyu-logo-light {
    display: none !important;
}

html.is-dark-mode .langyu-logo .langyu-logo-dark {
    display: block !important;
}

.langyu-mobile-actions,
.langyu-mobile-search-panel,
.langyu-mobile-drawer {
    display: none;
}

/* Main Nav */
.langyu-nav {
    flex: 1;
    overflow: hidden; /* 防止后台添加过多菜单项撑破布局 */
}

.langyu-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
    flex-wrap: nowrap; /* 强制单行显示 */
    overflow: hidden;  /* 隐藏超出的菜单项 */
}

.langyu-nav-list li {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* 防止子项被过度压缩 */
}

.langyu-nav-list li a {
    color: var(--langyu-text);
    text-decoration: none;
    font-size: 15px;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.langyu-nav-list li a:hover {
    color: var(--langyu-primary);
}

.langyu-nav-list li.current-menu-item a,
.langyu-nav-list li.current_page_item a {
    font-weight: 600;
    color: var(--langyu-text);
}

.langyu-nav-list li.menu-item-has-children a {
    gap: 4px;
}

/* Badges */
.langyu-badge {
    position: absolute;
    top: -10px;
    right: -24px;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 4px;
    border-bottom-left-radius: 0;
    color: var(--langyu-button-text);
    font-weight: 600;
    line-height: 1.2;
    transform: scale(0.85);
    transform-origin: left bottom;
}

.langyu-badge.hot {
    background-color: var(--langyu-primary);
}

.langyu-badge.new {
    background-color: var(--langyu-primary); /* In image, both look blueish */
}

/* Right Section */
.langyu-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.langyu-editor-header-actions {
    gap: 12px;
}

.langyu-editor-header-divider {
    width: 1px;
    height: 18px;
    background: #e9e9ee;
    margin: 0 2px 0 4px;
    flex-shrink: 0;
}

.langyu-editor-action {
    height: auto;
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    color: var(--langyu-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.langyu-editor-action:hover:not(:disabled) {
    color: var(--langyu-primary);
}

.langyu-editor-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.langyu-editor-action-secondary {
    color: var(--langyu-muted);
}

.langyu-editor-action-secondary:hover:not(:disabled) {
    color: var(--langyu-text);
}

.langyu-editor-action-primary {
    color: var(--langyu-text);
    font-weight: 600;
}

.langyu-editor-action-primary:hover:not(:disabled) {
    color: var(--langyu-primary);
}

/* Header Icon Buttons */
.langyu-header-icons {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 16px;
}

.langyu-header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    color: var(--langyu-text);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.langyu-header-icon-btn:hover {
    background-color: var(--langyu-soft-bg);
    color: var(--langyu-primary);
}

.langyu-header-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Search Dropdown Overlay */
.langyu-search-dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
    backdrop-filter: blur(4px);
}

.langyu-search-form {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 20px;
}

.langyu-search-overlay-inner {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--langyu-surface);
    border-radius: 30px;
    padding: 0 16px;
    height: 56px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.langyu-search-overlay-inner:focus-within {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.langyu-search-overlay-icon {
    color: var(--langyu-muted);
    margin-right: 12px;
    flex-shrink: 0;
}

.langyu-search-overlay-inner input {
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--langyu-text);
    outline: none;
}

.langyu-search-overlay-inner input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.langyu-search-close-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--langyu-muted);
    display: none;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.langyu-search-overlay-inner input:not(:placeholder-shown) + .langyu-search-close-btn {
    display: flex;
}

.langyu-search-close-btn:hover {
    color: var(--langyu-text);
}

.langyu-search-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 100%;
    background: var(--langyu-surface);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    padding: 20px;
    box-sizing: border-box;
}

html.is-dark-mode .langyu-search-dropdown {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--langyu-muted);
}

.clear-history-btn {
    background: none;
    border: none;
    color: var(--langyu-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 0;
}

.clear-history-btn:hover {
    color: var(--langyu-primary);
}

.search-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-history-list li {
    background: var(--langyu-soft-bg);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    color: var(--langyu-text);
    transition: background 0.2s, color 0.2s;
}

.search-history-list li:hover {
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
}

.langyu-mobile-icon-button {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--langyu-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0;
    cursor: pointer;
}

.langyu-mobile-icon-button span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.langyu-mobile-menu-toggle {
    flex-direction: column;
    gap: 4px;
}

.langyu-btn-write {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 16px;
    background-color: var(--langyu-primary);
    color: var(--langyu-button-text);
    text-decoration: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.langyu-btn-write:hover {
    background-color: var(--langyu-primary-hover);
    color: var(--langyu-button-text);
}

.langyu-login {
    color: var(--langyu-text);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.langyu-login:hover {
    color: var(--langyu-primary);
}

/* ==========================================================================
   Home Featured Grid
   ========================================================================== */
.langyu-home-featured-wrapper {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.langyu-home-featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 16px;
    height: 480px;
}

.featured-item {
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 4px;
    text-decoration: none;
}

.featured-large {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.featured-small {
    grid-column: span 1;
    grid-row: span 1;
}

.featured-count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.featured-count-1 .featured-large { grid-column: 1; grid-row: 1; }

.featured-count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.featured-count-2 .featured-large { grid-column: 1; grid-row: 1; }
.featured-count-2 .featured-small { grid-column: 2; grid-row: 1; }

.featured-count-3 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, 1fr); }
.featured-count-3 .featured-large { grid-column: 1; grid-row: 1 / 3; }
.featured-count-3 .featured-small { grid-column: 2; grid-row: span 1; }

.featured-count-4 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, 1fr); }
.featured-count-4 .featured-large { grid-column: 1; grid-row: 1 / 3; }
.featured-count-4 .featured-small:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
.featured-count-4 .featured-small:nth-child(3) { grid-column: 2; grid-row: 2; }
.featured-count-4 .featured-small:nth-child(4) { grid-column: 3; grid-row: 2; }

.featured-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.featured-item:hover .featured-bg {
    transform: scale(1.05);
}

.featured-content {
    position: relative;
    z-index: 1;
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
}

.featured-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.8;
    margin: 0 0 12px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.featured-large .featured-title {
    font-size: 24px;
    font-weight: 600;
}

.featured-title span {
    background-color: #000;
    color: var(--langyu-button-text);
    padding: 6px 12px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    display: block;
    box-sizing: border-box;
    width: 100%;
}

.featured-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: break-word;
}

.featured-desc span {
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--langyu-button-text);
    padding: 6px 10px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    text-align: justify;
}

/* Responsive */
@media (max-width: 991px) {
    .langyu-home-featured-wrapper {
        padding: 0 16px;
        overflow: hidden;
    }

    .langyu-home-featured-grid {
        display: flex;
        gap: 12px;
        height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .langyu-home-featured-grid::-webkit-scrollbar {
        display: none;
    }

    .featured-item {
        flex: 0 0 86%;
        min-width: 86%;
        height: 230px;
        scroll-snap-align: start;
    }

    .featured-large {
        height: 260px;
    }

    .featured-content {
        padding: 18px;
    }

    .featured-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .featured-large .featured-title {
        font-size: 20px;
    }

    .featured-desc {
        font-size: 13px;
    }
}

/* ==========================================================================
   Author Post List (Sspai Timeline Style)
   ========================================================================== */
.sspai-timeline-list {
    position: relative;
}

.sspai-timeline-item {
    display: flex;
    margin-bottom: 32px;
    position: relative;
}

.sspai-timeline-item:last-child {
    margin-bottom: 0;
}

.sspai-timeline-item:last-child .sspai-timeline-line {
    display: none;
}

.sspai-timeline-indicator {
    width: 40px;
    flex-shrink: 0;
    margin-right: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sspai-timeline-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--langyu-border);
    background: var(--langyu-surface);
    z-index: 2;
}

.sspai-timeline-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sspai-timeline-line {
    flex: 1;
    width: 1px;
    background: var(--langyu-border);
    margin-top: 8px;
    margin-bottom: -32px; /* 贯穿到下一个项目 */
}

.sspai-timeline-content {
    flex: 1;
    min-width: 0; /* 防止溢出 */
}

.sspai-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px; /* 和左侧头像高度对齐 */
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--langyu-muted);
}

.sspai-action-text {
    font-weight: 500;
    color: var(--langyu-text);
}

.sspai-post-card {
    display: flex;
    background: #f7f7f9;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    border: none;
    width: 430px;
    height: 96px;
    max-width: 100%;
}

html.is-dark-mode .sspai-post-card {
    background: #28282a;
}

.sspai-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.sspai-post-content {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sspai-post-label {
    font-size: 12px;
    color: var(--langyu-muted);
    margin-bottom: 2px;
}

.sspai-post-title {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.sspai-post-title a {
    color: var(--langyu-text);
    text-decoration: none;
}

.sspai-post-desc {
    margin: 0 0 10px;
    padding-left: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--langyu-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-type-comment .sspai-post-desc {
    text-align: left;
    max-width: 560px;
}

.sspai-post-thumbnail {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    margin: 18px 16px 18px 0;
    border-radius: 4px;
    overflow: hidden;
}

.sspai-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-posts-infinite-trigger {
    width: 100%;
    height: 1px;
}

.author-posts-infinite-loading {
    padding: 12px 0 0 56px;
    font-size: 13px;
    color: var(--langyu-muted);
}

@media (max-width: 768px) {
    .sspai-timeline-item {
        margin-bottom: 24px;
    }
    
    .sspai-timeline-indicator {
        margin-right: 12px;
    }
    
    .sspai-timeline-line {
        margin-bottom: -24px;
    }
    
    .sspai-post-card {
        width: 100%;
        max-width: none;
        flex-direction: column-reverse;
    }
    
    .sspai-post-thumbnail {
        width: auto;
        height: 160px;
        margin: 0;
        border-radius: 0;
        border-bottom: 1px solid var(--langyu-border);
    }
    
    .sspai-post-content {
        padding: 16px;
    }

    .sspai-post-desc {
        padding-left: 0;
        max-width: none;
    }
}

.langyu-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.langyu-main {
    flex: 1;
    min-width: 0; /* 防止子元素撑破 flex 容器 */
    padding-top: 50px;
}

.langyu-sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* Post Item */
.langyu-post-item {
    display: flex;
    align-items: flex-start;
    padding: 24px 0;
    border-bottom: 1px solid var(--langyu-border);
    gap: 24px;
}

.langyu-author-main .langyu-post-item {
    flex-direction: row-reverse;
    justify-content: space-between;
}

.langyu-post-item:first-child {
    padding-top: 0;
}

.langyu-post-item:last-child {
    border-bottom: none;
}

/* Post Thumbnail (Left Side) */
.langyu-post-thumbnail {
    width: 280px;
    height: 180px;
    flex-shrink: 0;
    border-radius: 0;
    overflow: hidden;
}

.langyu-author-main .langyu-post-thumbnail {
    width: 160px;
    height: 106px;
    border-radius: 8px;
}

.langyu-post-thumbnail img,
.img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.img-placeholder {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
}

.langyu-post-item:hover .langyu-post-thumbnail img {
    transform: scale(1.05);
}

/* Post Content (Right Side) */
.langyu-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 180px; /* 最小与左侧图片高度一致 */
}

.langyu-author-main .langyu-post-content {
    min-height: auto;
    justify-content: center;
}

.langyu-post-top-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--langyu-muted);
}

.langyu-post-tags {
    display: flex;
    gap: 8px;
}

.post-tag {
    background-color: var(--langyu-soft-bg);
    color: var(--langyu-text);
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.post-tag:hover {
    background-color: var(--langyu-border);
    color: var(--langyu-primary);
}

.langyu-post-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.langyu-post-title a {
    color: var(--langyu-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.langyu-post-excerpt {
    font-size: 15px;
    color: var(--langyu-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    /* 多行截断效果 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.langyu-author-main .langyu-post-excerpt {
    font-size: 14px;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    margin-bottom: 12px;
}

.langyu-post-item.no-thumbnail {
    flex-direction: column;
    height: auto;
}

.langyu-post-content.no-thumb-content {
    height: auto;
    width: 100%;
}

.langyu-post-meta.no-thumb-meta {
    justify-content: space-between;
    width: 100%;
    margin-top: 12px;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--langyu-muted);
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.meta-separator {
    width: 2px;
    height: 2px;
    background-color: #ccc;
    border-radius: 50%;
}

.langyu-post-tags-bottom {
    display: flex;
    gap: 8px;
}

.post-tag-bottom {
    background-color: var(--langyu-soft-bg);
    color: var(--langyu-text);
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.post-tag-bottom:hover {
    background-color: var(--langyu-border);
    color: var(--langyu-primary);
}

/* Post Meta */
.langyu-post-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    font-size: 13px;
    color: var(--langyu-muted);
    margin-top: auto;
}

.langyu-post-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-avatar-link {
    display: flex;
    align-items: center;
}

.langyu-list-avatar-wrapper {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
}

.post-author-avatar {
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
    object-fit: cover;
}

.langyu-post-author .meta-value {
    color: var(--langyu-text);
    text-decoration: none;
}

.langyu-post-author .meta-value:hover {
    color: var(--langyu-primary);
}

.langyu-post-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.langyu-post-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sidebar Widget */
.langyu-widget {
    background: var(--langyu-surface);
    padding: 20px;
    border-radius: 8px;
}

.widget-title {
    margin-top: 0;
    font-size: 16px;
    color: var(--langyu-text);
    border-bottom: 1px solid var(--langyu-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

/* ==========================================================================
   Single Post Styles (Article Detail)
   ========================================================================== */

.langyu-single-post {
    background: var(--langyu-surface);
    border-bottom: none;
    padding: 0;
}

.langyu-single-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--langyu-text);
    margin: 0 0 20px 0;
}

.langyu-single-meta {
    padding-bottom: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.langyu-single-meta .langyu-post-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.langyu-single-meta .langyu-avatar-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.langyu-single-meta .post-author-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    padding: 0;
    border-radius: 0 !important;
}

.langyu-single-meta .langyu-post-stats {
    display: flex;
    align-items: center;
    color: var(--langyu-muted);
    font-size: 14px;
}

.langyu-single-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--langyu-text);
    letter-spacing: 0.3px;
}

.langyu-single-content p {
    margin-bottom: 1.6em;
}

.langyu-single-content h2,
.langyu-single-content h3,
.langyu-single-content h4 {
    margin: 2em 0 1em;
    font-weight: 600;
    color: var(--langyu-text);
    line-height: 1.4;
}

.langyu-single-content h2 { 
    font-size: 24px; 
}
.langyu-single-content h3 { font-size: 20px; }

.langyu-single-content code {
    background: #f4f5f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #e83e8c;
    font-family: Consolas, Monaco, "Courier New", monospace;
}

.langyu-single-content pre {
    background: #282c34;
    color: #abb2bf;
    padding: 0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1.6em;
    overflow: hidden;
}

.langyu-single-content pre code {
    background: transparent;
    padding: 16px;
    display: block;
    overflow-x: auto;
    color: inherit;
}

.langyu-single-content img,
.langyu-single-content video,
.langyu-single-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    margin: 20px 0;
}

.langyu-single-content video,
.langyu-single-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

.langyupro-code-block {
    background: #282c34;
    color: #abb2bf;
    border-radius: 8px;
    margin: 1.5em 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.6;
    font-family: Consolas, Monaco, "Courier New", monospace;
}

.langyupro-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #21252b;
    padding: 8px 16px;
    user-select: none;
    -webkit-user-select: none;
}

.langyupro-code-mac-dots {
    display: flex;
    gap: 8px;
}

.langyupro-code-mac-dots .mac-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.langyupro-code-mac-dots .mac-dot.red { background: #ff5f56; }
.langyupro-code-mac-dots .mac-dot.yellow { background: #ffbd2e; }
.langyupro-code-mac-dots .mac-dot.green { background: #27c93f; }

.langyupro-code-copy {
    background: transparent;
    border: none;
    color: #abb2bf;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.langyupro-code-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.langyupro-code-block code {
    display: block;
    padding: 16px;
    overflow-x: auto;
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Post Card Styles */
.langyu-post-card-block {
    display: flex;
    align-items: center;
    background: #f7f9fa;
    border-radius: 8px;
    padding: 12px;
    margin: 0 auto 18px;
    width: 50%;
    min-width: 320px;
    max-width: 100%;
    text-decoration: none !important;
    color: inherit;
    transition: background 0.2s ease;
    user-select: none;
    -webkit-user-drag: element;
    clear: both;
}

html.is-dark-mode .langyu-post-card-block {
    background: #282c34;
}

.langyu-post-card-block:hover {
    background: #f0f2f5;
}

html.is-dark-mode .langyu-post-card-block:hover {
    background: #323842;
}

.langyu-post-card-cover {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: var(--langyu-soft-bg);
    margin-right: 14px;
}

.langyu-post-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    overflow: hidden;
}

.langyu-post-card-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--langyu-text);
    margin: 0 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.langyu-post-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--langyu-muted);
}

.langyu-post-card-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 6px;
}

.langyu-post-card-dot {
    margin: 0 6px;
}

.langyu-single-content .langyu-post-card-block {
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none !important;
}

.langyu-single-content .langyu-post-card-cover {
    margin: 0 14px 0 0;
}

.langyu-single-content .langyu-post-card-title {
    margin: 0 0 6px 0;
    color: var(--langyu-text);
}

.langyu-single-content .langyu-post-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    color: var(--langyu-muted);
}

.langyu-single-content .langyu-post-card-avatar {
    width: 18px;
    height: 18px;
    max-width: none;
    margin: 0 6px 0 0;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.langyu-original-declaration {
    margin: 28px 0 32px;
    padding: 16px 18px;
    background: var(--langyu-soft-bg);
    border: 1px solid var(--langyu-border);
    border-radius: 8px;
    color: var(--langyu-muted);
    font-size: 14px;
    line-height: 1.8;
}

.langyu-original-declaration p {
    margin: 0;
}

.langyu-original-declaration a {
    color: var(--langyu-primary);
    word-break: break-all;
}

.langyu-single-content blockquote {
    position: relative;
    margin: 24px 0;
    padding: 24px 48px;
    background: var(--langyu-soft-bg);
    border-radius: 8px;
    color: var(--langyu-text);
    font-style: italic;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.langyu-single-content blockquote::before {
    content: '\201C';
    position: absolute;
    top: 12px;
    left: 16px;
    font-size: 48px;
    color: var(--langyu-primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.langyu-single-content blockquote::after {
    content: '\201D';
    position: absolute;
    bottom: -16px;
    right: 16px;
    font-size: 48px;
    color: var(--langyu-primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.langyu-single-content blockquote p {
    margin-bottom: 0;
    color: inherit;
    position: relative;
    z-index: 1;
}

.langyu-single-content blockquote span {
    font-style: inherit;
}

.langyu-single-content ul,
.langyu-single-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.langyu-single-content li {
    margin-bottom: 8px;
}

.langyu-single-footer {
    margin-top: 40px;
    padding-top: 20px;
}

.tags-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tags-links svg {
    margin-right: -2px; /* Pull it slightly closer if needed */
}

.tags-links a {
    display: inline-block;
    background: var(--langyu-soft-bg);
    color: var(--langyu-muted);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tags-links a:hover {
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
}

/* Post Navigation (Prev/Next) */
.post-navigation {
    margin: 40px 0;
    padding: 24px;
    background: var(--langyu-soft-bg);
    border-radius: 8px;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation .nav-previous, 
.post-navigation .nav-next {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation .nav-subtitle {
    font-size: 13px;
    color: var(--langyu-muted);
    margin-bottom: 6px;
}

.post-navigation .nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--langyu-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-navigation a {
    text-decoration: none;
}

.post-navigation a:hover .nav-title {
    color: var(--langyu-primary);
}

/* ==========================================================================
   Comments Area Styles
   ========================================================================== */

.comments-navigation {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--langyu-border);
}

.comments-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.comments-navigation .nav-previous a,
.comments-navigation .nav-next a {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--langyu-soft-bg);
    color: var(--langyu-text);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.comments-navigation .nav-previous a:hover,
.comments-navigation .nav-next a:hover {
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
}

.comments-area {
    margin-top: 50px;
    padding-top: 40px;
}

.comments-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--langyu-text);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .comment {
    margin-bottom: 0;
}

.comment-list > .comment {
    border-bottom: 1px solid var(--langyu-border);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.comment-list > .comment:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.langyu-comment-body {
    display: flex;
    gap: 12px;
    padding: 20px 0 0 0;
}

.langyu-comment-avatar .avatar-img {
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: block;
    object-fit: cover;
}

.langyu-comment-content-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.langyu-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.langyu-comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.langyu-comment-author .author-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--langyu-primary);
    text-decoration: none;
}

.langyu-comment-author .author-badge {
    font-size: 10px;
    background: #ff8a00;
    color: var(--langyu-button-text);
    padding: 2px 4px;
    border-radius: 2px;
    line-height: 1;
}

.langyu-comment-time {
    font-size: 12px;
    color: var(--langyu-muted);
}

.langyu-comment-text {
    font-size: 14px;
    color: var(--langyu-text);
    line-height: 1.6;
    word-break: break-word;
    margin-top: 2px;
}

.langyu-comment-text p {
    margin-top: 0;
    margin-bottom: 8px;
}

.langyu-comment-text p:last-child {
    margin-bottom: 0;
}

.langyu-comment-footer {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.langyu-comment-reply-to {
    margin: 0;
    color: var(--langyu-muted);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.langyu-comment-reply-to .reply-target-link {
    color: var(--langyu-primary);
    text-decoration: none;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--langyu-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.comment-reply-link:hover {
    color: var(--langyu-primary);
}

.comment-reply-link .reply-icon {
    display: flex;
    align-items: center;
}

.comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 52px;
}

.comment.depth-1 > .children {
    margin-top: 14px;
    padding: 0 16px;
    background: var(--langyu-soft-bg);
    border-radius: 6px;
}

.comment.depth-1 > .children > .comment {
    border-bottom: 1px solid var(--langyu-border);
}

.comment.depth-1 > .children > .comment:last-child {
    border-bottom: none;
}

.comment.depth-2 > .langyu-comment-body {
    padding: 8px 0 10px;
}

.comment-reply-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--langyu-text);
    margin-bottom: 12px;
}

.comment-reply-title small a {
    color: var(--langyu-muted);
    font-size: 12px;
    text-decoration: none;
    margin-left: 8px;
}

.comment-reply-title small a:hover {
    color: #f5222d;
}

/* Comment Form Editor */
.langyu-comment-form {
    margin-top: 40px;
}

.langyu-comment-editor-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.langyu-comment-avatar-box {
    flex-shrink: 0;
}

.langyu-avatar, .langyu-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #ccc;
    object-fit: cover;
}

.langyu-avatar-placeholder svg {
    width: 24px;
    height: 24px;
}

.langyu-comment-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.langyu-comment-input-row {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

.langyu-comment-textarea-wrap {
    flex: 1;
    display: flex;
    min-width: 0;
}

.langyu-comment-textarea-wrap textarea {
    width: 100%;
    min-height: 64px;
    padding: 12px 16px;
    border: 1px solid var(--langyu-border);
    border-radius: 4px;
    background: var(--langyu-surface);
    font-size: 14px;
    color: var(--langyu-text);
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    line-height: 1.5;
    box-sizing: border-box;
}

.langyu-comment-textarea-wrap textarea:focus {
    border-color: var(--langyu-primary);
}

.langyu-comment-textarea-wrap textarea::placeholder {
    color: var(--langyu-muted);
}

.langyu-comment-submit-wrap {
    flex-shrink: 0;
}

.langyu-comment-submit-btn {
    width: 72px;
    height: 100%;
    min-height: 64px;
    background: #2F4259;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: opacity 0.2s;
}

.langyu-comment-submit-btn:hover {
    opacity: 0.9;
}

.langyu-comment-submit-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.langyu-comment-toolbar {
    margin-top: 8px;
    position: relative;
    display: flex;
    align-items: center;
}

.toolbar-btn.emoji-btn {
    background: none;
    border: none;
    padding: 4px;
    color: var(--langyu-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    border-radius: 4px;
}

.toolbar-btn.emoji-btn:hover,
.toolbar-btn.emoji-btn.active {
    color: var(--langyu-primary);
}

.emoji-picker-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--langyu-surface);
    border: 1px solid var(--langyu-border);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 280px;
    padding: 12px;
    z-index: 100;
}

.emoji-picker-panel::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 12px;
    width: 10px;
    height: 10px;
    background: var(--langyu-surface);
    border-left: 1px solid var(--langyu-border);
    border-top: 1px solid var(--langyu-border);
    transform: rotate(45deg);
}

.emoji-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
}

.emoji-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.emoji-item:hover {
    background: #f0f0f0;
}

.langyu-comment-login-prompt {
    font-size: 14px;
    color: var(--langyu-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 64px;
    border: 1px dashed var(--langyu-border);
    border-radius: 4px;
    background: var(--langyu-soft-bg);
}

.langyu-comment-login-prompt a {
    color: var(--langyu-primary);
    text-decoration: none;
    margin: 0 4px;
}

.langyu-comment-form .form-submit {
    display: none;
}

.langyu-comment-form.is-logged-in .form-submit {
    display: none;
}

.comment-notes, .comment-form-cookies-consent {
    display: none;
}

.comment-form-cookies-consent {
    display: none !important;
}

.comment-form-author, .comment-form-email, .comment-form-url {
    margin-top: 16px;
}

.comment-form-author label, .comment-form-email label, .comment-form-url label {
    display: block;
    font-size: 13px;
    color: var(--langyu-muted);
    margin-bottom: 6px;
}

.comment-form-author input, .comment-form-email input, .comment-form-url input {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid var(--langyu-border);
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.comment-form-author input:focus, .comment-form-email input:focus, .comment-form-url input:focus {
    border-color: var(--langyu-primary);
}

.comment-reply-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.comment-notes, 
.logged-in-as {
    color: var(--langyu-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--langyu-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s;
    background: var(--langyu-soft-bg);
    box-sizing: border-box;
}

.comment-form-comment textarea:focus {
    border-color: var(--langyu-primary);
    background: var(--langyu-surface);
}

.comment-form-author, 
.comment-form-email, 
.comment-form-url {
    margin-bottom: 20px;
}

.comment-form-author input, 
.comment-form-email input, 
.comment-form-url input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--langyu-border);
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.comment-form-author input:focus, 
.comment-form-email input:focus, 
.comment-form-url input:focus {
    border-color: var(--langyu-primary);
}

.form-submit {
    margin-top: 20px;
}

.form-submit .submit {
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.form-submit .submit:hover {
    background: var(--langyu-primary-hover);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--langyu-muted);
}

/* ==========================================================================
   Login Modal Styles (1:1 UI)
   ========================================================================== */

.langyu-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.langyu-modal-overlay.is-active {
    display: flex;
}

.langyu-modal-content {
    background: var(--langyu-surface);
    width: 400px;
    border-radius: 8px;
    padding: 40px 32px 24px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}

#langyu-login-modal .langyu-modal-content {
    background: transparent;
    box-shadow: none;
    padding: 0;
    perspective: 1000px;
    width: 360px;
    height: 576px;
    max-height: 90vh;
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

#langyu-login-modal .flip-container.flipped .flip-card {
    transform: rotateY(180deg);
}

.langyu-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--langyu-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
    z-index: 10;
}

.langyu-modal-close:hover {
    color: var(--langyu-text);
}

.langyu-login-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#langyu-login-modal .langyu-login-panel {
    background: var(--langyu-surface);
    border-radius: 16px;
    padding: 48px 32px 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    box-sizing: border-box;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    height: 100%;
}

.switch-mode-icon {
    margin: 0 auto;
    background: var(--langyu-bg);
    border: 1px solid var(--langyu-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--langyu-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.switch-mode-icon:hover {
    background: var(--langyu-text);
    color: var(--langyu-surface);
    border-color: var(--langyu-text);
    transform: scale(1.05) rotate(10deg);
}

.switch-mode-icon svg {
    width: 20px;
    height: 20px;
}

#langyu-login-modal .langyu-login-panel.flip-front {
    transform: rotateY(0deg);
    position: relative;
    z-index: 2;
}

#langyu-login-modal .langyu-login-panel.flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateY(180deg);
    z-index: 1;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--langyu-text);
    margin: 0 0 12px;
    text-align: center;
}

#panel-sms .login-title,
#panel-pwd .login-title {
    text-align: center;
}

.login-desc {
    font-size: 13px;
    color: var(--langyu-muted);
    margin: 0 0 24px;
    line-height: 1.5;
    text-align: center;
}

.login-desc a {
    color: var(--langyu-primary);
    text-decoration: none;
}

/* QR Code Mode */
.qrcode-wrapper {
    width: 200px;
    height: 200px;
    margin: 16px auto;
    border: 1px solid var(--langyu-border);
    padding: 8px;
    box-sizing: border-box;
}

.qrcode-wrapper img {
    width: 100%;
    height: 100%;
    display: block;
}

.login-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--langyu-muted);
    margin: 8px 0 24px;
}

/* Divider */
.login-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
    color: #b2b2b2;
    font-size: 14px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: #f0f0f0;
}

.login-divider::before { left: 0; }
.login-divider::after { right: 0; }

/* Buttons */
.login-btn-outline,
.login-btn-primary {
    width: 100%;
    height: 44px;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-sizing: border-box;
}

.login-btn-outline {
    background: var(--langyu-surface);
    border: 1px solid var(--langyu-border);
    color: var(--langyu-muted);
}

.login-btn-outline:hover {
    background: var(--langyu-soft-bg);
    border-color:  var(--langyu-border);
}

.login-btn-primary {
    background: var(--langyu-primary); /* InfoQ Blue */
    border: none;
    color: var(--langyu-button-text);
    font-weight: 500;
}

.login-btn-primary:hover {
    background: var(--langyu-primary-hover);
}

/* Forms */
.login-form {
    margin-top: auto;
    margin-bottom: auto;
    display: flex;
    flex-direction: column;
}

.login-form .login-btn-primary {
    margin-top: 32px;
}

.form-group {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--langyu-border);
    padding: 12px 0;
    margin-bottom: 8px;
    position: relative;
}

.form-group input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--langyu-text);
    padding: 4px 0;
    background: transparent;
}

.form-group input::placeholder {
    color: #ccc;
}

.phone-group .area-code {
    font-size: 15px;
    color: var(--langyu-muted);
    margin-right: 16px;
    padding-right: 16px;
    border-right: 1px solid var(--langyu-border);
}

.code-group .get-code-btn {
    background: none;
    border: none;
    color: #4b8df8;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.form-options {
    text-align: right;
    margin: 8px 0 0;
}

.forgot-pwd {
    font-size: 13px;
    color: #b2b2b2;
    text-decoration: none;
}

/* Footer Links */
.login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    font-size: 13px;
}

.other-methods {
    color: var(--langyu-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.other-methods span {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #ccc;
    border-radius: 50%;
    /* Mocking the icons with pure CSS circles for now */
}

.switch-method {
    color: var(--langyu-muted);
    text-decoration: none;
}

body.langyu-modal-open {
    overflow: hidden;
}

.site-footer {
    margin-top: 40px;
    background: #2E3236;
    color: #c7ced6;
    font-size: 14px;
}

.site-footer a {
    color: #d5dde6;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--langyu-button-text);
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.site-footer-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.site-footer-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.site-footer-copyright {
    color: #dbe2ea;
}

.site-footer-icp {
    font-size: 13px;
    opacity: 0.85;
}

.site-footer-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer-right {
    display: flex;
    align-items: center;
}

.site-footer-social {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-footer-social-item {
    position: relative;
    width: 36px;
    height: 36px;
}

.site-footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #3A3E42;
    transition: all 0.2s ease;
}

.site-footer-social-link:hover {
    background: #4A4E52;
}

.site-footer-social-link svg {
    width: 20px;
    height: 20px;
    display: block;
}

.site-footer-social-qr {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    transform: translateX(-50%);
    padding: 12px;
    background: var(--langyu-surface);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 10;
}

/* 三角形箭头 */
.site-footer-social-qr::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #fff;
}

.site-footer-social-qr img {
    width: 140px;
    height: 140px;
    display: block;
    border-radius: 4px;
    margin-bottom: 8px;
}

.site-footer-social-qr .qr-text {
    font-size: 14px;
    color: var(--langyu-muted);
    text-align: center;
    font-weight: 500;
}

.site-footer-social-item:hover .site-footer-social-qr {
    display: block;
}

.langyu-widget-empty {
    margin: 0;
    color: var(--langyu-muted);
    font-size: 14px;
}

.login-wechat-text {
    color: #2ba245;
    font-weight: 700;
}

.langyu-login-panel[hidden] {
    display: none;
}

.icon-weibo {
    background: linear-gradient(135deg, #ff8a00, #ff5b5b) !important;
}

.icon-qq {
    background: linear-gradient(135deg, #90a4ae, #b0bec5) !important;
}

.langyu-mobile-search-panel[hidden],
.langyu-mobile-drawer[hidden] {
    display: none;
}

/* Recommend Posts Widget */
.langyu-recommend-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recommend-item {
    display: block;
}

.recommend-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    margin-bottom: 10px;
    border-radius: 0;
    overflow: hidden;
    background: var(--langyu-soft-bg);
}

.recommend-rank {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}

html.is-dark-mode .recommend-rank {
    background: #fff;
    color: #000;
}

.recommend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommend-thumb:hover img {
    transform: scale(1.05);
}

.recommend-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.recommend-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--langyu-text);
    line-height: 1.55;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    transition: color 0.3s;
}

.recommend-title:hover {
    color: var(--langyu-primary);
}

.recommend-meta {
    font-size: 12px;
    color: var(--langyu-muted);
}

.langyu-write-wrapper {
    width: 100%;
    height: calc(100vh - 60px); /* Adjust based on header height */
    background: var(--langyu-surface);
}

.langyu-write-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

/* Related Posts */
.langyu-no-results-section {
    background: var(--langyu-surface);
    border-radius: 8px;
    padding: 60px 40px;
    margin-bottom: 20px;
}

.langyu-no-results-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.langyu-no-results-text {
    flex: 1;
    max-width: 400px;
}

.langyu-no-results-text .page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--langyu-text);
    margin: 0 0 16px;
    line-height: 1.3;
}

.langyu-no-results-text p {
    font-size: 16px;
    color: var(--langyu-muted);
    margin: 0;
    line-height: 1.6;
}

.langyu-no-results-img {
    width: 160px;
    height: auto;
    object-fit: contain;
}

.langyu-no-results-search-wrap {
    max-width: 600px;
    margin: 0 auto 40px;
}

.langyu-big-search-form {
    display: flex;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border-radius: 28px;
    background: var(--langyu-surface);
    border: 2px solid var(--langyu-primary);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.langyu-big-search-form:hover,
.langyu-big-search-form:focus-within {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.langyu-big-search-input {
    flex: 1;
    height: 52px;
    padding: 0 24px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--langyu-text);
    outline: none;
}

.langyu-big-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

html.is-dark-mode .langyu-big-search-input {
    color: #fff;
}

.langyu-big-search-btn {
    height: 52px;
    padding: 0 36px;
    border: none;
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.langyu-big-search-btn:hover {
    background: var(--langyu-primary-hover);
}

.langyu-no-results-suggestions {
    max-width: 600px;
    margin: 0 auto;
}

.langyu-no-results-history,
.langyu-no-results-hot {
    flex: 1;
}

.suggestion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--langyu-border);
    padding-bottom: 8px;
}

.suggestion-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--langyu-text);
    margin: 0;
}

.suggestion-header .clear-history-btn {
    font-size: 13px;
    color: var(--langyu-muted);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.suggestion-header .clear-history-btn:hover {
    color: var(--langyu-primary);
}

.langyu-hot-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.langyu-hot-posts-list li {
    margin-bottom: 12px;
}

.langyu-hot-posts-list li a {
    color: var(--langyu-text);
    font-size: 14px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.langyu-hot-posts-list li a:hover {
    color: var(--langyu-primary);
}

/* Related Posts */
.langyu-related-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--langyu-border);
}

.langyu-related-posts .related-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--langyu-text);
    margin: 0 0 20px;
    position: relative;
    padding-left: 12px;
}

.langyu-related-posts .related-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--langyu-primary);
    border-radius: 2px;
}

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

.related-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.24s ease, opacity 0.24s ease;
    min-width: 0;
}

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

.related-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 2px;
    overflow: hidden;
    background: var(--langyu-soft-bg);
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-item:hover .related-thumb img {
    transform: scale(1.05);
}

.related-info {
    min-width: 0;
    padding-top: 10px;
}

.related-post-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--langyu-text);
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.related-item:hover .related-post-title {
    color: var(--langyu-primary);
}

@media (max-width: 991px) {
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .langyu-no-results-section {
        padding: 40px 20px;
    }

    .langyu-no-results-top {
        flex-direction: column-reverse;
        gap: 20px;
        text-align: center;
    }

    .langyu-no-results-img {
        width: 180px;
    }

    .langyu-no-results-suggestions {
        gap: 30px;
    }

    .langyu-big-search-input {
        padding: 0 16px;
        font-size: 14px;
    }

    .langyu-big-search-btn {
        padding: 0 20px;
        font-size: 16px;
    }
}

/* ==========================================================================
   Author Profile (Sspai Style)
   ========================================================================== */
.langyu-author-main.sspai-layout {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
    padding-top: 40px;
}

.langyu-author-profile.sspai-style {
    background: transparent;
    box-shadow: none;
    border: none;
    margin-bottom: 32px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-cover-wrap {
    width: 100%;
    max-width: 720px;
    height: 240px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: -60px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.author-cover-wrap .author-cover {
    width: 100%;
    height: 100%;
    background-color: var(--langyu-soft-bg);
    background-size: cover;
    background-position: center;
}

.sspai-style .author-header-content {
    width: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    margin-bottom: 24px;
    max-width: 720px;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 2;
}

.sspai-style .author-avatar-wrap {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    position: relative;
    z-index: 2;
    overflow: hidden;
    background: #ffffff;
}

.sspai-style .author-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.sspai-style .author-actions-absolute {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    gap: 12px;
    align-items: center;
}

.sspai-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--langyu-soft-bg);
    color: var(--langyu-text);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.sspai-icon-btn:hover {
    background: var(--langyu-border);
}

.sspai-style .author-follow-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 16px;
    height: 36px;
    border-radius: 18px;
    background: #e53935;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.sspai-style .author-follow-btn:hover {
    background: #d32f2f;
}

.sspai-style .author-follow-btn.active {
    background: var(--langyu-soft-bg);
    color: var(--langyu-muted);
}

.sspai-style .author-follow-btn.active:hover {
    background: var(--langyu-border);
}

.sspai-style .author-info-wrap {
    text-align: left;
    padding: 0 20px;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
}

.sspai-style .author-name {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--langyu-text);
}

.sspai-style .author-bio {
    font-size: 15px;
    color: var(--langyu-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    max-width: 600px;
}

.sspai-style .author-follows-text {
    font-size: 14px;
    color: var(--langyu-muted);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.sspai-style .author-follows-text .stat-item {
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sspai-style .author-follows-text .stat-item:hover {
    color: var(--langyu-text);
}

.sspai-style .author-follows-text .count {
    font-weight: 600;
    color: var(--langyu-text);
}

.sspai-style .author-stats-cards {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.sspai-style .stat-card {
    background: transparent;
    border: 1px solid var(--langyu-border);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 140px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.sspai-style .stat-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.sspai-style .stat-bg-icon {
    position: absolute;
    right: -8px;
    bottom: -8px;
    color: var(--langyu-muted);
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
    transform: rotate(-10deg);
}

.sspai-style .stat-bg-icon svg {
    width: 64px;
    height: 64px;
    display: block;
}

.sspai-style .stat-card:hover {
    border-color: var(--langyu-muted);
}

.sspai-style .stat-card .stat-label {
    font-size: 12px;
    color: var(--langyu-muted);
}

.sspai-style .stat-card .stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--langyu-text);
}

.author-nav-full-wrap {
    width: 100%;
    position: relative;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--langyu-border);
    display: flex;
    justify-content: center;
}

.sspai-style .author-nav.center-tabs {
    display: flex;
    border-top: none;
    border-bottom: none;
    justify-content: flex-start;
    gap: 48px;
    padding: 0 20px;
    margin-bottom: 0;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.sspai-style .author-nav.center-tabs .author-nav-item {
    padding: 16px 0;
    font-size: 15px;
    color: var(--langyu-muted);
    font-weight: 500;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.sspai-style .author-nav.center-tabs .author-nav-item:hover,
.sspai-style .author-nav.center-tabs .author-nav-item.active {
    color: var(--langyu-text);
    background: transparent;
}

.sspai-style .author-nav.center-tabs .author-nav-item::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--langyu-text);
    border-radius: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.sspai-style .author-nav.center-tabs .author-nav-item.active::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .author-cover-wrap {
        height: 160px;
        margin-bottom: -40px;
        border-radius: 8px;
    }
    
    .langyu-author-main.sspai-layout {
        padding-top: 20px;
        padding-left: 0;
        padding-right: 0;
    }
    
    .sspai-style .author-actions-absolute {
        position: static;
        margin-top: 16px;
        justify-content: flex-start;
    }
    
    .sspai-style .author-nav.center-tabs {
        gap: 24px;
    }
    
    .sspai-style .author-stats-cards {
        gap: 8px;
    }
    
    .sspai-style .stat-card {
        min-width: calc(33.333% - 8px);
        padding: 12px;
    }
    
    .sspai-style .stat-card .stat-value {
        font-size: 16px;
    }
}

/* ==========================================================================
   Modal Styles (Follows)
   ========================================================================== */
.langyu-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.langyu-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.langyu-modal-content {
    position: relative;
    background: var(--langyu-surface);
    width: 100%;
    max-width: 480px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    animation: modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
    from { opacity: 0; transform: scale(0.96) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.langyu-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 24px 0;
    border-bottom: 1px solid var(--langyu-border);
}

.follows-tabs {
    display: flex;
    gap: 32px;
}

.follows-tab {
    background: none;
    border: none;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--langyu-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.follows-tab:hover {
    color: var(--langyu-text);
}

.follows-tab.active {
    color: var(--langyu-text);
}

.follows-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--langyu-primary);
    border-radius: 3px 3px 0 0;
}

.btn-close-modal {
    background: var(--langyu-soft-bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--langyu-muted);
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
}

.btn-close-modal:hover {
    background: var(--langyu-soft-bg);
    color: var(--langyu-text);
}

.langyu-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    min-height: 200px;
}

.follows-loading {
    padding: 12px 20px;
}

/* Skeleton Loading */
.skeleton-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 6px;
}

.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--langyu-soft-bg);
    margin-right: 12px;
    flex-shrink: 0;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-info {
    flex: 1;
    min-width: 0;
}

.skeleton-name {
    width: 40%;
    height: 15px;
    background: var(--langyu-soft-bg);
    border-radius: 4px;
    margin-bottom: 6px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-desc {
    width: 70%;
    height: 12px;
    background: var(--langyu-soft-bg);
    border-radius: 4px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-btn {
    width: 72px;
    height: 28px;
    background: var(--langyu-soft-bg);
    border-radius: 16px;
    margin-left: 16px;
    flex-shrink: 0;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* Post List Skeleton */
.langyu-post-list-skeleton {
    display: flex;
    flex-direction: column;
}

.skeleton-post {
    display: flex;
    align-items: flex-start;
    padding: 24px 0;
    border-bottom: 1px solid var(--langyu-border);
    gap: 24px;
}

.skeleton-thumbnail {
    width: 280px;
    height: 180px;
    background: var(--langyu-soft-bg);
    flex-shrink: 0;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-post .langyu-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.skeleton-post .skeleton-title {
    width: 70%;
    height: 24px;
    background: var(--langyu-soft-bg);
    margin-bottom: 16px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-post .skeleton-excerpt {
    width: 100%;
    height: 16px;
    background: var(--langyu-soft-bg);
    margin-bottom: 10px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-meta-bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.skeleton-meta-bottom .skeleton-author {
    width: 100px;
    height: 20px;
    background: var(--langyu-soft-bg);
    border-radius: 10px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-meta-bottom .skeleton-time {
    width: 60px;
    height: 20px;
    background: var(--langyu-soft-bg);
    border-radius: 4px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.follow-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    transition: background 0.3s;
    border-bottom: 1px solid #f9f9f9;
}

.follow-user-item:last-child {
    border-bottom: none;
}

.follow-user-item:hover {
    background: var(--langyu-soft-bg);
}

.follow-user-main {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.follow-user-avatar,
.follow-user-main .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--langyu-border);
}

.follow-user-info {
    flex: 1;
    min-width: 0;
}

.follow-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--langyu-text);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-user-desc {
    font-size: 12px;
    color: var(--langyu-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.follow-user-action {
    margin-left: 16px;
    flex-shrink: 0;
}

.follow-user-btn {
    min-width: 72px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    border-radius: 16px;
    transition: all 0.3s;
}

.follow-user-btn.active {
    background: var(--langyu-soft-bg);
    border-color:  var(--langyu-border);
    color: #3c4043;
}

@media (max-width: 991px) {
    .langyu-header {
        height: auto;
        min-height: 60px;
        position: sticky;
        top: 0;
        z-index: 90;
    }

    .langyu-header-inner {
        padding: 10px 16px;
        gap: 12px;
    }

    .langyu-logo {
        margin-right: 0;
        flex: 1;
        min-width: 0;
        font-size: 22px;
    }

    .langyu-logo img {
        max-height: 30px;
    }

    .langyu-nav,
    .langyu-right {
        display: none;
    }

    .langyu-header.is-editor-header .langyu-right {
        display: flex;
        margin-left: auto;
        gap: 8px;
    }

    .langyu-header.is-editor-header .langyu-editor-header-meta {
        display: none;
    }

    .langyu-header.is-editor-header .langyu-editor-action {
        height: 34px;
        padding: 0 14px;
        font-size: 13px;
    }

    .langyu-header.is-editor-header .langyu-user-menu-wrapper,
    .langyu-header.is-editor-header .langyu-login {
        display: none;
    }

    .langyu-mobile-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .langyu-mobile-search-panel {
        display: block;
        padding: 0 16px 14px;
        border-top: 1px solid #f2f2f2;
        background: var(--langyu-surface);
        position: relative;
    }

    .langyu-mobile-search-form {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-search-input-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-search-input-wrap input {
        flex: 1;
        height: 40px;
        border: 1px solid var(--langyu-border);
        border-radius: 999px;
        padding: 0 14px;
        font-size: 14px;
        outline: none;
        background: var(--langyu-soft-bg);
        color: var(--langyu-text);
    }

    html.is-dark-mode .mobile-search-input-wrap input {
        color: #fff;
    }

    .mobile-search-input-wrap button {
        height: 40px;
        padding: 0 16px;
        border: none;
        border-radius: 999px;
        background: var(--langyu-primary);
        color: var(--langyu-button-text);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

    .langyu-mobile-search-history {
        padding-top: 10px;
        border-top: 1px solid var(--langyu-border);
    }

    .langyu-mobile-drawer {
        position: fixed;
        inset: 0;
        z-index: 120;
    }

    .langyu-mobile-drawer-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.46);
        opacity: 0;
        transition: opacity 0.24s ease;
    }

    .langyu-mobile-drawer-panel {
        position: absolute;
        top: 0;
        right: 0;
        width: min(86vw, 340px);
        height: 100%;
        background: var(--langyu-surface);
        box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
        transform: translateX(100%);
        transition: transform 0.26s ease;
        display: flex;
        flex-direction: column;
    }

    .langyu-mobile-drawer.is-active .langyu-mobile-drawer-backdrop {
        opacity: 1;
    }

    .langyu-mobile-drawer.is-active .langyu-mobile-drawer-panel {
        transform: translateX(0);
    }

    .langyu-mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 18px 14px;
        border-bottom: 1px solid var(--langyu-border);
    }

    .langyu-mobile-drawer-title {
        font-size: 18px;
        font-weight: 700;
        color: #0f172a;
    }

    .langyu-mobile-drawer-close {
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 999px;
        background: var(--langyu-soft-bg);
        color: #475569;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }

    .langyu-mobile-nav {
        flex: 1;
        overflow-y: auto;
        padding: 12px 18px 18px;
    }

    .langyu-mobile-nav-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .langyu-mobile-nav-list li + li {
        border-top: 1px solid var(--langyu-border);
    }

    .langyu-mobile-nav-list a {
        display: block;
        padding: 14px 0;
        color: #0f172a;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
    }

    .langyu-mobile-user-actions {
        padding: 16px 18px 22px;
        border-top: 1px solid var(--langyu-border);
        display: grid;
        gap: 10px;
    }

    .langyu-mobile-write,
    .langyu-mobile-login {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        border-radius: 12px;
        text-decoration: none;
        font-size: 15px;
        font-weight: 600;
    }

    .langyu-mobile-write {
        background: var(--langyu-primary);
        color: var(--langyu-button-text);
    }

    .langyu-mobile-login {
        background: var(--langyu-soft-bg);
        color: #0f172a;
    }

    .langyu-container {
        margin: 24px auto;
        padding: 0 16px;
        display: block;
    }

    .langyu-sidebar {
        display: none;
    }

    .langyu-post-item {
        gap: 16px;
        align-items: flex-start;
    }

    .langyu-post-thumbnail {
        width: 120px;
        height: 88px;
    }

    .langyu-post-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .langyu-post-meta {
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .post-navigation .nav-links {
        flex-direction: column;
    }

    .site-footer-inner {
        padding: 22px 16px;
        flex-direction: column;
        gap: 18px;
    }

    .site-footer-right {
        justify-content: flex-start;
    }

    .site-footer-social-qr {
        right: auto;
        left: 0;
    }
}

@media (max-width: 640px) {
    .skeleton-post {
        flex-direction: column-reverse;
    }
    .skeleton-thumbnail {
        width: 100%;
        height: 190px;
    }
    .skeleton-post .langyu-post-content {
        width: 100%;
        height: auto;
        min-height: auto;
    }

    .langyu-header-inner {
        padding: 10px 14px;
    }

    .langyu-logo {
        font-size: 20px;
    }

    .langyu-post-item {
        flex-direction: column-reverse;
    }

    .langyu-post-thumbnail {
        width: 100%;
        height: 190px;
    }

    .langyu-post-content {
        width: 100%;
        min-height: auto;
    }

    .langyu-single-title {
        font-size: 26px;
    }

    .langyu-single-meta,
    .langyu-post-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .langyu-mobile-drawer-panel {
        width: 100%;
        max-width: none;
    }

    .site-footer-social {
        gap: 12px;
    }

    .site-footer-social-qr {
        left: 0;
        right: auto;
    }
}
