/* 基础样式重置 */
@font-face {
    font-family: 'HarmonyOS Sans';
    src: url('../assets/fonts/HarmonyOS_Sans_TC_Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --bg-primary: rgba(255, 255, 255, 0.9);
    --bg-secondary: rgba(248, 248, 252, 0.95);
    --bg-card: rgba(255, 255, 255, 0.95);
    --border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-light: #a5b4fc;
    --secondary-color: #f472b6;
    --glass-bg: rgba(0, 0, 0, 0.3);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --bg-primary: rgba(31, 41, 55, 0.95);
    --bg-secondary: rgba(17, 24, 39, 0.95);
    --bg-card: rgba(55, 65, 81, 0.95);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    min-width: 100vw;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* 背景图片 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    transition: background-image 0.3s ease;
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(135deg,
        rgba(250, 250, 252, 0.394) 0%,
        rgba(245, 245, 250, 0.435) 50%,
        rgba(240, 240, 245, 0.3) 100%); */
        background-color: rgba(201, 199, 199, 0.462);
    z-index: -1;
}

.background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(220, 220, 249, 0.8);
    z-index: -1;
}

.back-link {
    display: inline-block;
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 16px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}



/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 导航栏 */
.nav {
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 8px 16px;
    box-shadow: var(--shadow);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* 头像卡片 */
.profile-card {
    text-align: center;
    padding: 60px 20px 40px;
    margin-bottom: 30px;
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.avatar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 115px;
    height: 115px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) border-box;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.date-display {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 20px;
    color: var(--text-primary);
    font-size: 1rem;
    text-align: center;
    margin-bottom: 20px;
    width: 200px;
    outline: none;
    transition: all 0.3s ease;
}

.date-display:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-light);
}

/* 日期数字的方框样式 */
#currentDate, #currentTime {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 5px;
}

.datetime-container {
    margin-top: 20px;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.date-display-large {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    color: var(--text-primary);
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 10px;
    width: 100%;
    outline: none;
    transition: all 0.3s ease;
}

.time-display-large {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    width: 100%;
    outline: none;
    transition: all 0.3s ease;
}

.date-char {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 240, 245, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 5px 8px;
    min-width: 35px;
    text-align: center;
    font-weight: bold;
    color: #1f2937;
    text-shadow: none;
}

[data-theme="dark"] .date-char {
    background: rgba(55, 65, 81, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f3f4f6;
}

/* 社交链接 */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.social-link svg {
    width: 24px;
    height: 24px;
}

/* 内容区域 */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-bottom: 40px;
}

/* 文章卡片 */
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    width: 80%;
    max-width: 100%;
    align-self: flex-start;
    
}

/* .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
} */

.article-card.placeholder {
    opacity: 0.95;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.article-card.placeholder .article-image{
    opacity: 0.95;
    display: flex;
    flex-direction: column;
    align-items: center; 

    opacity: 1;
    aspect-ratio: 7 / 5;
    object-fit: cover;
    border-radius: 8px;
    /* border: 2px solid rgba(144, 0, 0, 0.842); */
    position: relative;
    z-index: 0;
    max-height: none;
    max-width: none;
    width: 100px;
    height: 500px;
    border: 2px solid rgba(255, 255, 255, 0.842);
    box-sizing: border-box;
    transition: transform 1s ease;
}  

 

.article-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
    align-self: flex-start;
}

.article-meta .date::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    margin-top: -4px;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.article-meta .category::before {
    content: '🏷️ ';
}

.article-body {
    color: #374151;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 15px;
}

.article-body ul {
    margin: 15px 0 15px 25px;
}

.article-body li {
    margin-bottom: 8px;
}

/* Markdown 样式 */
.markdown-content {
    color: #374151;
    line-height: 1.8;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    color: #1f2937;
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.markdown-content h1 { font-size: 1.8em; }
.markdown-content h2 { font-size: 1.5em; }
.markdown-content h3 { font-size: 1.3em; }

.markdown-content .heading-anchor {
    position: relative;
    scroll-margin-top: 20px;
}

.markdown-content .anchor-link {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
    text-decoration: none;
    
}

.markdown-content .heading-anchor:hover .anchor-link,
.markdown-content .anchor-link:focus {
    opacity: 1;
}

.markdown-content .anchor-link:hover {
    color: var(--primary-color);
}

.markdown-content p {
    margin-bottom: 1em;
}

.markdown-content ul,
.markdown-content ol {
    margin: 1em 0 1em 2em;
}

.markdown-content li {
    margin-bottom: 0.5em;
}

.markdown-content blockquote {
    border-left: 4px solid rgba(37, 153, 255, 0.733);
    background-color: rgba(45, 136, 255, 0.277);
    padding-left: 1em;
    margin: 1em 0;
    /* color: #0505f5; */
    font-style: italic;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    background: rgba(219, 234, 254, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.markdown-content table th {
    background: rgba(109, 187, 255, 0.9);
    color: white;
    font-weight: 600;
    padding: 12px 16px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.markdown-content table th:last-child {
    border-right: none;
}

.markdown-content table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(191, 219, 254, 0.8);
    border-right: 1px solid rgba(191, 219, 254, 0.8);
    text-align: center;
}

.markdown-content table td:last-child {
    border-right: none;
}

.markdown-content table tr:last-child td {
    border-bottom: none;
}

.markdown-content table tr:hover {
    background: rgba(219, 234, 254, 0.5);
}

.markdown-content code {
    background: rgba(0, 0, 0, 0.06);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'HarmonyOS Sans', monospace;
    font-size: 0.9em;

}

.markdown-content pre {
    background: rgba(45, 136, 255, 0.277);
    border: 2px solid rgba(37, 153, 255, 0.733);
    border-radius: 8px;
    padding: 1em;
    overflow-x: auto;
    margin: 1em 0;
    position: relative;
}

.markdown-content pre:hover .copy-btn {
    opacity: 1;
}

.markdown-content pre code {
    background: transparent;
    padding: 0;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

.markdown-content pre code.hljs {
    color: #24292e;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
    color: #cf222e;
}

.hljs-function .hljs-keyword {
    color: #cf222e;
}

.hljs-string,
.hljs-title,
.hljs-name,
.hljs-type,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
    color: #0a3069;
}

.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
    color: #6a737d;
}

.hljs-built_in,
.hljs-class .hljs-title {
    color: #116329;
}

.hljs-number {
    color: #0550ae;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #4b5563;
    opacity: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copy-btn:hover {
    background: #fff;
    color: #1f2937;
}

.copy-btn.copied {
    color: #10b981;
}

@media (max-width: 768px) {
    .copy-btn {
        opacity: 1;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .markdown-content pre {
        padding: 1em;
        padding-top: 2.5em;
    }
}

.markdown-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content strong {
    color: #1f2937;
    font-weight: 600;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 2em 0;
}

/* Markdown 内容中的图片 */
.markdown-content img {
    max-width: 40%;
    height: auto;
    border-radius: 6px;
    margin: 15px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 隐藏文本/剧透样式 */
.spoiler {
    background-color: #1f2937;
    color: transparent;
    border-radius: 4px;
    padding: 0 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.spoiler:hover {
    background-color: #1f2937;
    color: #fff;
}

.spoiler.active {
    background-color: #1f2937;
    color: #fff;
}

@media (max-width: 768px) {
    .spoiler {
        padding: 0 6px;
    }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 230px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    color: #1f2937;
}

/* 视频嵌入样式 */
.video-embed {
    position: relative;
    width: 60%;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video-embed video {
    width: 100%;
    display: block;
    background: #000;
    border-radius: 6px;
}

.video-embed iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    display: block;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .video-embed {
        width: 100%;
        margin: 15px 0;
        border-radius: 8px;
    }
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
    
    .back-to-top svg {
        width: 22px;
        height: 22px;
    }
}

.article-image {
    max-width: 40%;
    height: auto;
    border-radius: 6px;
    margin: 15px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
    }

    .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .profile-card {
        padding: 30px 15px;
    }

    .avatar {
        width: 120px;
        height: 120px;
    }

    .avatar-ring {
        width: 135px;
        height: 135px;
    }

    .name {
        font-size: 1.6rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .article-card {
        padding: 20px;
    }

    .article-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 5px;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .social-link {
        width: 44px;
        height: 44px;
    }

    .social-link svg {
        width: 22px;
        height: 22px;
    }
}



/* ========== 滚动条样式 ========== */
html {
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: rgba(160, 160, 160, 0.6) rgba(220, 220, 220, 0.15);
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(220, 220, 220, 0.15);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(160, 160, 160, 0.6), rgba(140, 140, 140, 0.65));
    border-radius: 8px;
    border: 2.5px solid rgba(220, 220, 220, 0.15);
    background-clip: padding-box;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(180, 180, 180, 0.75), rgba(160, 160, 160, 0.8));
    border: 2.5px solid rgba(200, 200, 200, 0.15);
    background-clip: padding-box;
}

/* 暗色模式 */
[data-theme="dark"] html {
    scrollbar-color: rgba(170, 170, 170, 0.7) rgba(60, 60, 60, 0.25);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: rgba(60, 60, 60, 0.25);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(170, 170, 170, 0.7), rgba(150, 150, 150, 0.75));
    border: 2.5px solid rgba(60, 60, 60, 0.25);
    background-clip: padding-box;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(220, 220, 220, 0.9), rgba(200, 200, 200, 0.9));
    border: 2.5px solid rgba(50, 50, 50, 0.25);
    background-clip: padding-box;
}

/* 移动端适配 */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
    }
    
    ::-webkit-scrollbar-thumb {
        border-width: 2px;
    }
}

@media (max-width: 480px) {
    ::-webkit-scrollbar {
        width: 6px;
    }
}


/* 图片预览模态框 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-bottom: 60px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.modal-image {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    transition: transform 0.1s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

.modal-image.dragging {
    transition: none;
}

.close-modal {
    position: fixed;
    top: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    z-index: 1001;
}

.close-modal:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.modal-controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    z-index: 1001;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.zoom-btn:hover:not([style*="pointer-events: none"]) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.zoom-btn svg {
    color: rgba(255, 255, 255, 0.9);
}

.zoom-level {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 400;
    min-width: 48px;
    text-align: center;
    font-family: 'HarmonyOS Sans', monospace;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 400;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 1);
}

.download-btn svg {
    color: rgba(255, 255, 255, 0.9);
}

.download-btn span {
    color: rgba(255, 255, 255, 0.9);
}

/* 响应式 - 图片预览模态框 */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }

    .modal-image {
        max-height: 70vh;
    }

    .close-modal {
        top: -35px;
        font-size: 32px;
        width: 32px;
        height: 32px;
    }

    .modal-controls {
        gap: 12px;
        padding: 6px 12px;
    }

    .zoom-controls {
        gap: 8px;
    }

    .zoom-btn {
        width: 28px;
        height: 28px;
    }

    .zoom-btn svg {
        width: 18px;
        height: 18px;
    }

    .zoom-level {
        font-size: 13px;
        min-width: 44px;
    }

    .download-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .download-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .modal-image {
        max-height: 60vh;
    }

    .close-modal {
        top: -30px;
        font-size: 28px;
        width: 28px;
        height: 28px;
    }

    .modal-controls {
        gap: 8px;
        padding: 6px 10px;
    }

    .zoom-controls {
        gap: 6px;
    }

    .zoom-btn {
        width: 26px;
        height: 26px;
    }

    .zoom-btn svg {
        width: 16px;
        height: 16px;
    }

    .zoom-level {
        font-size: 12px;
        min-width: 40px;
    }

    .download-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .download-btn svg {
        width: 15px;
        height: 15px;
    }
}

/* 视频播放器样式 */
.video-page-title {
    text-align: center;
    padding: 30px 20px 20px;
}

.video-page-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.video-page-logo {
    max-width: 500px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.video-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    position: relative;
}

.resource-selector {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    z-index: 10;
}

.resource-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.resource-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.resource-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.resource-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.resource-select option {
    background: rgba(30, 30, 30, 0.95);
    color: rgba(255, 255, 255, 0.95);
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* 响应式 - 视频播放器 */
@media (max-width: 768px) {
    .video-page-title {
        padding: 20px 15px 15px;
    }

    .video-page-title h1 {
        font-size: 2rem;
    }

    .video-page-logo {
        max-width: 300px;
    }

    .video-container {
        max-width: 100%;
        border-radius: 8px;
    }

    .video-container video {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .video-page-title {
        padding: 15px 10px 10px;
    }

    .video-page-title h1 {
        font-size: 1.5rem;
    }

    .video-page-logo {
        max-width: 250px;
    }

    .video-container {
        border-radius: 6px;
    }

    .video-container video {
        border-radius: 6px;
    }
}













/* 右侧返回主页按钮 */
.home-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    cursor: pointer;
    color: #1f2937;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.home-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.home-btn svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 768px) {
    .home-btn {
        top: 15px;
        left: 15px;
        width: 44px;
        height: 44px;
    }

    .home-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* 文章布局 - 两栏 */
.article-layout {
    display: flex;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* 侧边栏（目录） */
.sidebar {
    /* background: rgba(255, 255, 255, 0.658); */
    padding: 20px;
    flex-shrink: 0;
    width: 250px;
    position: fixed;
    background: rgba(255, 255, 255, 0.325);
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    /* border: 3px solid rgb(255, 255, 255); */
    border-radius: 0 10px 10px 0; 
    border-width: 0px 10px 0px 0px;  
    /* border-color: rgba(54, 127, 253, 0.671); */
    z-index: 100;
    
}

.toc {
    margin-top: 20px;
}

.toc h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

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

.toc li {
    margin-bottom: 8px;
}

.toc a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.toc a:hover {
    background: rgba(0, 102, 150, 0.1);
}

.toc .toc-level-h2 {
    padding-left: 0;
}

.toc .toc-level-h3 {
    padding-left: 15px;
}

.toc .toc-level-h4 {
    padding-left: 30px;
}

/* 文章内容区 */
.article-content {
    flex: 1;
    min-width: 0;
    margin-left: 270px;
    margin-right: 220px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* 文章右侧目录 */
.article-toc {
    position: fixed;
    right: 0px;
    bottom: 0;
    top: 0px;
    width: 200px;
    height: 100vh;
    overflow-y: auto;
    padding: 15px;
    background: rgba(255, 255, 255, 0.325);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 50;
}

.article-toc h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.article-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-toc li {
    margin-bottom: 6px;
}

.article-toc a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.article-toc a:hover {
    /* color: var(--primary-color); */
    background: rgba(0, 102, 150, 0.1);
    /* border-left-color: var(--primary-color); */
}

.article-toc a.active {
    color: var(--primary-color);
    font-weight: 500;
    border-left-color: var(--primary-color);
}

.article-toc .toc-h1 {
    padding-left: 0;
    font-weight: 600;
}

.article-toc .toc-h2 {
    padding-left: 0;
}

.article-toc .toc-h3 {
    padding-left: 12px;
    font-size: 0.8rem;
}

.article-toc .toc-h4 {
    padding-left: 24px;
    font-size: 0.75rem;
}

.article-toc .toc-h5 {
    padding-left: 36px;
    font-size: 0.7rem;
}

.article-toc .toc-h6 {
    padding-left: 48px;
    font-size: 0.7rem;
}

/* 文章包装器 - 移除卡片背景 */
.article-wrapper {
    padding: 0;
}

.article-wrapper .article-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.article-wrapper .article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.article-wrapper .article-body {
    padding: 0;
}

/* 文章加载动画 */
.article-loading {
    display: flex !important;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    width: 100%;
    flex: 1;
    position: relative;
}

.nb-spinner {
    width: 75px;
    height: 75px;
    margin: 0;
    background: transparent;
    border-top: 5px solid #009688;
    border-right: 5px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: block;
}

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

/* ========== 文章页移动端适配 ========== */

/* 平板设备 */
@media (max-width: 1024px) {
    .article-layout {
        gap: 20px;
    }
    
    .sidebar {
        width: 200px;
        background: rgba(255, 255, 255, 0);
    }
    
    .article-content {
        margin-left: 220px;
    }


}

/* 小平板 / 大手机 - 隐藏侧边栏 */
@media (max-width: 768px) {
    .article-layout {
        flex-direction: column;
        padding: 15px;
        gap: 0;
    }
    
    .sidebar {
        background: rgba(255, 255, 255, 0);
        position: relative;
        width: 100%;
        height: auto;
        max-height: none;
        margin-bottom: 20px;
        border-radius: 10px;
        border-width: 0;
        padding: 15px;
    }
    
    .toc {
        margin-top: 10px;
        display: none;
    }
    
    .toc ul {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .toc li {
        margin-bottom: 0;
    }
    
    .toc a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .article-content {
        margin-left: 0;
        margin-right: 0;
    }
    
    .article-toc {
        display: none;
    }
    
    .back-link {
        margin-bottom: 15px;
    }
    
    .article-wrapper .article-title {
        font-size: 1.5rem;
    }
    
    .article-wrapper .article-image {
        max-height: 250px;
    }
    
    .markdown-content img {
        max-width: 100%;
    }
}

/* 手机设备 */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .sidebar {
        background: rgba(255, 255, 255, 0);
        padding: 12px;
    }

    #tpc{
        display: none;
    }
    
    .toc h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .toc a {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .article-wrapper .article-title {
        font-size: 1.3rem;
    }
    
    .article-wrapper .article-image {
        max-height: 200px;
    }
    
    .markdown-content h1 { font-size: 1.5em; }
    .markdown-content h2 { font-size: 1.3em; }
    .markdown-content h3 { font-size: 1.1em; }
    
    .markdown-content pre {
        padding: 0.8em;
        padding-top: 2.5em;
        font-size: 0.85em;
    }
    
    .footer {
        padding: 15px 0;
        font-size: 0.85rem;
    }
}

.markdown-content .katex-display {
    margin: 1.5em 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.markdown-content .katex {
    font-size: 1.15em;
}

.markdown-content .katex-display > .katex {
    text-align: center;
}

.markdown-content .katex .base,
.markdown-content .katex .strut {
    display: inline-block;
}

.markdown-content .katex .arraycolsep {
    width: 0.5em;
}

.markdown-content .katex .pstrut {
    height: 0;
}

.markdown-content .katex .vlist,
.markdown-content .katex .vlist-r,
.markdown-content .katex .vlist-t,
.markdown-content .katex .vlist-s {
    display: table-cell;
    vertical-align: bottom;
}