@import url('https://fonts.googleapis.com/css2?family=VT323&family=ZCOOL+KuaiLe&family=Press+Start+2P&display=swap');

* {
    line-height: 1.75;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

body {
    font-family: 'VT323', 'ZCOOL KuaiLe', 'Microsoft YaHei', monospace;
    font-size: 18px;
    background: #e0e0e0;
    color: #222;
}

a {
    text-decoration: none;
    color: #0066cc;
}

a:hover {
    color: #000;
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

input:focus, textarea:focus, button:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px #000;
}

/* IE Warning - Pixel Style */
.browsehappy {
    padding: 12px 0;
    background: #ff0044;
    color: #fff;
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    border-bottom: 4px solid #990022;
    text-shadow: 2px 2px 0 #000;
}

.browsehappy a {
    color: #ffff00;
    text-decoration: underline;
    font-weight: bold;
}

.sr-only {
    border: 0;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.clearfix::after {
    content: ' ';
    display: table;
    clear: both;
}

.content-width {
    width: 90%;
    max-width: 864px;
    margin: 0 auto;
    position: relative;
}

/* Header - 兼容原有结构同时支持 animated-header */
#header {
    width: 100%;
    padding-top: 25%;
    background: url("images/header.jpg") bottom;
    background-size: cover;
    position: relative;
    image-rendering: pixelated;
    border-bottom: 4px solid #333;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}

/* Animated Header 兼容 */
#animated-header {
    border-bottom: 4px solid #333;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}

.site-head {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
}

.site-name {
    color: #FFF;
    font-size: 48px;
    font-family: 'ZCOOL KuaiLe', 'Press Start 2P', cursive;
    text-shadow: 4px 4px 0 #000;
    letter-spacing: 2px;
}

.site-description {
    color: #FFF;
    font-size: 20px;
    margin: 8px 0 0 0;
    font-family: 'VT323', monospace;
    text-shadow: 2px 2px 0 #000;
    background: rgba(0,0,0,0.5);
    display: inline-block;
    padding: 2px 8px;
}

/* Navigation - Pixel Buttons */
#nav-menu {
    background: #f0f0f0;
    padding: 12px 0;
    border-bottom: 4px solid #333;
    border-top: 4px solid #fff;
    box-shadow: 0 4px 0 #999;
    font-family: 'VT323', monospace;
    font-size: 20px;
}

#nav-menu a {
    color: #222;
    font-size: 20px;
    line-height: 1.5;
    margin-right: 12px;
    float: left;
    padding: 4px 12px;
    border: 2px solid #333;
    background: #fff;
    box-shadow: 3px 3px 0 #999;
    transition: all 0.05s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#nav-menu a:last-child {
    margin-right: 0;
}

#nav-menu a:hover {
    background: #333;
    color: #fff;
    box-shadow: 2px 2px 0 #666;
    transform: translate(1px, 1px);
    text-decoration: none;
}

#nav-menu a.current {
    color: #fff;
    background: #222;
    box-shadow: inset 2px 2px 0 #000;
    border-color: #000;
}

/* Footer - Pixel Style */
#footer {
    padding: 24px 0;
    background: #666;
    border-top: 4px solid #333;
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 16px;
    box-shadow: inset 0 4px 0 rgba(255,255,255,0.2);
}

.footer-note {
    font-size: 18px;
    text-align: center;
    color: #FFF;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 12px;
}

.site-search {
    margin: 16px auto;
    width: 240px;
    height: 36px;
    position: relative;
}

#site-search {
    line-height: 32px;
    background: #fff;
    border: 3px solid #333;
    font-size: 18px;
    font-family: 'VT323', monospace;
    color: #333;
    border-radius: 0;
    padding-left: 12px;
    padding-right: 36px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    box-shadow: 3px 3px 0 #999;
}

#site-search:focus {
    background: #ffffcc;
    box-shadow: inset 2px 2px 0 rgba(0,0,0,0.1), 2px 2px 0 #666;
}

#site-search::placeholder {
    color: #999;
}

.site-search button {
    position: absolute;
    width: 36px;
    right: 0;
    top: 0;
    line-height: 32px;
    border: 0 none;
    border-left: 3px solid #333;
    padding: 0;
    font-size: 18px;
    color: #333;
    background: #ccc;
    text-align: center;
    cursor: pointer;
}

.site-search button:hover {
    background: #999;
    color: #000;
}

.site-search button:active {
    background: #666;
    color: #fff;
}

.typecho-credit {
    color: #ccc;
    text-align: center;
    font-size: 14px;
    margin-top: 8px;
}

.typecho-credit a {
    color: #ffff00;
    border-bottom: 2px dotted #ffff00;
}

.typecho-credit a:hover {
    background: #ffff00;
    color: #000;
    border-bottom: 2px solid #000;
    text-decoration: none;
}

/* Post General */
.post {
    overflow: hidden;
}

.post-title a {
    color: #000;
}

.post-title a:hover {
    color: #0066cc;
    text-decoration: none;
    border-bottom: 3px solid #0066cc;
}

/* Pixel List Styles - 兼容 index.php 内联样式 */
.pixel-list {
    background: #f0f0f0;
    border: 4px solid #333;
    box-shadow: 4px 4px 0 #666, inset 0 0 0 2px #fff;
    padding: 8px;
    margin-bottom: 20px;
    image-rendering: pixelated;
}

.pixel-list-header {
    background: #333;
    color: #fff;
    font-family: 'ZCOOL KuaiLe', 'VT323', monospace;
    font-size: 16px;
    padding: 8px 12px;
    margin: -8px -8px 8px -8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 #000;
    border-bottom: 2px solid #000;
}

.pixel-post-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 2px dashed #999;
    font-family: 'VT323', 'ZCOOL KuaiLe', monospace;
    font-size: 18px;
    line-height: 1.2;
    transition: all 0.05s;
}

.pixel-post-item:last-child {
    border-bottom: none;
}

.pixel-post-item:hover {
    background: #e0e0e0;
    padding-left: 8px;
    transform: translateX(2px);
}

.pixel-post-item::before {
    content: '►';
    color: #666;
    margin-right: 8px;
    font-size: 12px;
}

.pixel-post-title {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pixel-post-title a {
    color: #222;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.pixel-post-title a:hover {
    color: #0066cc;
    border-bottom-color: #0066cc;
    text-decoration: none;
}

.pixel-meta {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    margin-left: 10px;
    font-family: 'VT323', monospace;
}

.pixel-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pixel-meta i {
    font-size: 16px;
    color: #666;
}

.pixel-cat {
    background: #ddd;
    padding: 2px 8px;
    border: 2px solid #666;
    font-size: 12px;
    color: #333;
    box-shadow: 2px 2px 0 #bbb;
    font-family: 'VT323', monospace;
}

/* Post Meta - 通用 */
.post-meta {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
    font-size: 16px;
    font-family: 'VT323', monospace;
    color: #666;
}

.post-meta li {
    display: inline;
    border-right: 12px solid transparent;
}

.post-meta li:last-child {
    border-right: 0 none;
}

.post-meta li a {
    color: #333;
    border-bottom: 2px dotted #999;
}

.post-meta li a:hover {
    border-bottom: 2px solid #333;
    text-decoration: none;
}

.post-meta i {
    vertical-align: middle;
    font-size: 18px;
    margin-right: 4px;
    color: #666;
}

.post-content {
    color: #333;
    font-size: 18px;
    font-family: 'ZCOOL KuaiLe', 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
}

.post-content a {
    color: #0066cc;
    border-bottom: 2px dotted #0066cc;
    padding: 0 2px;
}

.post-content a:hover {
    color: #fff;
    background: #0066cc;
    border-bottom: 2px solid #000;
    text-decoration: none;
}

.post-content img {
    max-width: 100%;
    border: 3px solid #333;
    box-shadow: 4px 4px 0 #999;
    display: block;
    margin: 16px 0;
}

.post-content blockquote {
    border-left: 4px solid #333;
    padding-left: 16px;
    margin: 16px 0;
    background: #f5f5f5;
    padding: 12px 12px 12px 20px;
    border: 2px solid #333;
    box-shadow: 3px 3px 0 #ccc;
}

.post-content code {
    background: #333;
    color: #0f0;
    padding: 2px 6px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px solid #000;
}

.post-content pre {
    background: #222;
    color: #0f0;
    padding: 12px;
    border: 3px solid #333;
    box-shadow: 4px 4px 0 #666;
    overflow-x: auto;
    font-family: 'VT323', monospace;
    font-size: 16px;
    line-height: 1.4;
}

/* Post List - 兼容原有折叠效果 */
.post-list .post {
    border-bottom: 4px solid #333;
    position: relative;
    background: #fff;
    margin-bottom: 16px;
    box-shadow: 4px 4px 0 #999;
}

.post-list .post.folded {
    max-height: 320px;
    cursor: pointer;
}

.post-list .post.folded::after {
    position: absolute;
    top: 200px;
    bottom: 0;
    width: 100%;
    left: 0;
    content: '';
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 4px,
        rgba(255,255,255,0.8) 4px,
        rgba(255,255,255,0.8) 8px
    );
}

.post-list .post:nth-child(odd) {
    background: #FFFFFF;
}

.post-list .post:nth-child(even) {
    background: #EFEFEF;
}

.post-list .post-title {
    font-size: 24px;
    margin: 20px 0 8px;
    font-family: 'ZCOOL KuaiLe', 'VT323', monospace;
    text-shadow: 1px 1px 0 #ccc;
}

.post-list .post-content {
    margin-top: 12px;
}

.post-list .post.folded .post-content {
    margin-bottom: 20px;
}

/* Pagination - Pixel Art Style */
.page-navigator {
    list-style: none;
    padding: 0;
    margin: 32px 0;
    text-align: center;
    font-family: 'VT323', monospace;
    font-size: 18px;
}

.page-navigator li {
    display: inline-block;
    margin: 0 4px;
}

.page-navigator li a {
    min-width: 40px;
    height: 40px;
    border: 3px solid #333;
    display: inline-block;
    border-radius: 0;
    line-height: 34px;
    color: #333;
    background: #fff;
    box-shadow: 3px 3px 0 #999;
    font-weight: bold;
    transition: all 0.05s;
}

.page-navigator li a:hover {
    background: #333;
    color: #fff;
    box-shadow: 2px 2px 0 #666;
    transform: translate(1px, 1px);
    text-decoration: none;
}

.page-navigator li.current a {
    color: #FFF;
    background: #333;
    box-shadow: inset 2px 2px 0 #000;
    border-color: #000;
}

/* Comment Entrance - Pixel Button */
.comment-entrance {
    color: #FFF;
    line-height: 36px;
    height: 36px;
    border-radius: 0;
    background: #666;
    display: inline-block;
    padding: 0 16px;
    margin-bottom: 20px;
    border: 3px solid #333;
    box-shadow: 3px 3px 0 #999;
    font-family: 'VT323', monospace;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.05s;
}

.comment-entrance:hover {
    background: #333;
    color: #fff;
    box-shadow: 2px 2px 0 #666;
    transform: translate(1px, 1px);
    text-decoration: none;
}

.comment-entrance:active {
    background: #000;
    box-shadow: inset 2px 2px 0 #333;
}

.comment-entrance i {
    vertical-align: middle;
    margin-right: 6px;
    font-size: 18px;
}

.post-list .post.folded .comment-entrance {
    display: none;
}

/* Single Post/Page */
.post-single .post-title {
    font-size: 28px;
    margin: 24px 0 12px;
    font-family: 'ZCOOL KuaiLe', 'VT323', monospace;
    text-shadow: 2px 2px 0 #ccc;
    border-bottom: 4px solid #333;
    padding-bottom: 8px;
}

.post-single .post-content {
    margin-top: 20px;
    margin-bottom: 24px;
}

/* Tags */
.tags {
    font-size: 16px;
    margin: 20px 0;
    color: #333;
    font-family: 'VT323', monospace;
}

.tags i {
    vertical-align: middle;
    font-size: 18px;
    margin-right: 4px;
    color: #666;
}

.tags a {
    color: #333;
    background: #ddd;
    padding: 2px 8px;
    border: 2px solid #666;
    margin-right: 8px;
    display: inline-block;
    box-shadow: 2px 2px 0 #bbb;
    margin-bottom: 4px;
}

.tags a:hover {
    background: #333;
    color: #fff;
    border-color: #000;
    box-shadow: 2px 2px 0 #666;
    text-decoration: none;
    transform: translate(1px, 1px);
}

/* Comments Section - Pixel Style */
#comments {
    background: #f0f0f0;
    overflow: hidden;
    border-top: 4px solid #333;
    border-bottom: 4px solid #333;
    box-shadow: inset 0 4px 0 rgba(255,255,255,0.5);
}

#comments h3 {
    font-size: 20px;
    margin: 20px 0;
    color: #333;
    font-family: 'ZCOOL KuaiLe', 'VT323', monospace;
    border-bottom: 3px solid #333;
    padding-bottom: 8px;
    display: inline-block;
    text-shadow: 1px 1px 0 #fff;
}

.comment-list, .comment-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list li {
    padding: 16px;
    margin-top: 12px;
    border: 3px solid #333;
    background: #FFF;
    font-size: 18px;
    position: relative;
    box-shadow: 4px 4px 0 #999;
    font-family: 'VT323', monospace;
}

.comment-list li.comment-level-odd {
    background: #EFEFEF;
}

.comment-list li.comment-level-even {
    background: #FFF;
}

.comment-list li .comment-reply, .respond .cancel-comment-reply {
    text-align: right;
    font-size: 14px;
    line-height: 1;
    position: absolute;
    top: 16px;
    font-family: 'VT323', monospace;
}

.comment-list li .comment-reply {
    right: 16px;
}

.respond .cancel-comment-reply {
    right: 0;
}

.comment-list li .comment-reply a, .respond .cancel-comment-reply a {
    color: #fff;
    background: #666;
    padding: 4px 8px;
    border: 2px solid #333;
    box-shadow: 2px 2px 0 #999;
    text-decoration: none;
    display: inline-block;
}

.comment-list li .comment-reply a:hover, .respond .cancel-comment-reply a:hover {
    background: #333;
    box-shadow: 1px 1px 0 #666;
    transform: translate(1px, 1px);
    border-bottom: 0;
}

.comment-meta a {
    color: #666;
    font-size: 14px;
    font-family: 'VT323', monospace;
}

.comment-author {
    display: block;
    color: #333;
    line-height: 32px;
    font-size: 18px;
    font-weight: bold;
}

.comment-author .avatar {
    margin-right: 8px;
    vertical-align: middle;
    border: 2px solid #333;
    box-shadow: 2px 2px 0 #999;
    image-rendering: pixelated;
}

.comment-author cite {
    font-weight: bold;
    font-style: normal;
    font-family: 'ZCOOL KuaiLe', 'VT323', monospace;
}

.comment-author cite a {
    color: #333;
    border-bottom: 2px dotted #333;
}

.comment-identity {
    font-size: 18px;
    margin: 0 0 16px;
    color: #333;
    font-family: 'VT323', monospace;
}

.comment-identity a {
    color: #0066cc;
    border-bottom: 2px dotted #0066cc;
}

/* Comment Form - Pixel Inputs */
.comment-input {
    width: 100%;
    max-width: 400px;
    height: 40px;
    position: relative;
    margin: 16px 0;
}

.comment-input input {
    line-height: 36px;
    background: #FFF;
    font-size: 18px;
    color: #000;
    border-radius: 0;
    padding-left: 100px;
    padding-right: 16px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    border: 3px solid #333;
    font-family: 'VT323', monospace;
    box-shadow: 3px 3px 0 #999;
}

.comment-input input:focus {
    background: #ffffcc;
    box-shadow: inset 2px 2px 0 rgba(0,0,0,0.1), 2px 2px 0 #666;
}

.comment-input input::placeholder {
    color: #999;
}

.comment-input label {
    position: absolute;
    width: 90px;
    left: 0;
    top: 0;
    line-height: 34px;
    border: 0 none;
    padding: 0;
    font-size: 16px;
    color: #fff;
    background: #333;
    text-align: center;
    font-family: 'VT323', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    height: 34px;
    margin: 3px;
}

.textarea-label {
    background: #333;
    border-radius: 0;
    display: block;
    width: 100px;
    line-height: 36px;
    font-size: 16px;
    text-align: center;
    color: #fff;
    font-family: 'VT323', monospace;
    text-transform: uppercase;
    margin-bottom: 0;
    border: 3px solid #333;
    border-bottom: 0;
}

.textarea {
    display: block;
    height: 180px;
    color: #000;
    background: #FFF;
    box-sizing: border-box;
    padding: 12px;
    width: 100%;
    max-width: 600px;
    border: 3px solid #333;
    border-radius: 0;
    font-family: 'VT323', monospace;
    font-size: 18px;
    line-height: 1.4;
    box-shadow: 4px 4px 0 #999;
    resize: vertical;
}

.textarea:focus {
    background: #ffffcc;
}

#comment-form .submit {
    background: #666;
    display: block;
    height: 44px;
    line-height: 40px;
    font-size: 18px;
    color: #fff;
    border: 3px solid #333;
    padding: 0;
    text-align: center;
    width: 140px;
    margin-top: 16px;
    border-radius: 0;
    font-family: 'VT323', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 3px 3px 0 #999;
    cursor: pointer;
    transition: all 0.05s;
}

#comment-form .submit:hover {
    background: #333;
    box-shadow: 2px 2px 0 #666;
    transform: translate(1px, 1px);
}

#comment-form .submit:active {
    background: #000;
    box-shadow: inset 2px 2px 0 #333;
}

.comment-list .respond {
    margin-top: 20px;
    border-top: 3px solid #333;
    position: relative;
    padding-top: 16px;
}

.comment-list .respond .comment-input input, .comment-list .respond .textarea {
    border-color: #666;
}

.bottom-padding {
    height: 32px;
}

/* Pixel Scrollbar */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-left: 4px solid #333;
}

::-webkit-scrollbar-thumb {
    background: #666;
    border: 2px solid #f0f0f0;
    box-shadow: inset 0 0 0 2px #333;
}

::-webkit-scrollbar-thumb:hover {
    background: #333;
}

::-webkit-scrollbar-button {
    background: #ccc;
    border: 2px solid #333;
    height: 16px;
    width: 16px;
}

/* Mobile Responsive */
@media (max-width: 960px) {
    body {
        font-size: 16px;
    }
    
    #header {
        padding-top: 240px;
    }

    .site-name {
        font-size: 32px;
        text-shadow: 2px 2px 0 #000;
    }
    
    .site-description {
        font-size: 16px;
    }

    #nav-menu a {
        font-size: 16px;
        padding: 3px 8px;
        margin-right: 8px;
        margin-bottom: 4px;
    }
    
    .post-list .post-title {
        font-size: 20px;
    }
    
    .pixel-post-item {
        flex-wrap: wrap;
        font-size: 16px;
    }
    
    .pixel-meta {
        width: 100%;
        margin-left: 20px;
        margin-top: 4px;
        font-size: 12px;
    }
    
    .pixel-cat {
        font-size: 11px;
    }
    
    .post-single .post-title {
        font-size: 22px;
    }
    
    #comments h3 {
        font-size: 18px;
    }
    
    .comment-list li {
        font-size: 16px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .site-name {
        font-size: 24px;
    }
    
    .content-width {
        width: 95%;
    }
    
    #nav-menu a {
        float: none;
        display: inline-block;
        margin-bottom: 4px;
    }
}
