/* === 文章页面样式覆盖 === */

/* 更紧凑的文章样式（覆盖 style.css 中的默认值） */
.markdown-body {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol {
    margin-bottom: 0.8em !important;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    margin-top: 1.2em !important;
    margin-bottom: 0.6em !important;
}

/* 文章页面隐藏右侧边栏小部件，保留目录 */
.is-post-page .sidebar-right .widget-card:not(.toc-card) {
    display: none !important;
}

/* 目录卡片透明样式 */
.toc-card.glass-card {
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    border: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 0 !important;
}

.toc-card .widget-title {
    padding-left: 10px;
    margin-bottom: 4px;
    font-size: 0.7em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    flex-shrink: 0;
}

/* 目录列表容器 - 可滚动且隐藏滚动条 */
#toc-list {
    padding-left: 10px;
    border-left: 2px solid var(--card-border);
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* 隐藏滚动条 - 兼容各浏览器 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

#toc-list::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera */
}

#toc-list li {
    list-style: none;
}

#toc-list li a {
    font-size: 0.7em;
    color: var(--text-secondary);
    display: block;
    padding: 2px 0;
    transition: all 0.2s;
    text-decoration: none;
    opacity: 0.8;
}

/* 三级标题缩进 */
#toc-list li a.toc-level-3 {
    padding-left: 16px;
    font-size: 0.65em;
}

#toc-list li a:hover,
#toc-list li a.active {
    color: var(--accent-color);
    opacity: 1;
    transform: translateX(4px);
    font-weight: 500;
}

/* 目录内返回顶部按钮 */
.toc-back-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-top: 1px dashed var(--card-border);
    border-radius: 0;
    color: var(--text-tertiary);
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toc-back-top:hover {
    color: var(--accent-color);
}

.toc-back-top svg {
    transition: transform 0.2s ease;
}

.toc-back-top:hover svg {
    transform: translateY(-3px);
}

/* === 版权声明样式 === */
.license-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    margin-top: 8px;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--accent-color-rgb, 99, 102, 241), 0.05) 100%);
    border: 1px solid var(--card-border);
    border-left: 3px solid var(--accent-color);
    border-radius: 10px;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.license-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 1em;
    font-weight: bold;
    position: relative;
    box-shadow: 0 0 0 0 rgba(var(--accent-color-rgb, 99, 102, 241), 0.7);
    animation: pulse-glow 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
    transition: all 0.3s ease;
}

/* 脉冲发光动画 */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--accent-color-rgb, 99, 102, 241), 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(var(--accent-color-rgb, 99, 102, 241), 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--accent-color-rgb, 99, 102, 241), 0);
        transform: scale(1);
    }
}

/* 悬停效果 */
.license-icon:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 4px 12px rgba(var(--accent-color-rgb, 99, 102, 241), 0.4),
                0 0 20px rgba(var(--accent-color-rgb, 99, 102, 241), 0.3);
    animation-play-state: paused;
}

/* 添加内部光晕效果 */
.license-icon::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.license-content {
    flex: 1;
}

.license-content h4 {
    margin: 0 0 6px 0;
    font-size: 0.95em;
    color: var(--text-primary);
    font-weight: 600;
}

.license-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95em;
}

.license-content a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-color);
    transition: all 0.2s;
}

.license-content a:hover {
    border-bottom-style: solid;
    opacity: 0.8;
}

/* 响应式缩放 - 中等屏幕 */
@media (max-width: 768px) {
    .license-notice {
        font-size: 0.8em;
        padding: 14px;
        gap: 10px;
        border-radius: 8px;
    }

    .license-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9em;
    }

    .license-content h4 {
        font-size: 0.9em;
        margin-bottom: 4px;
    }

    .license-content p {
        font-size: 0.9em;
    }
}

/* 响应式缩放 - 小屏幕 */
@media (max-width: 480px) {
    .license-notice {
        font-size: 0.75em;
        padding: 12px;
        gap: 8px;
        margin-top: 24px;
        border-radius: 6px;
    }

    .license-icon {
        width: 24px;
        height: 24px;
        font-size: 0.85em;
    }

    .license-content h4 {
        font-size: 0.85em;
    }

    .license-content p {
        font-size: 0.85em;
        line-height: 1.4;
    }
}