/* ============================================
   全局重置 & 基础
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
    background: #fcfcfc;
    color: #2d3436;
    line-height: 1.8;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    margin-left: 280px;
}

.page-fade-in {
    animation: pageFadeIn 0.6s ease forwards;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mouse-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 183, 197, 0.10) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: left 0.08s ease-out, top 0.08s ease-out;
}

.click-ripple {
    position: fixed;
    border-radius: 50%;
    background: rgba(255, 160, 180, 0.30);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}
@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}

#reading-progress {
    position: fixed;
    top: 0;
    /* left + right 一起给：元素本身占满「视口减去左侧栏」的可视宽度。
       进度用 transform: scaleX() 表示，不再用 width 百分比——
       left/right/width 同时存在时 width 优先，right 会被忽略，百分比会按整个视口算 */
    left: 280px;
    right: 0;
    height: 3px;
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
    background: linear-gradient(90deg, #ffb0c0, #ff8a9b, #ff6b7f);
    z-index: 9999;
    /* 缓入缓出：进度平滑跟随滚动，不生硬瞬移 */
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 12px rgba(255, 107, 127, 0.3);
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.02);
    padding: 1.8rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.2rem;
    border: 3px solid rgba(255, 183, 197, 0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    flex-shrink: 0;
    background: #f0f0f0;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease,
                border-color 0.4s ease;
    cursor: default;
}
.sidebar-avatar:hover {
    transform: rotate(180deg) scale(1.04);
    box-shadow: 0 8px 24px rgba(255, 138, 155, 0.25);
    border-color: #ff8a9b;
}
.sidebar-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
    background: #f0f0f0;
    border-radius: 50%;
}

.sidebar-avatar-admin {
    margin-top: 0.2rem;
    margin-bottom: 0.6rem;
    text-align: center;
}
.admin-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 183, 197, 0.08);
    color: #b2bec3;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}
.admin-entry:hover {
    background: rgba(255, 183, 197, 0.2);
    color: #e1707a;
    transform: rotate(30deg) scale(1.1);
}

.sidebar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
    color: #2d3436;
    position: relative;
}
.sidebar-brand .brand-icon {
    font-size: 1.5rem;
    animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}
.sidebar-brand .brand-text {
    background: linear-gradient(135deg, #2d3436, #636e72);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: filter 0.3s ease;
}
.sidebar-brand:hover .brand-text {
    filter: drop-shadow(0 0 20px rgba(255, 183, 197, 0.15));
}

.sidebar-nav {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    position: relative;
}
.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}
.sidebar-nav .nav-link:hover i {
    transform: scale(1.1);
}
.sidebar-nav .nav-link:hover {
    background: rgba(255, 183, 197, 0.15);
    color: #2d3436;
    transform: translateX(4px);
}
.sidebar-nav .nav-link.active {
    background: rgba(255, 183, 197, 0.20);
    color: #e1707a;
    font-weight: 600;
}
.sidebar-nav .nav-link.active i {
    opacity: 1;
    color: #e1707a;
}
.sidebar-nav .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #ffb0c0, #ff8a9b);
    border-radius: 0 4px 4px 0;
    transition: height 0.3s ease;
}
.sidebar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff8a9b;
    box-shadow: 0 0 12px rgba(255, 138, 155, 0.3);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.5; transform: translateY(-50%) scale(0.7); }
}
.sidebar-nav .nav-link:hover::before,
.sidebar-nav .nav-link.active::before {
    height: 60%;
}

.sidebar-search {
    width: 100%;
    margin-bottom: 1.5rem;
}
.sidebar-search .search-form {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 30px;
    padding: 0.2rem 0.2rem 0.2rem 1rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.sidebar-search .search-form:focus-within {
    background: rgba(0, 0, 0, 0.06);
    border-color: #ffb0c0;
    box-shadow: 0 0 0 4px rgba(255, 183, 197, 0.1);
}
.sidebar-search .search-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: #2d3436;
    outline: none;
}
.sidebar-search .search-form input::placeholder {
    color: #b2bec3;
}
.sidebar-search .search-form button {
    background: transparent;
    border: none;
    color: #999;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.sidebar-search .search-form button:hover {
    color: #ff8a9b;
    transform: scale(1.1);
}

.sidebar-copyright {
    width: 100%;
    text-align: center;
    color: #b2bec3;
    font-size: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.04);
}
.sidebar-copyright small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.sidebar-copyright small::after {
    content: '🐱';
    font-size: 0.9rem;
}

.main-content {
    padding: 2rem 2.5rem 2rem 2.5rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    min-height: 80vh;
}

.post-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 2.2rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}
.post-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    padding: 2px;
    background: linear-gradient(135deg, transparent 60%, rgba(255, 183, 197, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.post-card:hover::after {
    opacity: 1;
}
.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
    border-color: rgba(255, 183, 197, 0.25);
}

.post-card h2 a, .post-card h1 {
    color: #2d3436;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.3px;
    transition: color 0.2s;
}
.post-card h2 {
    font-size: 1.7rem;
}
.post-card h2 a:hover {
    color: #ff8a9b;
}

.post-card .text-muted {
    color: #b2bec3 !important;
    font-size: 0.85rem;
    margin-top: 0.2rem;
}
.post-card .text-muted i {
    margin-right: 4px;
    transition: transform 0.2s ease;
}
.post-card .text-muted span:hover i {
    transform: scale(1.2);
}

.read-time {
    display: inline-block;
    background: rgba(255, 183, 197, 0.12);
    padding: 0.1rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #e1707a;
}

.btn-outline-primary {
    border-radius: 30px;
    border-color: #ffb0c0;
    color: #e1707a;
    transition: all 0.3s ease;
    font-weight: 500;
}
.btn-outline-primary:hover {
    background: linear-gradient(135deg, #ffb0c0, #ff8a9b);
    border-color: #ff8a9b;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 138, 155, 0.25);
}

.content {
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    color: #2d3436;
}
.content h1, .content h2, .content h3 {
    margin-top: 2.2rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}
.content h1 { font-size: 1.8rem; }
.content h2 { font-size: 1.5rem; border-bottom: 2px solid rgba(255, 183, 197, 0.2); padding-bottom: 0.3rem; }
.content h3 { font-size: 1.25rem; }
.content p { margin-bottom: 1rem; }
.content img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.content img:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.content blockquote {
    border-left: 3px solid #ffb0c0;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 183, 197, 0.04);
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
    color: #636e72;
    position: relative;
}
.content blockquote::before {
    content: '"';
    position: absolute;
    top: -8px;
    left: 6px;
    font-size: 2.5rem;
    color: rgba(255, 183, 197, 0.2);
    font-family: Georgia, serif;
}
.content ul, .content ol {
    padding-left: 1.5rem;
}
.content li {
    margin-bottom: 0.3rem;
}
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.content th, .content td {
    border: 1px solid #e0e0e0;
    padding: 0.55rem 0.9rem;
}
.content thead th {
    background: rgba(255, 183, 197, 0.10);
    font-weight: 600;
}
.content a {
    color: #e1707a;
    text-decoration: none;
    border-bottom: 1px solid rgba(225, 112, 122, 0.2);
    transition: border-color 0.2s;
}
.content a:hover {
    border-bottom-color: #e1707a;
}

.mac-code-wrapper {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
    margin: 1.8rem 0;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

.mac-title-bar {
    background: #1e293b;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #334155;
}

.mac-dots {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.mac-dots .dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
}
.mac-dots .dot.red { background: #ff5f56; }
.mac-dots .dot.yellow { background: #ffbd2e; }
.mac-dots .dot.green { background: #27c93f; }

.code-language-tag {
    font-size: 0.65rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 10px;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.copy-code-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.75rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
}
.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.15);
}
.copy-code-btn.copied {
    background: rgba(39, 201, 63, 0.15);
    color: #27c93f;
    border-color: rgba(39, 201, 63, 0.20);
}
.copy-code-btn i {
    font-size: 0.7rem;
}

.mac-code-wrapper pre {
    background: #1e293b !important;
    color: #e2e8f0;
    padding: 1.2rem 1.5rem;
    overflow-x: auto;
    margin: 0;
    font-family: 'Cascadia Code', Consolas, 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    border: none !important;
    border-radius: 0 !important;
}

.badge {
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    background: rgba(255, 183, 197, 0.15) !important;
    color: #e1707a !important;
    transition: all 0.25s ease;
}
.badge:hover {
    transform: translateY(-2px) scale(1.02);
    background: rgba(255, 183, 197, 0.25) !important;
    box-shadow: 0 4px 12px rgba(255, 183, 197, 0.2);
}
a.badge {
    text-decoration: none;
}

.pagination .page-link {
    border-radius: 30px;
    margin: 0 4px;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    color: #2d3436;
    padding: 0.4rem 1rem;
    font-weight: 500;
    transition: all 0.25s ease;
}
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #ffb0c0, #ff8a9b);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 138, 155, 0.3);
}
.pagination .page-link:hover {
    background: #ffb0c0;
    color: #fff;
    transform: translateY(-2px);
}
.pagination .page-item.disabled .page-link {
    background: transparent;
    color: #ccc;
}

#back-to-top {
    display: none;
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    color: #2d3436;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}
#back-to-top:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 138, 155, 0.2);
    border-color: #ff8a9b;
    color: #ff8a9b;
}
#back-to-top .tooltip-text {
    display: none;
    position: absolute;
    right: 52px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
}
#back-to-top:hover .tooltip-text {
    display: block;
}

.back-to-top-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.3rem 1.2rem;
    border-radius: 30px;
    background: rgba(255, 183, 197, 0.1);
    color: #e1707a;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 183, 197, 0.2);
}
.back-to-top-link:hover {
    background: rgba(255, 183, 197, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 138, 155, 0.15);
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f2f6;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffb0c0, #ff8a9b);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff8a9b, #ff6b7f);
}

footer {
    margin-left: 280px;
    position: relative;
    z-index: 1;
    background: transparent;
    color: #b2bec3;
    border-top: none;
    /* 底部悬浮着播放器胶囊（高约 56px）：底部留出 84px，
       滚到最底时最后一行内容不会被胶囊盖住。
       footer 标签上的 .py-3 已从 base.html 删掉——两边都是
       !important 时按 specificity 分胜负，元素选择器永远输给类 */
    padding: 1rem 0 84px;
}
footer a {
    color: #b2bec3;
    text-decoration: none;
    transition: color 0.3s;
}
footer a:hover {
    color: #ff8a9b;
}

.menu-toggle {
    display: none !important;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 101;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: background 0.3s;
    align-items: center;
    justify-content: center;
}
.menu-toggle:hover {
    background: rgba(255,255,255,0.95);
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 768px) {
    body {
        margin-left: 0;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 30px rgba(0,0,0,0.1);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.2);
        z-index: 99;
        transition: opacity 0.3s;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .menu-toggle {
        display: flex !important;
    }
    .main-content {
        padding: 1.2rem;
    }
    .mouse-glow { display: none; }
    #reading-progress {
        left: 0;
    }
    .post-card {
        padding: 1.2rem;
    }
    footer {
        margin-left: 0;
        /* 移动端同样要给底部胶囊留位，再叠上 iPhone 底部安全区 */
        padding: 1rem 1rem calc(84px + env(safe-area-inset-bottom, 0px));
    }
    .sidebar-avatar {
        width: 80px;
        height: 80px;
    }
    .sidebar-brand {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .post-card {
        padding: 1rem;
    }
    .content {
        font-size: 0.95rem;
        overflow-x: auto;
    }
    .post-card h1 {
        font-size: 1.5rem;
    }
    .post-card h2 {
        font-size: 1.3rem;
    }
}

.toc-wrapper {
    background: rgba(255, 183, 197, 0.05);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid #ffb0c0;
}
.toc-wrapper h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #e1707a;
}
.toc-wrapper ul {
    padding-left: 1.2rem;
    margin-bottom: 0;
    list-style: none;
}
.toc-wrapper ul li {
    margin-bottom: 0.2rem;
}
.toc-wrapper ul li a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}
.toc-wrapper ul li a:hover {
    color: #e1707a;
}
.toc-wrapper ul ul {
    padding-left: 1.5rem;
}

.share-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.5rem;
}
.share-label {
    font-size: 0.9rem;
    color: #999;
    margin-right: 0.3rem;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    background: #e9ecef;
    color: #555;
}
.share-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.share-btn.weibo { background: #e6162d; color: #fff; }
.share-btn.twitter { background: #1da1f2; color: #fff; }
.share-btn.qzone { background: #12b7f5; color: #fff; }
.share-btn.copy-link { background: #6c757d; color: #fff; }
.share-btn.copy-link:hover { background: #5a6268; }

.like-section {
    margin: 0.5rem 0 0 0;
}
.btn-like {
    background: rgba(255, 183, 197, 0.12);
    border: 1px solid rgba(255, 183, 197, 0.2);
    border-radius: 30px;
    padding: 0.3rem 1.5rem;
    font-size: 0.95rem;
    color: #e1707a;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-like:hover {
    background: rgba(255, 183, 197, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 138, 155, 0.15);
}
.btn-like.liked {
    background: rgba(255, 107, 127, 0.15);
    border-color: #ff6b7f;
    color: #ff6b7f;
}
.btn-like.liked i {
    animation: likeAnim 0.3s ease;
}
@keyframes likeAnim {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}
.btn-like:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.friend-link-card {
    display: flex;
    /* 原来居中对齐：同一行两张卡描述行数不同时，图标/标题
       在各自卡内垂直居中，横向看过去图标高低错开；改顶部
       对齐后同一行的图标和站名始终同一水平线 */
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    text-decoration: none;
    color: #2d3436;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    height: 100%;
}
.friend-link-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 183, 197, 0.3);
}
.friend-link-card .friend-link-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 183, 197, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e1707a;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.friend-link-card .friend-link-icon img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.friend-link-card:hover .friend-link-icon {
    background: rgba(255, 183, 197, 0.2);
    transform: scale(1.05);
    animation: icon-pulse 1.5s ease-in-out infinite;
}
@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.friend-link-card .friend-link-info {
    flex: 1;
}
.friend-link-card .friend-link-info h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.3s;
}
.friend-link-card:hover .friend-link-info h5 {
    color: #e1707a;
}
.friend-link-card .friend-link-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #b2bec3;
}
.friend-link-card .friend-link-arrow {
    color: #b2bec3;
    transition: transform 0.3s ease;
}
.friend-link-card:hover .friend-link-arrow {
    transform: translateX(6px);
    color: #e1707a;
}

.archive-group {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 1.2rem 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}
.archive-group:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.archive-month {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid rgba(255, 183, 197, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.archive-month .badge {
    font-size: 0.7rem;
    background: rgba(255, 183, 197, 0.15) !important;
    color: #e1707a !important;
}

.archive-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.archive-list li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
}
.archive-list li:hover {
    background: rgba(255, 183, 197, 0.04);
    transform: translateX(4px);
}
.archive-list li:last-child {
    border-bottom: none;
}
.archive-list .archive-date {
    font-size: 0.8rem;
    color: #b2bec3;
    font-weight: 500;
    min-width: 44px;
}
.archive-list li a {
    color: #2d3436;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}
.archive-list li a:hover {
    color: #e1707a;
}
.archive-list .archive-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.archive-list .archive-tags .badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.6rem;
}

.admin-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 183, 197, 0.15);
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-btn-edit {
    background: rgba(255, 183, 197, 0.12);
    color: #e1707a;
    border: 1px solid rgba(255, 183, 197, 0.2);
}
.admin-btn-edit:hover {
    background: rgba(255, 183, 197, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 138, 155, 0.15);
}

.admin-btn-delete {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.15);
}
.admin-btn-delete:hover {
    background: rgba(220, 53, 69, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.25);
}

.delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.delete-modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem 2.5rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.delete-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}
.delete-modal-header h3 {
    margin: 0;
    font-weight: 600;
}

.delete-modal-content p {
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.6;
}

.delete-modal-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
}

.delete-modal-actions .btn {
    padding: 0.4rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.delete-modal-actions .btn-secondary {
    background: #e9ecef;
    color: #555;
}
.delete-modal-actions .btn-secondary:hover {
    background: #dee2e6;
}
.delete-modal-actions .btn-danger {
    background: #dc3545;
    color: #fff;
}
.delete-modal-actions .btn-danger:hover {
    background: #c82333;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ===== 评论回复嵌套样式 ===== */
.comment-item {
    transition: background 0.2s ease;
    border-radius: 8px;
    padding: 0.2rem 0;
}
.comment-item:hover {
    background: rgba(255, 183, 197, 0.02);
}
.reply-btn {
    font-size: 0.75rem;
    padding: 0.1rem 0.6rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}
.reply-btn:hover {
    background: rgba(255, 183, 197, 0.15);
    transform: scale(1.05);
}
#replyToInfo {
    background: rgba(255, 183, 197, 0.08) !important;
}

/* ===== 回复标签美化 ===== */
.reply-tag {
    display: inline-block;
    background: rgba(255, 183, 197, 0.15);
    color: #e1707a;
    font-size: 0.75rem;
    padding: 0.1rem 0.6rem;
    border-radius: 30px;
    font-weight: 500;
    margin-left: 0.3rem;
}
.reply-tag i {
    font-size: 0.65rem;
    margin-right: 2px;
}

/* ===== 搜索页面 ===== */
.search-query-info {
    background: rgba(255, 183, 197, 0.08);
    border-radius: 30px;
    padding: 0.4rem 1.2rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    font-size: 0.95rem;
    color: #555;
    border: 1px solid rgba(255, 183, 197, 0.1);
}
.search-query-info i {
    color: #e1707a;
    margin-right: 6px;
}
.search-query-info strong {
    color: #e1707a;
}

mark {
    background: rgba(255, 183, 197, 0.25);
    padding: 0.1rem 0.2rem;
    border-radius: 4px;
    color: #e1707a;
    font-weight: 500;
}

@media (max-width: 576px) {
    .archive-group {
        padding: 0.8rem 1rem;
    }
    .archive-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
        padding: 0.5rem 0;
    }
    .archive-list .archive-date {
        min-width: auto;
        font-size: 0.7rem;
    }
    .admin-actions {
        flex-direction: column;
        align-items: center;
    }
    .admin-btn {
        width: 100%;
        justify-content: center;
    }
    .delete-modal-content {
        padding: 1.5rem;
    }
    .delete-modal-actions {
        flex-direction: column;
    }
    .delete-modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   以下为本轮体验修复新增样式（v7）
   ============================================================ */

/* ---------- 移动端顶栏：站名 + 搜索入口（桌面隐藏） ---------- */
.mobile-topbar { display: none; }
@media (max-width: 768px) {
    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        /* 左侧 padding 给悬浮的汉堡按钮（44px 圆钮）让位 */
        padding: 0 1rem 0 4.4rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 52px;
        z-index: 98;               /* 低于菜单按钮(101)和侧边栏，高于正文 */
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 183, 197, 0.18);
    }
    .mobile-brand {
        font-weight: 600;
        font-size: 1.05rem;
        color: #2d3436;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mobile-search {
        color: #e1707a;
        font-size: 1.15rem;
        padding: 0.5rem 0.4rem;    /* 扩大点击热区 */
        text-decoration: none;
    }
    /* 搜索图标改成 button 后的原生样式重置 */
    button.mobile-search { border: none; background: transparent; cursor: pointer; }

    /* 顶栏当前页指示：页面名 + 与侧栏激活项同款的呼吸小圆点，
       让"你在哪个页面"不打开抽屉也能看到 */
    .mobile-brand.on-page {
        color: #e1707a;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    .current-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #ff8a9b;
        box-shadow: 0 0 12px rgba(255, 138, 155, 0.3);
        animation: pulse-dot 2s ease-in-out infinite;
    }

    /* 顶栏就地搜索：点击图标展开输入框（品牌文字让位），回车提交到 /search */
    .mobile-search-form { display: none; flex: 1; margin-right: 0.4rem; }
    .mobile-topbar.search-open .mobile-search-form { display: block; }
    .mobile-topbar.search-open .mobile-brand { display: none; }
    .mobile-search-form input {
        width: 100%;
        border: none;
        outline: none;
        border-radius: 999px;
        background: rgba(0, 0, 0, 0.05);
        padding: 0.45rem 1rem;
        font-size: 0.92rem;
        color: #2d3436;
    }
    .mobile-search-form input:focus {
        box-shadow: 0 0 0 3px rgba(255, 183, 197, 0.25);
    }
    /* 内容整体下移一个顶栏高度：汉堡按钮和顶栏都不再压住第一张卡片的标题 */
    body { padding-top: 52px; }
    /* 44px 按钮在 52px 顶栏里垂直居中（原 top:1rem 会探出顶栏下沿） */
    .menu-toggle { top: 4px; }
    /* 侧边栏抽屉从顶栏下方滑出，不遮顶栏 */
    .sidebar { top: 52px; }

    /* 抽屉打开时顶栏一起高亮（JS 给顶栏和汉堡按钮加 .menu-open）：
       顶栏 z-index 98 会被遮罩(99)压成灰色的"关灯"状态，这里升到与
       抽屉同层(100)并换成粉色渐变高亮，让顶栏成为打开的菜单的一部分 */
    .mobile-topbar.menu-open {
        z-index: 100;
        background: linear-gradient(135deg,
                    rgba(255, 183, 197, 0.55),
                    rgba(255, 255, 255, 0.92) 55%,
                    rgba(255, 183, 197, 0.35));
        border-bottom-color: rgba(255, 138, 155, 0.45);
        box-shadow: 0 6px 20px rgba(255, 138, 155, 0.28);
    }
    /* 汉堡按钮图标切换动画：☰/✕ 两个图标叠在按钮中心，.menu-open 切换
       旋转+淡入淡出（原来 JS 换 innerHTML 是瞬变）。
       按钮本体保持白底不变粉，只有顶栏条跟着高亮 */
    .menu-toggle i {
        position: absolute;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .menu-toggle .icon-times { transform: rotate(-90deg); opacity: 0; }
    .menu-toggle.menu-open .icon-bars { transform: rotate(90deg); opacity: 0; }
    .menu-toggle.menu-open .icon-times { transform: rotate(0deg); opacity: 1; }
    /* 抽屉里的激活项：去掉胶囊底色，只留粉色文字/图标 + 左侧小竖条。
       桌面的粉色胶囊是为常驻侧栏设计的，塞进 280px 抽屉里显得吵；
       去底色后既认得出当前页，也不和抽屉的素净风格打架 */
    .sidebar-nav .nav-link.active {
        background: transparent;
    }
}

/* ---------- 标签页：流式胶囊墙 ----------
   原来一个标签独占一张 ~815px 宽的大卡片，5 个标签就把页面拉得
   大片留白；改成一排排圆角胶囊，带文章计数。 */
.tag-cloud-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 183, 197, 0.35);
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.02rem;
    transition: all 0.3s ease;
}
.tag-pill i { color: #4a6fa5; }
.tag-pill:hover {
    background: linear-gradient(135deg, #ffb0c0, #ff8a9b);
    border-color: transparent;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(225, 112, 122, 0.25);
}
.tag-pill:hover i { color: #fff; }
.tag-pill .tag-pill-count {
    font-size: 0.8rem;
    color: #b2bec3;
}
.tag-pill:hover .tag-pill-count { color: rgba(255, 255, 255, 0.9); }

/* ---------- 关于页：邮箱复制按钮（about.html 内联脚本生成） ---------- */
.email-copy-btn {
    margin-left: 0.6rem;
    border: 1px solid rgba(255, 183, 197, 0.5);
    border-radius: 999px;
    background: rgba(255, 183, 197, 0.1);
    color: #e1707a;
    font-size: 0.82rem;
    padding: 0.2rem 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.email-copy-btn:hover {
    background: linear-gradient(135deg, #ffb0c0, #ff8a9b);
    color: #fff;
}
