/* ========================================
   NordicTimeline Theme - Core Styles
   北欧风核心样式
   ======================================== */

/* ========================================
   Layout Structure
   ======================================== */

/* 禁用滚动边界弹性效果 */
html, body {
    overscroll-behavior: none;
    overscroll-behavior-y: none;
}

#site {
    display: flex;
    min-height: 100vh;
}

/* Main Content Area */
.site-main {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    padding-bottom: 48px;
    padding-bottom: var(--spacing-xl);
}

/* 有迷你音乐条时的底部间距 */
body.has-mini-music-bar .site-main {
    padding-bottom: calc(48px + 56px);
    padding-bottom: calc(var(--spacing-xl) + 56px);
}

body.has-mini-music-bar .site-footer {
    padding-bottom: calc(32px + 56px);
    padding-bottom: calc(var(--spacing-lg) + 56px);
}

/* ========================================
   Sidebar Toggle
   ======================================== */

.sidebar-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2C2C2C;
    color: var(--color-text);
    font-size: 1.25rem;
    border-radius: 8px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.sidebar-toggle:hover {
    background-color: #F6F9FC;
    background-color: var(--color-bg);
}

/* ========================================
   Sidebar
   ======================================== */

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-decoration: none; /* 确保<a>标签无下划线 */
    cursor: pointer;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.site-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #FFFFFF 0%, #F0F5FA 100%);
    background: linear-gradient(180deg, #FFFFFF 0%, var(--color-bg-warm) 100%);
    border-right: 1px solid #DCE5EE;
    border-right: 1px solid var(--color-border);
    z-index: 999;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 侧边栏内侧金色装饰线 */
.site-sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(74, 141, 183, 0.12) 20%, #4A8DB7 50%, rgba(74, 141, 183, 0.12) 80%, transparent 100%);
    background: linear-gradient(180deg, transparent 0%, var(--color-gold-muted) 20%, var(--color-gold) 50%, var(--color-gold-muted) 80%, transparent 100%);
    opacity: 0.4;
}

.sidebar-inner {
    padding: 48px 32px;
    padding: var(--spacing-xl) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 16px;
    top: var(--spacing-sm);
    right: 16px;
    right: var(--spacing-sm);
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    color: #6B7D8E;
    color: var(--color-text-light);
    font-size: 1.125rem;
    border-radius: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    background-color: #F6F9FC;
    background-color: var(--color-bg);
    color: #2C2C2C;
    color: var(--color-text);
}

/* Site Branding */
.site-branding {
    text-align: center;
    margin-bottom: 48px;
    margin-bottom: var(--spacing-xl);
}

.site-avatar {
    display: inline-block;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 16px;
    margin-bottom: var(--spacing-sm);
    border: 3px solid #4A8DB7;
    border: 3px solid var(--color-gold);
    box-shadow: 0 0 0 4px rgba(74, 141, 183, 0.12), 0 4px 16px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    box-shadow: 0 0 0 4px var(--color-gold-muted), var(--shadow);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.4s var(--ease-out-expo);
}

.site-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 6px rgba(74, 141, 183, 0.12), 0 0 20px rgba(74, 141, 183, 0.2);
    box-shadow: 0 0 0 6px var(--color-gold-muted), 0 0 20px rgba(74, 141, 183, 0.2);
}

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

.site-logo {
    display: inline-block;
    margin-bottom: 16px;
    margin-bottom: var(--spacing-sm);
}

.site-logo img {
    max-width: 160px;
    height: auto;
}

.site-title {
    font-family: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    margin-bottom: var(--spacing-sm);
    position: relative;
    padding-bottom: 16px;
    padding-bottom: var(--spacing-sm);
}

.site-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2px;
    background: #4A8DB7;
    background: var(--color-gold);
    border-radius: 1px;
}

.site-title a {
    color: #2C2C2C;
    color: var(--color-text);
}

.site-title a:hover {
    color: #2E6E8F;
    color: var(--color-accent);
}

.site-description {
    font-size: 0.875rem;
    color: #6B7D8E;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* Primary Navigation */
.primary-navigation {
    margin-bottom: 48px;
    margin-bottom: var(--spacing-xl);
}

.primary-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    gap: var(--spacing-xs);
}

/* IE11 降级 */
.primary-menu a {
    margin-bottom: 8px;
}

.primary-menu a:last-child {
    margin-bottom: 0;
}

@supports (gap: 8px) {
    .primary-menu a {
        margin-bottom: 0;
    }
}

.primary-menu a {
    display: block;
    padding: 8px 16px;
    padding: var(--spacing-xs) var(--spacing-sm);
    padding-left: calc(16px + 12px);
    padding-left: calc(var(--spacing-sm) + 12px);
    color: #2C2C2C;
    color: var(--color-text);
    font-family: 'Inter', -apple-system, 'Noto Sans SC', sans-serif;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 400;
    border-radius: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
}

.primary-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #4A8DB7;
    background: var(--color-gold);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item a {
    background: rgba(74, 141, 183, 0.12);
    background: var(--color-gold-muted);
    color: #2E6E8F;
    color: var(--color-accent);
}

.primary-menu a:hover::before,
.primary-menu .current-menu-item a::before {
    opacity: 1;
}

.primary-menu .current-menu-item a {
    font-weight: 500;
    border-left: 2px solid #4A8DB7;
    border-left: 2px solid var(--color-gold);
    padding-left: calc(16px + 10px);
    padding-left: calc(var(--spacing-sm) + 10px);
}

/* Social Navigation */
.social-navigation {
    margin-top: auto;
    padding-top: 32px;
    padding-top: var(--spacing-lg);
    border-top: 1px solid #DCE5EE;
    border-top: 1px solid var(--color-border);
}

/* Brand Divider - 金色装饰线 */
.brand-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
    margin: var(--spacing-md) 0;
    position: relative;
}

.brand-divider::before,
.brand-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4A8DB7, transparent);
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    opacity: 0.4;
}

.divider-diamond {
    width: 6px;
    height: 6px;
    background: #4A8DB7;
    background: var(--color-gold);
    transform: rotate(45deg);
    margin: 0 12px;
    flex-shrink: 0;
    opacity: 0.6;
}

.social-menu {
    display: flex;
    justify-content: center;
    gap: 16px;
    gap: var(--spacing-sm);
}

/* IE11 降级 - 社交图标间距 */
.social-menu a {
    margin: 0 8px;
}

@supports (gap: 16px) {
    .social-menu a {
        margin: 0;
    }
}

.social-menu a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7D8E;
    color: var(--color-text-light);
    font-size: 1rem;
    border-radius: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid #DCE5EE;
    border: 1px solid var(--color-border);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s var(--ease-out-expo);
}

.social-menu a:hover {
    background: #4A8DB7;
    background: var(--color-gold);
    border-color: #4A8DB7;
    border-color: var(--color-gold);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 141, 183, 0.3);
}

/* Sidebar Ornament */
.sidebar-ornament {
    margin-top: 32px;
    margin-top: var(--spacing-lg);
    padding-top: 24px;
    padding-top: var(--spacing-md);
    text-align: center;
    color: #4A8DB7;
    color: var(--color-gold);
    opacity: 0.4;
}

.ornament-svg {
    width: 80px;
    height: 16px;
}

/* Widget Area */
.widget-area {
    margin-top: 32px;
    margin-top: var(--spacing-lg);
    padding-top: 32px;
    padding-top: var(--spacing-lg);
    border-top: none;
    position: relative;
}

.widget-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4A8DB7, transparent);
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    opacity: 0.3;
}

.widget-area .widget {
    margin-bottom: 32px;
    margin-bottom: var(--spacing-lg);
}

/* Widget Title */
.widget-area .widget-title {
    font-family: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 400;
    color: #4A8DB7;
    color: var(--color-gold);
    margin-bottom: 16px;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 8px;
    padding-bottom: var(--spacing-xs);
}

.widget-area .widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 1px;
    background: #4A8DB7;
    background: var(--color-gold);
    opacity: 0.5;
}

/* Widget List */
.widget-area .widget ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* IE11 降级 - 小部件列表间距 */
.widget-area .widget li {
    margin-bottom: 6px;
}

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

@supports (gap: 6px) {
    .widget-area .widget li {
        margin-bottom: 0;
    }
}

.widget-area .widget li {
    position: relative;
    padding-left: 12px;
}

.widget-area .widget li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #4A8DB7;
    background: var(--color-gold);
    opacity: 0.4;
}

.widget-area .widget a {
    color: #6B7D8E;
    color: var(--color-text-light);
    font-family: 'Inter', -apple-system, 'Noto Sans SC', sans-serif;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 300;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s var(--ease-out-expo);
}

.widget-area .widget a:hover {
    color: #4A8DB7;
    color: var(--color-gold);
    padding-left: 4px;
}

/* Search Widget */
.widget_search .search-form,
.widget_search form {
    display: flex;
    gap: 0;
    position: relative;
}

.widget_search .search-field,
.widget_search input[type="search"],
.widget_search input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--color-text);
    background: var(--color-bg-warm);
    transition: all 0.3s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.widget_search .search-field:focus,
.widget_search input[type="search"]:focus,
.widget_search input[type="text"]:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 2px var(--color-gold-muted);
    background: var(--color-card);
}

.widget_search .search-submit,
.widget_search input[type="submit"],
.widget_search button {
    padding: 10px 16px;
    background: var(--color-gold);
    color: #fff;
    border: 1px solid var(--color-gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    white-space: nowrap;
}

.widget_search .search-submit:hover,
.widget_search input[type="submit"]:hover,
.widget_search button:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

/* Recent Comments Widget */
.widget_recent_comments .recentcomments {
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--color-text-light);
    line-height: 1.6;
}

.widget_recent_comments .recentcomments a {
    font-weight: 400;
}

.widget_recent_comments .comment-author-link {
    color: var(--color-text);
    font-weight: 400;
}

/* Archive & Categories Dropdown */
.widget_archive select,
.widget_categories select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--color-text);
    background: var(--color-bg-warm);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.widget_archive select:focus,
.widget_categories select:focus {
    border-color: var(--color-gold);
    outline: none;
    box-shadow: 0 0 0 2px var(--color-gold-muted);
}

/* ========================================
   Cards
   ======================================== */

/* Diary Card */
.diary-card {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--spacing-lg) calc(var(--spacing-lg) + 4px);
    margin-bottom: var(--spacing-md);
    position: relative;
    border-top: 3px solid var(--color-gold);
    transition: all 0.4s var(--ease-out-expo);
}

.diary-card:hover {
    border-top-color: var(--color-gold-light);
}

.diary-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    line-height: 1.35;
}

.diary-title a {
    color: var(--color-text);
}

.diary-title a:hover {
    color: var(--color-accent);
}

.diary-content {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.9;
    color: var(--color-text);
}

.diary-content p {
    margin-bottom: var(--spacing-sm);
}

.diary-content p:last-child {
    margin-bottom: 0;
}

.diary-content img,
.diary-content video,
.diary-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: var(--spacing-sm) 0;
}

.diary-content blockquote {
    border-left: 3px solid var(--color-accent);
    padding-left: var(--spacing-md);
    margin: var(--spacing-md) 0;
    color: var(--color-text-light);
    font-style: italic;
}

.diary-content h2,
.diary-content h3,
.diary-content h4 {
    margin: var(--spacing-md) 0 var(--spacing-sm);
    color: var(--color-text);
}

.diary-content ul,
.diary-content ol {
    margin: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
}

.diary-content ul {
    list-style: disc;
}

.diary-content ol {
    list-style: decimal;
}

.diary-content li {
    margin-bottom: var(--spacing-xs);
}

/* ===== Expand Content Button ===== */
.expand-content-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    background: transparent;
    border: 1px solid rgba(var(--color-gold-rgb, 183, 155, 106), 0.3);
    border-radius: 4px;
    color: var(--color-gold, #b79b6a);
    font-family: var(--font-body, 'Noto Serif SC', serif);
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.expand-content-btn:hover {
    background: rgba(var(--color-gold-rgb, 183, 155, 106), 0.08);
    border-color: var(--color-gold, #b79b6a);
}

.expand-content-btn i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.diary-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    color: var(--color-text, #5a5a5a);
    line-height: 1.8;
}

.diary-full-content {
    line-height: 1.8;
}

.diary-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.publish-time {
    color: var(--color-text-light);
}

.location-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-accent);
}

.location-tag i {
    font-size: 0.75rem;
}

/* Quote Card */
.quote-card {
    background: linear-gradient(135deg, var(--color-card) 0%, var(--color-bg-warm) 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.quote-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--color-gold);
    opacity: 0.6;
}

.quote-decoration {
    position: absolute;
    top: var(--spacing-lg);
    left: var(--spacing-lg);
    font-size: 2.5rem;
    color: var(--color-gold);
    opacity: 0.25;
}

.quote-content {
    font-family: var(--font-display);
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--color-text);
    font-style: italic;
    position: relative;
    z-index: 1;
}

.quote-content p {
    margin: 0;
}

/* Locked Card */
.locked-card {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: var(--spacing-xl);
    text-align: center;
}

.lock-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border-radius: 50%;
}

.lock-icon i {
    font-size: 1.5rem;
    color: var(--color-gold);
}

.lock-message {
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

.unlock-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 280px;
    margin: 0 auto;
}

.password-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    background: var(--color-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.password-input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px var(--color-gold-muted);
}

.unlock-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--color-gold);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.unlock-button:hover {
    background: var(--color-accent);
    transform: translateY(-1px);
}

.unlock-error {
    color: #E8A0A0;
    font-size: 0.875rem;
    margin-top: var(--spacing-sm);
}

.unlock-loading {
    margin-top: var(--spacing-sm);
    color: var(--color-accent);
}

/* ========================================
   Card Footer (Timeline Item)
   ======================================== */

.card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
}

.card-footer .location-tag {
    margin-right: auto;
    font-size: 0.8125rem;
}

/* ========================================
   Like Button (Flower Style)
   ======================================== */

.like-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.like-button:hover {
    background: rgba(183, 155, 106, 0.08);
}

.like-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 未点赞状态 - 透明轮廓 */
.flower-icon .flower-petals ellipse {
    fill: transparent;
    stroke: #ccc;
    stroke-width: 0.8;
    transition: all 0.4s ease;
}

.flower-icon .flower-center {
    fill: transparent;
    stroke: #ccc;
    stroke-width: 0.8;
    transition: all 0.4s ease;
}

/* hover 状态 */
.like-button:not(.liked):hover .flower-petals ellipse {
    stroke: #e8a0bf;
    fill: rgba(232, 160, 191, 0.1);
}

.like-button:not(.liked):hover .flower-center {
    stroke: #f0c040;
    fill: rgba(240, 192, 64, 0.1);
}

/* 已点赞状态 - 彩色填充 */
.like-button.liked .flower-petals ellipse {
    fill: #f4a0c0;
    stroke: #e88aaa;
    stroke-width: 0.5;
}

.like-button.liked .flower-center {
    fill: #ffd54f;
    stroke: #f0c040;
    stroke-width: 0.5;
}

.like-button.liked .like-count {
    color: #e88aaa;
}

.like-button:disabled {
    cursor: default;
    opacity: 0.8;
}

.like-count {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--color-text-light);
    transition: color 0.3s ease;
}

/* 点赞动画 */
@keyframes flowerBloom {
    0% { transform: scale(1); }
    30% { transform: scale(1.4); }
    50% { transform: scale(0.9); }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes flowerSpin {
    0% { transform: rotate(0deg) scale(1); }
    30% { transform: rotate(20deg) scale(1.3); }
    60% { transform: rotate(-10deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes particleBurst {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 160, 192, 0.6),
                    0 0 0 0 rgba(255, 213, 79, 0.6),
                    0 0 0 0 rgba(244, 160, 192, 0.4);
    }
    50% {
        box-shadow: -8px -10px 0 -2px rgba(244, 160, 192, 0.8),
                    10px -6px 0 -2px rgba(255, 213, 79, 0.8),
                    6px 10px 0 -2px rgba(244, 160, 192, 0.6);
    }
    100% {
        box-shadow: -14px -18px 0 -4px rgba(244, 160, 192, 0),
                    18px -12px 0 -4px rgba(255, 213, 79, 0),
                    12px 18px 0 -4px rgba(244, 160, 192, 0);
    }
}

.like-button.like-animate .like-icon {
    animation: flowerBloom 0.6s ease-out;
}

.like-button.like-animate .flower-icon {
    animation: flowerSpin 0.6s ease-out;
}

.like-particles {
    position: absolute;
    top: 50%;
    left: 30%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
}

.like-button.like-animate .like-particles {
    animation: particleBurst 0.6s ease-out;
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .like-button.like-animate .like-icon,
    .like-button.like-animate .flower-icon,
    .like-button.like-animate .like-particles {
        animation: none;
    }
}

/* ========================================
   Comment Count Link
   ======================================== */

.comment-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    color: var(--color-text-light);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.comment-count:hover {
    color: var(--color-accent);
}

/* ===== Inline Comments (Timeline) ===== */
.inline-comments-section {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.inline-comments-list {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: var(--spacing-sm);
    padding-right: 4px;
}

/* 自定义滚动条 */
.inline-comments-list::-webkit-scrollbar {
    width: 3px;
}

.inline-comments-list::-webkit-scrollbar-track {
    background: transparent;
}

.inline-comments-list::-webkit-scrollbar-thumb {
    background: var(--color-gold);
    border-radius: 3px;
    opacity: 0.3;
}

.comments-loading {
    text-align: center;
    padding: var(--spacing-sm);
    color: var(--color-text-light);
    font-size: 0.8125rem;
}

.no-comments,
.comments-error {
    text-align: center;
    padding: var(--spacing-sm);
    color: var(--color-text-light);
    font-size: 0.8125rem;
    font-style: italic;
}

/* 内联评论表单 */
.inline-comment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inline-comment-form .comment-form-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.inline-comment-form .nordic-input-author {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    background: var(--color-bg-warm);
    transition: border-color 0.3s ease;
    outline: none;
}

.inline-comment-form .nordic-input-content {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    background: var(--color-bg-warm);
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.3s ease;
    outline: none;
}

.inline-comment-form .nordic-input:focus {
    border-color: var(--color-gold);
}

.inline-comment-form .nordic-btn-comment {
    align-self: flex-end;
    padding: 6px 20px;
    background: var(--color-gold);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}

.inline-comment-form .nordic-btn-comment:hover {
    background: var(--color-accent);
}

.inline-comment-form .nordic-btn-comment:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 评论按钮激活状态 */
.comment-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
}

.comment-toggle:hover,
.comment-toggle.is-active {
    color: var(--color-gold);
}

/* 提示消息 */
.inline-form-message {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.inline-form-message.error {
    color: #d32f2f;
    background: rgba(211, 47, 47, 0.08);
}

.inline-form-message.success {
    color: #388e3c;
    background: rgba(56, 142, 60, 0.08);
}

/* ========================================
   Comments Section
   ======================================== */

.nordic-comments-section {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    position: relative;
}

.nordic-comments-section::before {
    content: 'COMMENTI';
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-lg);
    font-family: var(--font-display);
    font-size: 0.625rem;
    letter-spacing: 3px;
    color: var(--color-gold);
    opacity: 0.4;
    text-transform: uppercase;
}

.nordic-comments-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.nordic-comment-count {
    color: var(--color-accent);
}

.nordic-comments-list {
    margin-bottom: var(--spacing-lg);
}

.nordic-comments-loading {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.nordic-comments-closed {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--color-text-light);
    font-size: 0.9375rem;
}

/* Comment Item */
.comment-item {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid transparent;
    background-image: linear-gradient(90deg, transparent, var(--color-gold-muted), transparent);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
}

.comment-item:last-child {
    background-image: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
}

.comment-author {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9375rem;
}

.comment-ip {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.comment-content {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

.comment-content p {
    margin: 0;
}

.comment-time {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

/* Comment Form */
.nordic-comment-form {
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.nordic-form-row {
    margin-bottom: var(--spacing-sm);
}

.nordic-form-row:last-child {
    margin-bottom: 0;
}

.nordic-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    background: var(--color-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nordic-input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px var(--color-gold-muted);
}

.nordic-input::placeholder {
    color: var(--color-text-light);
}

textarea.nordic-input {
    resize: vertical;
    min-height: 100px;
}

.nordic-form-actions {
    display: flex;
    justify-content: flex-end;
}

.nordic-submit-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease-out-expo);
    border: none;
}

.nordic-submit-btn:hover {
    background: linear-gradient(145deg, var(--color-gold) 0%, var(--color-accent) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(74, 141, 183, 0.3);
    color: #fff;
}

/* ========================================
   Post Actions (Single Page)
   ======================================== */

.post-actions {
    display: flex;
    justify-content: center;
    padding: var(--spacing-lg) 0;
}

.post-actions .like-button {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
}

.post-actions .like-button i {
    font-size: 1.125rem;
}

/* ========================================
   Post Navigation
   ======================================== */

.post-navigation {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.nav-previous,
.nav-next {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    background: var(--color-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
}

.nav-previous:hover,
.nav-next:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow);
}

.nav-next {
    text-align: right;
    align-items: flex-end;
}

.nav-label {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.nav-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.4;
}

.nav-previous:hover .nav-title,
.nav-next:hover .nav-title {
    color: var(--color-accent);
}

/* ========================================
   No Content / Empty State
   ======================================== */

.no-content {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.empty-illustration {
    font-size: 4rem;
    color: var(--color-border);
    margin-bottom: var(--spacing-md);
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

.empty-description {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   Buttons
   ======================================== */

.button-primary {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease-out-expo);
    border: none;
}

.button-primary:hover {
    background: linear-gradient(145deg, var(--color-gold) 0%, var(--color-accent) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(74, 141, 183, 0.3);
    color: #fff;
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
    margin-left: 280px;
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-warm) 100%);
}

.footer-ornament {
    text-align: center;
    color: var(--color-gold);
    opacity: 0.3;
    margin-bottom: var(--spacing-md);
}

.footer-ornament .ornament-svg {
    width: 80px;
    height: 16px;
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer-custom-text {
    text-align: center;
    margin-bottom: 12px;
    font-family: var(--font-body, 'Noto Serif SC', serif);
    font-size: 13px;
    color: var(--color-text-light, #999);
    letter-spacing: 1px;
}

.footer-custom-text .wedding-days {
    color: var(--color-gold, #b79b6a);
    font-weight: 600;
    font-size: 15px;
}

.copyright {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 300;
}

/* ========================================
   Load More Section
   ======================================== */

.load-more-section {
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
}

.load-more-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-xl);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.load-more-button:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: var(--shadow);
}

.load-more-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading-spinner {
    display: inline-flex;
}

/* ========================================
   Single Post Container
   ======================================== */

.single-post-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.single-diary {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: var(--spacing-xl);
}

.comments-section {
    margin-top: var(--spacing-lg);
}

/* ========================================
   Sidebar Section Titles
   ======================================== */
.sidebar-section-title {
    font-family: var(--font-display);
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

/* 隐藏侧边栏导航菜单标题 */
.sidebar-nav-menu .sidebar-section-title {
    display: none;
}

/* ========================================
   Social Icons Grid
   ======================================== */
.sidebar-social-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 0 var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.social-icon-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-light);
    font-size: 0.875rem;
    text-decoration: none;
    position: relative;
    transition: all 0.3s var(--ease-out-expo);
}

.social-icon-item:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: rgba(74, 141, 183, 0.08);
    transform: translateY(-2px);
}

/* 小红书自定义 SVG 图标 */
.nordic-xhs-icon {
    width: 16px;
    height: 16px;
}

/* Tooltip */
.social-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 8px;
    background: var(--color-text);
    color: var(--color-card);
    font-family: var(--font-body);
    font-size: 0.625rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.social-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--color-text);
}

.social-icon-item:hover .social-tooltip {
    opacity: 1;
    visibility: visible;
}

/* 微信二维码弹出层 */
.wechat-qr-popup {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    width: 160px;
    padding: 8px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-expo);
    z-index: 100;
}

.wechat-qr-popup img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.social-wechat:hover .wechat-qr-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.social-wechat:hover .social-tooltip {
    display: none;
}

/* ========================================
   Sidebar Nav Menu
   ======================================== */
.sidebar-nav-menu {
    margin-bottom: 28px;
}

.nav-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.nav-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    min-height: 56px;
    background: rgba(74, 141, 183, 0.04);
    border: 1px solid rgba(74, 141, 183, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: var(--nordic-primary, #4A8DB7);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.nav-menu-item:hover {
    background: rgba(74, 141, 183, 0.08);
    border-color: var(--nordic-primary, #4A8DB7);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(74, 141, 183, 0.15);
    color: var(--color-gold, #C9A96E);
}

.nav-menu-item:active {
    transform: translateY(-1px);
}

.nav-menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.nav-menu-icon svg {
    width: 20px;
    height: 20px;
    transition: stroke 0.3s ease;
}

.nav-menu-item:hover .nav-menu-icon svg {
    stroke: var(--color-gold, #C9A96E);
}

.nav-menu-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1;
    white-space: nowrap;
}

/* ========================================
   Sidebar Music Player
   ======================================== */
.sidebar-music {
    padding: 0 var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.nordic-player {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
}

.player-now-playing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--spacing-xs);
}

.player-cover {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

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

.player-cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nordic-player.is-playing .player-cover-overlay {
    opacity: 1;
}

/* 播放时封面旋转 */
.nordic-player.is-playing .player-cover img {
    animation: coverSpin 8s linear infinite;
}

@keyframes coverSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.player-title {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 300;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 进度条 */
.player-progress {
    margin-bottom: var(--spacing-xs);
}

.progress-bar {
    width: 100%;
    height: 2px;
    background: var(--color-border);
    border-radius: 1px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-gold), var(--color-accent));
    border-radius: 1px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-gold);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-bar:hover .progress-fill::after {
    opacity: 1;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

.progress-time span {
    font-family: var(--font-body);
    font-size: 0.625rem;
    font-weight: 300;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}

/* 控制按钮 */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.player-controls button {
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-controls button:hover {
    color: var(--color-gold);
}

.player-play {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--color-gold) !important;
    border-radius: 50%;
    color: var(--color-gold) !important;
    font-size: 0.6875rem !important;
}

.player-play:hover {
    background: var(--color-gold) !important;
    color: #fff !important;
}

/* 空状态提示 */
.sidebar-empty-hint {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--color-text-muted);
    text-align: center;
    font-style: italic;
    padding: var(--spacing-xs) 0;
}

/* ===== Sidebar Quick Publish ===== */
.sidebar-quick-publish {
    margin-top: 16px;
    text-align: center;
}

.quick-publish-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--color-gold, #b79b6a);
    border-radius: 20px;
    color: var(--color-gold, #b79b6a);
    font-family: var(--font-body, 'Noto Serif SC', serif);
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-publish-toggle:hover,
.quick-publish-toggle.active {
    background: var(--color-gold, #b79b6a);
    color: #fff;
}

.quick-publish-form {
    margin-top: 12px;
    text-align: left;
}

.quick-publish-content {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(var(--color-gold-rgb, 183, 155, 106), 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.6);
    font-family: var(--font-body, 'Noto Serif SC', serif);
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    color: var(--color-text, #5a5a5a);
    transition: border-color 0.3s;
}

.quick-publish-content:focus {
    outline: none;
    border-color: var(--color-gold, #b79b6a);
}

.quick-publish-options {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.quick-publish-options select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid rgba(var(--color-gold-rgb, 183, 155, 106), 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.6);
    font-family: var(--font-body, 'Noto Serif SC', serif);
    font-size: 12px;
    color: var(--color-text, #5a5a5a);
}

.quick-publish-location-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
    border: 1px solid rgba(183, 155, 106, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.quick-publish-location-wrap .location-icon {
    padding: 6px 0 6px 10px;
    color: var(--color-gold, #b79b6a);
    font-size: 12px;
}

.quick-publish-location-wrap .quick-publish-location {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px 8px;
    font-size: 12px;
    font-family: var(--font-body, 'Noto Serif SC', serif);
    color: var(--color-text, #5a5a5a);
}

.quick-publish-location-wrap .quick-publish-location:focus {
    outline: none;
}

.location-refresh {
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(183, 155, 106, 0.2);
    color: var(--color-gold, #b79b6a);
    cursor: pointer;
    font-size: 11px;
    transition: color 0.3s;
}

.location-refresh:hover {
    color: var(--color-gold-dark, #a08a5c);
}

.quick-publish-submit {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: var(--color-gold, #b79b6a);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-family: var(--font-body, 'Noto Serif SC', serif);
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
}

.quick-publish-submit:hover {
    background: var(--color-gold-dark, #a08a5c);
}

.quick-publish-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== Yiyan Quote Preview ===== */
.quick-publish-yiyan {
    padding: 16px 14px;
    margin-bottom: 8px;
    border: 1px solid rgba(183, 155, 106, 0.3);
    border-radius: 6px;
    background: rgba(183, 155, 106, 0.04);
    text-align: center;
}

.yiyan-content {
    position: relative;
}

.yiyan-text {
    font-family: var(--font-body, 'Noto Serif SC', serif);
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-text, #5a5a5a);
    font-style: italic;
    margin: 0;
    padding: 0 24px 0 0;
}

.yiyan-refresh {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    color: var(--color-gold, #b79b6a);
    cursor: pointer;
    font-size: 12px;
    padding: 2px;
    transition: transform 0.3s;
}

.yiyan-refresh:hover {
    transform: rotate(180deg);
}

/* ========================================
   Gallery Lightbox
   ======================================== */
.nordic-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nordic-lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.nordic-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 8px;
}

.lightbox-close:hover {
    color: #fff;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 16px;
    transition: color 0.2s ease;
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #fff;
}

.lightbox-title {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255,255,255,0.8);
    letter-spacing: 1px;
}

/* ===== Sidebar Info Modules ===== */
.sidebar-info-modules {
    padding: 0 20px;
    margin-bottom: 16px;
}

/* --- Friend Links Module --- */
.sidebar-links {
    margin-bottom: 8px;
}

.sidebar-links .sidebar-section-title {
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-light, #999);
    margin-bottom: 8px;
    font-family: var(--font-heading, 'Playfair Display', serif);
}

.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.link-item {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    color: var(--color-text, #5a5a5a);
    background: rgba(183, 155, 106, 0.06);
    border: 1px solid rgba(183, 155, 106, 0.2);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-item:hover {
    color: var(--color-gold, #b79b6a);
    background: rgba(183, 155, 106, 0.12);
    border-color: var(--color-gold, #b79b6a);
    transform: translateY(-1px);
}

/* 侧边栏结婚天数 */
.sidebar-wedding {
    text-align: center;
    padding: 16px 20px 8px;
    margin-top: 8px;
}

.sidebar-wedding-ornament {
    margin-bottom: 12px;
    line-height: 0;
}

.sidebar-wedding-text {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 13px;
    color: var(--color-text-light, #6B7D8E);
    letter-spacing: 0.5px;
    margin: 0;
}

.wedding-days-count {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-gold, #4A8DB7);
    margin: 0 4px;
    letter-spacing: 1px;
}

/* ========================================
   Sidebar Site Days - 网站运行天数
   ======================================== */

/* 隐藏网站运行天数区域上方的 × 装饰符号 */
.sidebar-site-days-ornament {
    display: none;
}

/* 隐藏网站运行天数区域下方的 ◇ 菱形装饰 */
.sidebar-site-days + .sidebar-ornament {
    display: none;
}

/* === 日记内容行楷字体 === */
.diary-content,
.diary-card .diary-text,
.entry-content,
.single .post-content,
.diary-card blockquote,
.timeline-item .diary-content {
    font-family: var(--font-wenkai);
    letter-spacing: 0.02em;
    line-height: 1.9;
}

/* 行楷字体下的标题微调 */
.diary-content h1,
.diary-content h2,
.diary-content h3,
.diary-content h4,
.diary-content h5,
.diary-content h6 {
    font-family: var(--font-wenkai);
    font-weight: 700;
}

/* ===== 用户角色徽章 ===== */
.diary-role-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.6;
    z-index: 2;
    transition: all 0.4s var(--ease-out-expo);
}

/* 鼠标悬停在卡片区域时，标签跟随卡片一起动 */
.timeline-content:hover .diary-role-badge {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover), 0 0 0 1px var(--color-gold-muted);
}

/* 鼠标直接悬停在标签上时，标签有更突出的效果 */
.diary-role-badge:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: var(--shadow-hover), 0 0 0 2px var(--color-gold);
}

.diary-role-badge.role-founder {
    background: linear-gradient(135deg, #2E6E8F, #4A8DB7);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(74, 141, 183, 0.4);
}

.diary-role-badge.role-admin {
    background: linear-gradient(135deg, #4A8DB7, #A8C8DE);
    color: #5C4A2F;
    box-shadow: 0 2px 6px rgba(74, 141, 183, 0.3);
}

/* ===== 日记置顶 ===== */
.diary-sticky-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    background: linear-gradient(135deg, #4A8DB7, #A8C8DE);
    color: #5C4A2F;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.diary-sticky-badge svg {
    flex-shrink: 0;
}

/* 置顶日记卡片顶部金色条 */
.timeline-item.sticky .timeline-content {
    border-top: 3px solid #4A8DB7;
}

/* 快速发布置顶开关 */
.diary-sticky-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #2E6E8F;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.diary-sticky-toggle:hover {
    background: rgba(74, 141, 183, 0.1);
}

.diary-sticky-toggle input[type="checkbox"] {
    display: none;
}

.diary-sticky-toggle input[type="checkbox"]:checked ~ span {
    color: #4A8DB7;
    font-weight: 600;
}

.diary-sticky-toggle input[type="checkbox"]:checked ~ svg {
    color: #4A8DB7;
}

/* ===== 侧边栏搜索 ===== */
.sidebar-search-widget {
    position: relative;
    margin-bottom: 24px;
}

.sidebar-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search-icon {
    position: absolute;
    left: 14px;
    color: var(--color-text-secondary, #6B7B8D);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.sidebar-search-input {
    width: 100%;
    padding: 10px 36px 10px 38px;
    border: 1px solid var(--color-border, #DCE5EE);
    border-radius: 12px;
    font-size: 14px;
    color: var(--color-text-primary, #1A2332);
    background: var(--color-bg-elevated, #FFFFFF);
    transition: all 0.3s ease;
    outline: none;
}

.sidebar-search-input:focus {
    border-color: var(--color-primary, #4A8DB7);
    box-shadow: 0 0 0 3px rgba(74, 141, 183, 0.12);
}

.sidebar-search-input::placeholder {
    color: var(--color-text-muted, #A0ADB8);
}

.sidebar-search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--color-text-secondary, #6B7B8D);
    cursor: pointer;
    padding: 4px;
    font-size: 13px;
    line-height: 1;
}

.sidebar-search-clear:hover {
    color: var(--color-text-primary, #1A2332);
}

.sidebar-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: var(--color-bg-elevated, #FFFFFF);
    border: 1px solid var(--color-border, #DCE5EE);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    max-height: 360px;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-search-item {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-border-light, #EEF2F6);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.sidebar-search-item:last-child {
    border-bottom: none;
}

.sidebar-search-item:hover {
    background: rgba(74, 141, 183, 0.06);
}

.sidebar-search-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary, #1A2332);
    margin: 0 0 4px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-search-item-date {
    font-size: 12px;
    color: var(--color-text-muted, #A0ADB8);
}

.sidebar-search-empty {
    padding: 16px;
    text-align: center;
    color: var(--color-text-muted, #A0ADB8);
    font-size: 13px;
}

.sidebar-search-loading {
    padding: 16px;
    text-align: center;
    color: var(--color-text-secondary, #6B7B8D);
    font-size: 13px;
}

/* ===== 欢迎弹窗样式 ===== */
.welcome-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6); /* IE11 降级 - 加深背景替代模糊 */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.welcome-popup-overlay.is-visible {
    opacity: 1;
}

.welcome-popup-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F5FA 100%);
    border-radius: 20px;
    padding: 40px 48px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(74, 141, 183, 0.25), 0 0 0 1px rgba(74, 141, 183, 0.1);
    transform: scale(0.85) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.welcome-popup-overlay.is-visible .welcome-popup-card {
    transform: scale(1) translateY(0);
}

.welcome-popup-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.welcome-popup-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-primary, #1A2332);
    margin: 0 0 24px;
    line-height: 1.5;
    letter-spacing: 1px;
}

.welcome-popup-close {
    background: linear-gradient(135deg, var(--color-primary, #4A8DB7), var(--color-primary-light, #6BAED6));
    color: #FFFFFF;
    border: none;
    padding: 10px 36px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 141, 183, 0.3);
}

.welcome-popup-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 141, 183, 0.4);
}

/* ===== 中国风装饰元素 ===== */

/* 侧边栏标题 — 行楷字体 + 水墨装饰线 */
.sidebar-section-title,
.widget-title,
.sidebar h3,
.sidebar h4 {
    font-family: var(--font-wenkai, 'LXGW WenKai Lite', 'Noto Serif SC', Georgia, serif);
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 8px;
}

/* 标题下方水墨风装饰线 */
.sidebar-section-title::after,
.widget-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    margin-top: 6px;
    background: linear-gradient(to right, var(--color-gold, #4A8DB7), transparent);
    border-radius: 1px;
    opacity: 0.6;
}

/* 页脚祥云装饰 */
.site-footer::before {
    content: '';
    display: block;
    width: 100%;
    height: 40px;
    background: 
        radial-gradient(ellipse 60px 30px at 15% 50%, rgba(74, 141, 183, 0.04) 0%, transparent 100%),
        radial-gradient(ellipse 80px 35px at 50% 50%, rgba(212, 168, 85, 0.03) 0%, transparent 100%),
        radial-gradient(ellipse 60px 30px at 85% 50%, rgba(74, 141, 183, 0.04) 0%, transparent 100%);
    pointer-events: none;
}

/* 引用类型日记卡片 — 中式引号装饰 */
.quote-card .diary-content::before {
    content: '\201C';  /* 左双引号 " */
    font-family: var(--font-wenkai, 'LXGW WenKai Lite', Georgia, serif);
    font-size: 48px;
    line-height: 1;
    color: var(--color-sun-gold, #D4A855);
    opacity: 0.15;
    position: absolute;
    top: -8px;
    left: -4px;
    pointer-events: none;
}

.quote-card .diary-content {
    position: relative;
}

/* 时间轴节点 — 中式印章风格（微调） */
.timeline-item .node-dot {
    border: 2px solid var(--color-gold, #4A8DB7);
    position: relative;
}

/* 侧边栏品牌区网站名 — 行楷增强 */
.sidebar-brand-name,
.site-title {
    font-family: var(--font-wenkai, 'LXGW WenKai Lite', 'Noto Serif SC', Georgia, serif);
}

/* ===== AJAX 页面加载过渡 ===== */
.ajax-page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(246, 249, 252, 0.85); /* IE11 降级 - 纯色背景 */
    backdrop-filter: blur(2px);
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.ajax-page-loading.is-active {
    opacity: 1;
    pointer-events: all;
}
.ajax-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(74, 141, 183, 0.15);
    border-top-color: var(--nordic-primary, #4A8DB7);
    border-radius: 50%;
    animation: nordicSpin 0.8s linear infinite;
}
@keyframes nordicSpin {
    to { transform: rotate(360deg); }
}

/* ===== 搜索结果高亮动画 ===== */
@keyframes searchHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 141, 183, 0.6);
        transform: scale(1);
    }
    25% {
        box-shadow: 0 0 0 8px rgba(74, 141, 183, 0.3);
        transform: scale(1.01);
    }
    50% {
        box-shadow: 0 0 0 16px rgba(74, 141, 183, 0.1);
        transform: scale(1.01);
    }
    75% {
        box-shadow: 0 0 0 8px rgba(74, 141, 183, 0.05);
        transform: scale(1.01);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 141, 183, 0);
        transform: scale(1);
    }
}

.timeline-item.search-highlight {
    animation: searchHighlight 1.5s ease-out;
    border-radius: var(--radius, 12px);
    z-index: 10;
}

/* 搜索结果插入的日记特殊样式 */
.timeline-item.search-result-inserted {
    border-left: 3px solid var(--color-gold, #4A8DB7);
    margin-left: -3px;
}

/* ===== 外链跳转确认弹窗 ===== */
.nordic-redirect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nordic-redirect-modal.is-active {
    opacity: 1;
    visibility: visible;
}
.redirect-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 43, 60, 0.65); /* IE11 降级 - 加深背景替代模糊 */
    backdrop-filter: blur(4px);
}
.redirect-modal-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(74, 141, 183, 0.2);
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.nordic-redirect-modal.is-active .redirect-modal-card {
    transform: translateY(0) scale(1);
}
.redirect-modal-title {
    font-family: var(--font-wenkai, 'LXGW WenKai Lite', serif);
    font-size: 24px;
    font-weight: 700;
    color: #1A2B3C;
    margin: 0 0 12px;
}
.redirect-modal-desc {
    font-size: 14px;
    color: #6B7D8E;
    margin: 0 0 8px;
}
.redirect-modal-url {
    font-size: 15px;
    font-weight: 600;
    color: var(--nordic-primary, #4A8DB7);
    word-break: break-all;
    margin: 0 0 8px;
    padding: 8px 16px;
    background: rgba(74, 141, 183, 0.06);
    border-radius: 8px;
}
.redirect-modal-hint {
    font-size: 13px;
    color: #8A9AAE;
    margin: 0 0 24px;
}
.redirect-modal-actions {
    display: flex;
    gap: 12px;
}
.redirect-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
.redirect-btn-back {
    background: rgba(74, 141, 183, 0.08);
    color: #4A5568;
}
.redirect-btn-back:hover {
    background: rgba(74, 141, 183, 0.14);
}
.redirect-btn-go {
    background: linear-gradient(135deg, #4A8DB7, #6BAED6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(74, 141, 183, 0.3);
}
.redirect-btn-go:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 141, 183, 0.4);
}

/* ===== 全站图片自适应显示 ===== */
.entry-content img,
.diary-content img,
.timeline-content img,
.comment-content img,
article img,
.site-main img,
.sidebar-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: contain;
}

/* 外部链接图片同样自适应 */
img[src^="http"] {
    max-width: 100%;
    height: auto;
}

/* 行内图片不强制 block */
p img,
a img,
span img {
    display: inline-block;
    vertical-align: middle;
}
