/* 自定义CSS样式补充 */

/* 毛玻璃效果 */
.glass-card {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 按钮悬停效果 */
.btn-hover-effect {
    transition: all 0.3s ease;
}

.btn-hover-effect:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

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

/* 可编辑文本样式 */
.editable {
    cursor: pointer;
    transition: opacity 0.2s;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
}

.editable:hover {
    opacity: 0.8;
}

/* 模态框动画 */
#modal {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 背景图片过渡效果 */
#background-container {
    transition: background-image 1s ease, opacity 0.8s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .glass-card {
        padding: 1rem !important;
    }

    #buttons-container {
        gap: 0.75rem;
    }
}

.markdown-content {
    line-height: 1.8;
    font-size: 1.125rem;
}
.markdown-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 2.5rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}
.markdown-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}
.markdown-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}
.markdown-content p {
    margin: 1.5rem 0;
}
.markdown-content ul, .markdown-content ol {
    margin: 1rem 0 1rem 1.5rem;
}
.markdown-content li {
    margin: 0.5rem 0;
}
.markdown-content li > ul,
.markdown-content li > ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
}
.markdown-content code:not(pre code) {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.9em;
}
.markdown-content pre {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}
.markdown-content pre code {
    background: none;
    padding: 0;
    font-size: 0.95em;
    line-height: 1.6;
}
.markdown-content blockquote {
    border-left: 4px solid rgba(102, 126, 234, 0.6);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 0 0.5rem 0.5rem 0;
}
.markdown-content a {
    color: #93c5fd;
    text-decoration: none;
    border-bottom: 1px dashed #93c5fd;
    transition: all 0.2s;
}
.markdown-content a:hover {
    color: #60a5fa;
    border-bottom-style: solid;
}
.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}
.markdown-content th {
    background-color: rgba(102, 126, 234, 0.2);
    font-weight: 600;
    text-align: left;
}
.markdown-content th,
.markdown-content td {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.markdown-content tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}
.markdown-content hr {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 3rem 0;
}
.markdown-content .footnotes {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toc {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid rgba(102, 126, 234, 0.6);
}
.toc h2 {
    margin-top: 0;
    font-size: 1.25rem;
}
.toc ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.toc li {
    margin: 0.5rem 0;
}
.toc a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s;
}
.toc a:hover {
    color: #93c5fd;
}

.markdown-content h1:hover .anchor-link,
.markdown-content h2:hover .anchor-link,
.markdown-content h3:hover .anchor-link,
.markdown-content h4:hover .anchor-link,
.markdown-content h5:hover .anchor-link,
.markdown-content h6:hover .anchor-link {
    opacity: 1;
}

.anchor-link {
    opacity: 0;
    color: #93c5fd;
    margin-left: 0.5rem;
    text-decoration: none;
    transition: opacity 0.2s;
    font-size: 0.8em;
}
.anchor-link:hover {
    opacity: 1 !important;
}
.article-card {
    transition: all 0.3s ease;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.line-clamp-2 {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-buttons {
    display: flex;
    gap: 0.75rem;
}
.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}
.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.nav-btn i {
    font-size: 1.25rem;
}
/* 添加到 site/style.css 的底部 */

/* 导航按钮展开效果 */
.nav-btn {
    position: relative;
    width: 3rem;
    height: 3rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 0.75rem;
    text-decoration: none;
}

/* 按钮文字（默认隐藏） */
.nav-btn-text {
    opacity: 0;
    width: 0;
    white-space: nowrap;
    margin-left: 0;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease 0.1s;
    pointer-events: none;
}

/* 悬停时按钮展开 */
.nav-btn:hover {
    width: auto;
    padding: 0 1.25rem;
    justify-content: flex-start;
}

/* 悬停时显示文字 */
.nav-btn:hover .nav-btn-text {
    opacity: 1;
    width: auto;
    margin-left: 0.75rem;
}

/* 图标样式 */
.nav-btn i {
    font-size: 1.25rem;
    min-width: 1.25rem;
    text-align: center;
    transition: transform 0.3s ease;
}

/* 悬停时图标轻微放大 */
.nav-btn:hover i {
    transform: scale(1.1);
}

/* 按钮悬停时的阴影和上浮效果 */
.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 按钮组间距调整 */
.nav-buttons {
    display: flex;
    gap: 0.75rem;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .nav-btn {
        width: 2.75rem;
        height: 2.75rem;
    }

    .nav-btn:hover {
        padding: 0 1rem;
    }

    .nav-btn:hover .nav-btn-text {
        font-size: 0.75rem;
        margin-left: 0.5rem;
    }

    .nav-btn i {
        font-size: 1.125rem;
    }
}

html {
    height: 100%;
    overflow: hidden !important;
}

body {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: relative;
}

/* 修复背景容器 - 固定不滚动 */
#background-container {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none; /* 防止背景干扰点击事件 */
}

#overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none; /* 防止遮罩层干扰点击事件 */
}

body.home-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body.home-page main {
    width: 100%;
    max-width: 4xl;
    padding: 2rem 1rem;
    text-align: center;
}

/* iOS平滑滚动 */
@media (max-width: 768px) {
    body {
        -webkit-overflow-scrolling: touch;
    }
}