/* Tactical Dark 配色方案 - 战术深色版 */

/* font face */
@font-face {
    font-family: "snow-dusted";
    src: url("/fonts/snow-dusted.woff2") format("woff2");
}
@font-face {
    font-family: "OpenSans-Light";
    src: url("/fonts/OpenSans-Light.woff2") format("woff2");
}
@font-face {
    font-family: "TexturaLiberaX-ExtraLight";
    src: url("/fonts/TexturaLiberaX-ExtraLight.woff2") format("woff2");
}

:root{
    --font-s: "snow-dusted";
    --font-o: "OpenSans-Light";
    --font-t: "TexturaLiberaX-ExtraLight";
    
    /* Tactical Dark 配色变量 */
    --bg-primary: #0a0e0a;
    --bg-secondary: #151a15;
    --bg-hover: #2a3a2a;
    --text-primary: #8a9a7a;
    --text-bright: #e8f8e8;
    --text-nav: #7a8a6a;
    --text-dim: #6a7a5a;
    --accent-green: #9fb86f;
    --link-military: #c8c8c8;
    --link-bright: #b8d0a8;
    --meta-orange: #ff6b35;
    --special-orange: #ffa632;
    --special-blue: #008dff;
    --border-subtle: #2a3a2a;
    --border-active: #4a5a4a;
}

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

/* 全局链接样式 */
a {
    color: var(--link-military);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: var(--link-bright);
    text-decoration: none;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    max-width: 900px;
    margin: auto;
    padding-bottom: 40px;
    letter-spacing: 0.2px;
}

h1 {
    font-size: 25px;
    font-weight: lighter;
    font-family: var(--font-o);
    color: var(--text-bright);
}

h2{
    font-size: 20px;
    font-weight: lighter;
    font-family: var(--font-o);
    color: var(--text-bright);
}

h3 {
    font-size: 17px;
    font-family: var(--font-o);
    color: var(--text-bright);
}

/* 导航栏 */
.site-header {
    border-bottom: 1px solid var(--border-subtle);
}

.main-nav {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 80px;
    color: var(--text-bright);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-nav);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-green);
}

/* gif */
.update-gif {
    height: 35px;
}

/* 主要内容 */
section {
    margin: 10px 0;
    font-size: 14px;
}

.homepage {
    margin-top: 10px;
    margin-bottom: 20px;
}

main{
    margin-top: 10px;
}

/* 悬停效果 */
.blog-item:hover,
.share-item:hover,
.note-item:hover {
    border: 1px solid var(--border-active);
    background: var(--bg-secondary);
    transition: all 0.25s ease;
}

/* 文章和博客 */
.single, .blog-post {
    max-width: 800px;
}

.single header, .blog-post header {
    margin-bottom: 2rem;
}

.single h1, .blog-post h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-bright);
}

.meta {
    color: var(--meta-orange);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content {
    font-size: 15px;
    line-height: 1.8;
    min-width: 0;
}

.content h1 {
    margin-bottom: 2rem;
}

.content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-bright);
}

.content p {
    margin-bottom: 1rem;
}

.content ul, .content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

#about {
    margin-bottom: 20px;
}

/* 列表页面 */
.list, .blog-list {
    max-width: 800px;
}

.posts, .blog-posts {
    margin-top: 2rem;
}

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item h2, .blog-item h2 {
    margin-bottom: 0.5rem;
}

.post-title {
    flex: 1;
    min-width: 0;
}

.post-title h2 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.post-title a {
    color: var(--link-military);
    font-size: 15px;
    transition: color 0.25s ease;
}

.post-title a:hover {
    color: var(--link-bright);
}

.post-meta {
    flex-shrink: 0;
    text-align: right;
    color: var(--text-dim);
    font-size: 0.9rem;
    white-space: nowrap;
}

.post-meta .date {
    display: inline;
    color: var(--meta-orange);
    font-weight: 600;
}

.post-meta .tags {
    display: inline;
    font-size: 0.8rem;
    color: var(--meta-orange);
}

.post-meta .tags .tag:hover {
    color: var(--accent-green);
}

.summary {
    margin-top: 0.5rem;
    color: var(--text-dim);
}

.share-more {
    color: var(--special-orange);
    text-shadow: 0px 0px 4px var(--special-orange);
}

/* 博客页面布局 */
.blog-page {
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a:hover {
    color: var(--accent-green);
}

.tag-cloud .tag {
    color: var(--text-dim);
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    transition: background-color 0.3s;
}

.post-meta {
    display: flex;
    gap: 1em;
    align-items: center;
    flex-wrap: wrap;
}

.post-meta .lastmod {
    color: var(--text-dim);
    font-size: 0.9em;
    margin-left: auto;
}

/* 目录 */
.table-of-contents {
    background-color: var(--bg-secondary);
    padding: 1rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-subtle);
}

.table-of-contents h3 {
    margin-bottom: 0.5rem;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
}

.table-of-contents li {
    margin-bottom: 0.25rem;
}

/* 最近更新 */
#recent {
    background: var(--bg-secondary);
    color: #9fb86f;
    text-shadow: 0px 0px 4px #3832ff;
    margin-bottom: 20px;
    font-size: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
}

.recent-updates {
    background-color: var(--bg-secondary);
    padding: 1rem;
}

.update-item h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.update-item time {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* webring */
.webring-icon, .badge-icon {
    max-height: 40px;
}

#webring {
    background: var(--bg-secondary);
    font-size: 10px;
    padding: 8px;
    color: var(--text-dim);
    margin-top: 25px;
    font-family: 'SF Mono', 'Monaco', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* i3bar底部导航 */
.i3bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-active);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 50px;
}

.i3bar-left,
.i3bar-right {
    display: flex;
    gap: 2px;
}

.i3bar a {
    color: var(--text-nav);
    padding: 3px 12px;
    font-size: 15px;
    font-family: monospace;
    transition: all 0.2s ease;
}

.i3bar a:hover,
.i3bar a.active {
    color: #9fb86f;
    text-decoration: none;
    text-shadow: 0px 0px 4px #3832ff;
}

.i3bar-center .footer-info {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.i3bar-center .footer-info a {
    color: var(--text-dim);
    text-decoration: none;
}

.i3bar-center .footer-info a:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

/* Contact联系方式 */
.contact-status {
    display: flex;
    align-items: center;
    gap: 0;
    font-family: monospace;
    font-size: 13px;
}

.contact-item {
    position: relative;
}

.contact-item:not(:last-child)::after {
    content: " | ";
    color: var(--text-dim);
    margin: 0 8px;
}

.contact-item a {
    color: inherit;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* 联系方式颜色 */
.contact-item.email {
    color: var(--accent-green);
}

.contact-item.matrix {
    color: var(--special-blue);
}

.contact-item.gpg {
    color: var(--special-orange);
}

.contact {
    font-size: 13px;
    padding-right: 16px;
    color: var(--accent-green);
}

/* 页脚 */
.site-footer {
    background-color: var(--bg-secondary);
    color: var(--text-bright);
    padding: 2rem 0;
    text-align: center;
}

footer {
    text-align: center;
    font-size: 11px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 12px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.webring a {
    color: var(--text-bright);
}

/* 折叠描述样式 */
.section-description {
    padding-bottom: 1rem;
    font-family: monospace;
}

.section-description summary {
    cursor: pointer;
    font-size: 14px;
    color: var(--special-orange);
    margin-bottom: 8px;
    user-select: none;
    list-style: none;
    position: relative;
    padding-left: 20px;
    transition: color 0.25s ease;
}

.section-description summary:hover {
    color: var(--accent-green);
}

.section-description[open] summary {
    margin-bottom: 10px;
}

.section-description p {
    margin: 0;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.5;
}

.section-description summary::marker,
.section-description summary::-webkit-details-marker {
    display: none;
}

.section-description summary::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid var(--accent-green);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: all 0.25s ease;
}

.section-description[open] summary::before {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid var(--accent-green);
    border-bottom: none;
}

.section-description[open] summary:hover::before {
    border-top-color: var(--link-bright);
}

/* Notes 页面样式 */
.note-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 25px;
}

.note-item .lastmod {
    color: var(--text-dim);
    font-size: 0.9em;
    margin-left: auto;
}

.note-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.note-header h3 {
    margin: 0;
    flex: 1;
    font-size: 1.1rem;
}

.note-header h3 a {
    text-decoration: none;
    color: inherit;
}

.note-header h3 a:hover {
    text-decoration: underline;
}

.lastmod-inline {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: normal;
    white-space: nowrap;
}

.note-meta {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.note-meta .tags {
    margin-left: 0.5rem;
}

.note-meta .tag {
    color: var(--text-dim);
    text-decoration: none;
}

.note-meta .tag:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

/* Share page styles */
.share-page {
    max-width: 1200px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0 2rem;
}

.featured-card {
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    background: var(--bg-secondary);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-primary { 
    background: var(--accent-green); 
    color: var(--bg-primary); 
}

.btn-secondary { 
    background: var(--text-dim); 
    color: var(--text-bright); 
}

.tag {
    display: inline-block;
    color: var(--special-orange);   
}

/* 最新share页面 */
.page-header {
    margin-bottom: 2rem;
}

.last-updated {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.search-section {
    margin-bottom: 2rem;
}

.search-box {
    margin-bottom: 0.5rem;
}

#shareSearch {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem;
    border: 1px solid var(--border-subtle);
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-hint {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 0;
}

.file-browser {
    font-family: 'Courier New', 'Monaco', monospace;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    padding: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .sections {
        grid-template-columns: 1fr;
    }
    
    .home h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1rem;
    }

    .blog-page {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .post-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .post-meta {
        text-align: left;
        align-self: flex-start;
    }
    
    .post-meta .date {
        display: inline;
        margin-right: 1rem;
    }
    
    .post-meta .tags {
        display: inline;
    }

    .i3bar {
        flex-direction: column;
        height: auto;
        padding: 5px;
        gap: 2px;
    }
    
    .i3bar-left,
    .i3bar-right {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .i3bar a,
    .contact-info a {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .contact-info {
        margin-top: 2px;
    }

    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .lastmod-inline {
        font-size: 0.75rem;
    }
}
