:root {
    --primary-gold: #ffcc00;
    --primary-gold-dark: #e6b800;
    --primary-gold-light: #ffe680;
    --secondary-gold: #b38600;
    --secondary-gold-hover: #d4ac0d;
    --bg-main: #fcfcf9;
    --bg-sidebar: #fcfbf6;
    --bg-body: #dcdde1;
    --bg-header: #2c2c2c;
    --bg-nav: #e6e6e6;
    --bg-footer: #222;
    --bg-highlight: #fff9c4;
    --bg-code: #222;
    --text-primary: #444;
    --text-secondary: #888;
    --text-dark: #222;
    --text-light: #fff;
    --border-light: #e0e0e0;
    --border-medium: #ccc;
    --border-dark: #999;
    
    --font-body: "Verdana", "SimSun", "宋体", sans-serif;
    --font-serif: "Georgia", "SimSun", serif;
    --font-mono: "Courier New", monospace;
    --font-kai: "楷体", "KaiTi", serif;
    
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
    
    --waline-theme-color: #ffcc00 !important;
    --waline-active-color: #e6b800 !important;
    --waline-bgcolor: #fff !important;
    --waline-bgcolor-light: #fffcf5 !important;
}


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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    background-image:
        linear-gradient(rgba(20, 18, 10, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 18, 10, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    color: var(--secondary-gold);
    text-decoration: underline;
}

a:hover {
    color: var(--secondary-gold-hover);
    background-color: transparent;
}


#container {
    width: 95%;
    max-width: 1140px;
    margin: var(--spacing-xl) auto;
    background-color: var(--bg-main);
    border: 1px solid var(--border-dark);
    box-shadow: 0 0 0 1px #fff inset, 
                0 0 15px rgba(255, 204, 0, 0.15), 
                5px 5px 10px rgba(0, 0, 0, 0.2);
}

#content-wrap {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

#main {
    display: table-cell;
    width: 72%;
    padding: var(--spacing-xl);
    vertical-align: top;
    background-color: #fff;
}

#sidebar {
    display: table-cell;
    width: 28%;
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-medium);
    padding: 25px;
    vertical-align: top;
    box-shadow: inset 5px 0 10px -5px rgba(0, 0, 0, 0.05);
}


#header {
    background-color: var(--bg-header);
    height: 180px;
    padding: 40px 25px;
    border-bottom: 3px solid var(--primary-gold);
    position: relative;
    overflow: hidden;
    background-image:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3) 1px, transparent 1px, transparent 3px),
        linear-gradient(to bottom, rgba(255, 204, 0, 0.2), rgba(0, 0, 0, 0.6));
    background-size: 100% auto;
    background-position: center;
    background-blend-mode: overlay, multiply, normal;
}

#header::after {
    content: attr(data-annotation);
    position: absolute;
    right: var(--spacing-sm);
    bottom: var(--spacing-xs);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--primary-gold);
    opacity: 0.8;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px #000;
}

#header h1 {
    font-family: var(--font-serif);
    font-size: 32px;
    letter-spacing: 2px;
    color: var(--text-light);
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.8), 2px 2px 0 #000;
    margin-top: var(--spacing-sm);
}

#header .subtitle {
    font-size: 12px;
    color: var(--primary-gold-light);
    margin-top: var(--spacing-xs);
    font-family: Arial, sans-serif;
    text-shadow: 1px 1px 1px #000;
    background: rgba(0, 0, 0, 0.4);
    display: inline-block;
    padding: 2px var(--spacing-xs);
}


#nav {
    background-color: var(--bg-nav);
    border-bottom: 1px solid #bbb;
    border-top: 1px solid #fff;
    padding: 0;
    min-height: 35px;
    line-height: 35px;
}

#nav ul {
    list-style: none;
    padding-left: var(--spacing-lg);
}

#nav li {
    display: inline-block;
    margin-right: var(--spacing-xs);
}

#nav a {
    padding: 0 var(--spacing-md);
    height: 35px;
    border-right: 1px solid #dcdcdc;
    color: var(--text-primary);
}

.glass-mosaic-style {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: all 0.2s;
    position: relative;
    cursor: pointer;
}

.glass-mosaic-style:hover,
.search-btn:hover,
.submit-btn:hover {
    color: #5d4037 !important;
    background-color: var(--bg-highlight) !important;
    background-image:
        linear-gradient(45deg, rgba(255, 215, 0, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 215, 0, 0.3) 50%, rgba(255, 215, 0, 0.3) 75%, transparent 75%, transparent),
        linear-gradient(rgba(255, 204, 0, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 204, 0, 0.2) 1px, transparent 1px) !important;
    background-size: 4px 4px, 10px 10px, 10px 10px !important;
    box-shadow: inset 0 0 5px rgba(255, 255, 200, 0.9), 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--primary-gold) !important;
}


.breadcrumb {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px dashed #eee;
    padding-bottom: var(--spacing-xs);
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 var(--spacing-xs);
    color: var(--border-medium);
}

.article-wrap {
    margin-bottom: 40px;
}

.article-title,
.page-title {
    font-size: 24px;
    font-family: var(--font-serif);
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    border-left: 8px solid var(--primary-gold);
    padding-left: var(--spacing-md);
    line-height: 1.3;
}

.page-title {
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid #eee;
    padding-bottom: var(--spacing-sm);
}

.article-meta,
.post-meta {
    font-size: 12px;
    color: #777;
    background: #fdfdf0;
    padding: 8px var(--spacing-sm);
    border: 1px solid var(--border-light);
    border-top-color: #fff;
    border-bottom-color: #e0d0a0;
    margin-bottom: var(--spacing-md);
    font-family: Arial, sans-serif;
}

.article-meta {
    margin-bottom: 25px;
    color: var(--text-secondary);
}

.post-meta {
    margin-bottom: var(--spacing-md);
    background: #fff9e6;
    border-bottom-color: #f1e6c6;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.article-content,
.page-content,
.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    text-align: justify;
}

.post-content {
    font-size: 15px;
}

.article-content p,
.page-content p,
.post-content p {
    margin-bottom: 18px;
    text-indent: 2em;
}

.post-content p {
    margin-bottom: 12px;
}

.article-content h2,
.page-content h2 {
    font-size: 20px;
    color: #443300;
    margin-top: 35px;
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: var(--spacing-xs);
}

.article-content h3,
.page-content h3 {
    font-size: 18px;
    color: #665500;
    margin-top: 25px;
    margin-bottom: var(--spacing-sm);
    padding-left: var(--spacing-sm);
    border-left: 4px solid var(--primary-gold-dark);
    background: linear-gradient(to right, #fffcf0, transparent);
}

.article-content ul,
.article-content ol,
.page-content ul,
.page-content ol {
    margin: var(--spacing-md) 0 var(--spacing-md) 40px;
}

.article-content li p,
.page-content li p {
    text-indent: 0;
}


.article-content pre,
.page-content pre {
    background: var(--bg-code);
    color: var(--primary-gold);
    padding: var(--spacing-md);
    border: 1px solid #444;
    border-left: 4px solid var(--primary-gold);
    overflow-x: auto;
    font-family: var(--font-mono);
    margin: var(--spacing-lg) 0;
    font-size: 13px;
}

pre.line-numbers {
    padding-left: 2.8em;
}

pre.line-numbers code {
    white-space: pre;
}

.prism-toolbar .toolbar-item {
    color: var(--text-light);
}

.article-content code,
.page-content code {
    background: #f5f5f5;
    padding: 2px var(--spacing-xs);
    border: 1px solid var(--border-light);
    font-family: var(--font-mono);
    font-size: 14px;
    color: #d35400;
}

.article-content pre code,
.page-content pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}


.article-content blockquote,
.page-content blockquote {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: #ffffe0;
    border: 1px dashed var(--primary-gold-dark);
    color: #665500;
    font-family: var(--font-kai);
    font-style: italic;
    font-size: 16px;
}

.article-content blockquote p,
.page-content blockquote p {
    text-indent: 0;
}


.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px auto;
}

.article-content figure {
    margin: 12px 0;
    text-align: center;
}

.article-content figcaption {
    font-size: 12px;
    color: #777;
    margin-top: 6px;
}


.post,
.posts-list .post-item {
    margin-bottom: 25px;
    border: 1px solid #e9e9e9;
    padding: 18px;
    background: #fff;
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.03);
}

.post {
    margin-bottom: 35px;
    border-color: var(--border-light);
    padding: var(--spacing-lg);
    box-shadow: 2px 2px 0px #eee;
}

.posts-list .post-item {
    margin-bottom: 26px;
    padding: 16px;
}

.post-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    border-left: 6px solid var(--primary-gold);
    padding-left: 12px;
}

.posts-list .post-item .post-title {
    border-left-width: 8px;
    padding-left: 14px;
}

.post-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--secondary-gold);
}

.posts-list .post-item .excerpt {
    margin: 12px 0;
    font-size: 15px;
    line-height: 1.8;
    text-align: justify;
}

.posts-list .post-item .excerpt p {
    margin-bottom: 12px;
    text-indent: 2em;
}

.posts-list .post-item a.read-more {
    color: var(--secondary-gold);
    font-weight: 700;
}


.archive-header {
    background-color: #fff8e1;
    border: 2px dashed #e0d0a0;
    padding: 18px 22px;
    margin-bottom: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: 18px;
}

.archive-icon {
    margin-left: 4px;
    display: flex;
    align-items: center;
}

.archive-icon img {
    max-height: 48px;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
}

.archive-title-group h2 {
    font-size: 24px;
    margin: 0;
    color: #5d4037;
    line-height: 1.2;
    font-weight: 700;
}

.archive-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}


.widget {
    margin-bottom: 25px;
    background: #fff;
    border: 1px solid #dcdcdc;
    padding: var(--spacing-md);
    font-size: 13px;
}

.widget-title {
    font-size: 13px;
    font-weight: bold;
    background: #fff8e1;
    padding: var(--spacing-xs);
    margin: -15px -15px var(--spacing-md) -15px;
    border-bottom: 1px solid #e0d0a0;
    color: #5d4037;
    text-transform: uppercase;
}

.widget ul {
    list-style-type: none;
    padding: 0 var(--spacing-xs);
}

.widget li {
    margin-bottom: 8px;
    border-bottom: 1px dotted #eee;
    padding-bottom: 4px;
}

.widget li:before {
    content: "» ";
    color: var(--primary-gold);
}

#widget-active a.active,
.widget li a.active,
.widget ul li a.active {
    color: var(--secondary-gold-hover);
    font-weight: 700;
    text-decoration: none;
}

.widget ul li a.active:before {
    content: "» ";
    color: var(--primary-gold);
}


#toc-widget {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    z-index: 100;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

#toc-widget.is-stuck {
    opacity: 0.6;
}

#toc-widget.is-stuck:hover {
    opacity: 1;
}

#toc-sentinel {
    width: 1px;
    height: 1px;
    visibility: hidden;
    margin-bottom: -1px;
}

#toc-list {
    list-style: none;
    padding: 0 var(--spacing-xs);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

#toc-list::-webkit-scrollbar {
    width: 6px;
}
#toc-list::-webkit-scrollbar-thumb {
    background-color: var(--primary-gold);
    border-radius: 3px;
}
#toc-list::-webkit-scrollbar-track {
    background-color: #f0f0f0;
}

#toc-list li {
    margin-bottom: 8px;
    border-bottom: 1px dotted #eee;
    padding-bottom: 4px;
    line-height: 1.4;
}

#toc-list li:before {
    content: none;
}

#toc-list a {
    text-decoration: none;
    color: #555;
    display: block;
    font-size: 13px;
    transition: color 0.2s;
}

#toc-list a:hover {
    color: var(--secondary-gold);
    background: var(--bg-highlight);
}

.toc-h2 {
    padding-left: 0;
    font-weight: bold;
}

.toc-h3 {
    padding-left: var(--spacing-md);
    color: var(--text-secondary);
}

.toc-h3::before {
    content: "└ ";
    color: var(--primary-gold);
}


.mobile-toc-wrap {
    display: none;
    margin-bottom: 25px;
    border: 1px solid #dcdcdc;
    background: #fff;
}

.mobile-toc-wrap details {
    padding: var(--spacing-sm);
    background: #fff8e1;
}

.mobile-toc-wrap summary {
    cursor: pointer;
    font-weight: bold;
    color: #5d4037;
    font-size: 13px;
    user-select: none;
    outline: none;
}

.mobile-toc-wrap summary::marker {
    color: var(--primary-gold);
}

.mobile-toc-list {
    list-style: none;
    margin-top: var(--spacing-sm);
    padding-left: var(--spacing-xs);
    border-top: 1px dashed #e0d0a0;
    padding-top: var(--spacing-xs);
}

.mobile-toc-list li {
    line-height: 1.8;
    font-size: 14px;
}

.mobile-toc-list a {
    text-decoration: none;
    color: var(--text-primary);
}


.search-status-bar {
    background: #fff8e1;
    border: 1px solid #e0d0a0;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    font-family: Arial, sans-serif;
}

.search-keyword {
    color: #d35400;
    font-weight: bold;
}

.search-result-item {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px dotted var(--border-medium);
}

.search-result-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: var(--spacing-sm);
}

.search-result-snippet {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.search-btn {
    background: #f0f0f0;
    border: 1px solid var(--border-dark);
    padding: 4px 12px;
    font-size: 12px;
    height: 32px;
    vertical-align: middle;
}

input[type="text"] {
    width: 95%;
    padding: var(--spacing-xs);
    border: 2px solid var(--border-medium);
    border-left-color: var(--border-dark);
    border-top-color: var(--border-dark);
    font-size: 13px;
    height: 32px;
}

input[type="text"]:focus {
    background-color: #ffffe0;
    border-color: var(--primary-gold);
    outline: none;
}


.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tags-cloud .tag-link {
    display: inline-block;
    color: var(--secondary-gold);
    text-decoration: none;
    padding: 2px var(--spacing-xs);
}

.tag-link:hover {
    background-color: #fffcf5;
}

.tag-group {
    margin-bottom: var(--spacing-xl);
}

.tag-group-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-gold);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
}

.tag-icon {
    margin-right: 8px;
    font-size: 20px;
}

.tag-post-list {
    list-style: none;
    padding-left: var(--spacing-sm);
}

.tag-post-item {
    display: flex;
    align-items: baseline;
    margin-bottom: var(--spacing-sm);
    border-bottom: 1px dotted #eee;
    padding-bottom: 8px;
}

.tag-post-date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--border-dark);
    margin-right: var(--spacing-md);
    min-width: 90px;
}

.tag-post-link {
    font-size: 15px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: bold;
}

.tag-post-link:hover {
    color: var(--secondary-gold);
    text-decoration: underline;
    background-color: #fffcf0;
}

.comments-section {
    background: #fffcf5;
    border: 1px solid var(--border-light);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.skill-bar-container {
    width: 100%;
    background: #eee;
    border: 1px solid var(--border-medium);
    height: 15px;
    margin-bottom: var(--spacing-sm);
    position: relative;
}

.skill-bar-fill {
    height: 100%;
    background: repeating-linear-gradient(45deg, var(--primary-gold), var(--primary-gold) 10px, var(--primary-gold-dark) 10px, var(--primary-gold-dark) 20px);
    width: 0;
    display: block;
}

.skill-label {
    font-size: 12px;
    margin-bottom: 2px;
    font-weight: bold;
    color: #555;
}

.rss-btn {
    background: linear-gradient(var(--primary-gold), #ffaa00);
    color: black !important;
    padding: 4px var(--spacing-sm);
    font-size: 11px;
    border: 1px solid #cc8800;
    border-radius: 2px;
    text-decoration: none !important;
    font-weight: bold;
    display: inline-block;
}

#footer {
    background-color: var(--bg-footer);
    color: var(--text-secondary);
    padding: var(--spacing-lg);
    text-align: center;
    font-size: 12px;
    border-top: 4px solid var(--primary-gold);
}

#footer a {
    color: var(--border-dark);
    text-decoration: none;
}

#footer a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

@media screen and (max-width: 768px) {
    #container {
        width: 100%;
        border: none;
    }

    #content-wrap,
    #main,
    #sidebar {
        display: block;
        width: 100%;
    }

    #sidebar {
        border-left: none;
        border-top: 1px solid var(--border-medium);
        background-color: #f2f2f2;
    }

    #header {
        height: auto;
    }

    #nav {
        height: auto;
        text-align: center;
    }

    #toc-widget {
        display: none !important;
    }

    .mobile-toc-wrap {
        display: block;
    }

    .article-content {
        font-size: 17px;
    }
}
