/*
Theme Name: Invicta
Theme URI: https://github.com/getgridea/invicta-theme
Description: A Typecho adaptation of the Invicta theme
Author: Typecho User
Author URI: https://typecho.org
Version: 1.0.0
License: MIT License
License URI: https://opensource.org/licenses/MIT
Tags: clean, blog, simple, responsive
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    color: #26a69a;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Main layout */
.main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.main-content {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Header */
.site-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.site-title {
    font-size: 32px;
    margin-bottom: 10px;
}

.site-description {
    color: #666;
    margin-bottom: 20px;
}

.menu-container {
    margin-bottom: 20px;
}

.menu {
    display: inline-block;
    margin: 0 10px;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.menu:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

.social-container a {
    display: inline-block;
    margin: 0 5px;
    color: #666;
    font-size: 18px;
}

/* Posts */
.post-container {
    margin-bottom: 40px;
}

.post {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

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

.post-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: #333;
}

.post-info {
    font-size: 15px;
    color: #666;
    margin-bottom: 18px;
}

.post-time {
    margin-right: 10px;
}

.post-tag, .post-tags {
    display: inline-block;
    margin-right: 5px;
    padding: 3px 8px;
    background-color: #f0f0f0;
    border-radius: 3px;
    font-size: 14px;
    color: #666;
}

.post-feature-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    margin-bottom: 15px;
    border-radius: 4px;
}

.post-abstract {
    margin-bottom: 18px;
    color: #555;
    font-size: 17px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-abstract a {
    color: inherit;
    text-decoration: none;
    pointer-events: none;
    cursor: default;
}

/* Post detail */
.post-detail {
    margin-bottom: 40px;
}

.post-detail .post-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.post-content {
    margin: 20px 0;
    line-height: 1.8;
    font-size: 16px;
}

.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {
    margin: 20px 0 10px;
    color: #333;
}

.post-content h1 {
    font-size: 26px;
}

.post-content h2 {
    font-size: 22px;
}

.post-content h3 {
    font-size: 18px;
}

.post-content h4 {
    font-size: 16px;
}

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

.post-content h6 {
    font-size: 14px;
}

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

.post-content blockquote {
    border-left: 4px solid #26a69a;
    padding-left: 20px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
}

.post-content code {
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

.post-content pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Next post */
.next-post {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.next {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 30px 0;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    background-color: #f5f5f5;
    border-radius: 3px;
}

.pagination a:hover {
    background-color: #e0e0e0;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

/* Archives */
.archives-container {
    margin-bottom: 40px;
}

.year {
    font-size: 26px;
    margin: 30px 0 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.year-posts .post {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

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

.year-posts .post-title {
    font-size: 20px;
    margin-bottom: 5px;
}

.year-posts .post-title small {
    color: #999;
    font-size: 14px;
    margin-left: 10px;
}

/* Tags */
.tags-container {
    margin: 30px 0;
}

.tag {
    display: inline-block;
    margin: 0 8px 8px 0;
    padding: 5px 12px;
    background-color: #f0f0f0;
    border-radius: 15px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.tag:hover {
    background-color: #26a69a;
    color: #fff;
    text-decoration: none;
}

.current-tag-container {
    text-align: center;
    margin: 30px 0;
}

.current-tag-container .title {
    font-size: 26px;
    color: #333;
}

/* Comments */
#comments {
    margin: 40px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.comment-list {
    margin-bottom: 30px;
}

.comment-list .comment {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.comment-author {
    margin-bottom: 10px;
}

.comment-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.comment-author .fn {
    font-weight: bold;
    color: #333;
}

.comment-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.comment-content {
    line-height: 1.6;
}

.comment-pagination {
    text-align: center;
    margin: 20px 0;
}

.respond {
    margin-top: 30px;
}

.respond h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group .submit {
    background-color: #26a69a;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.form-group .submit:hover {
    background-color: #219a8e;
}

.cancel-comment-reply {
    margin-bottom: 15px;
}

/* Post navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.prev-post,
.next-post {
    width: 48%;
}

.prev-post {
    text-align: left;
}

.next-post {
    text-align: right;
}

.nav-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.post-navigation .post-title {
    font-size: 18px;
    margin: 0;
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: #26a69a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

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

.scroll-top:hover {
    background-color: #219a8e;
}

/* External link icon */
.external-icon {
    font-size: 12px;
    margin-left: 3px;
    opacity: 0.7;
}

/* Table of contents */
.toc-container {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.toc-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

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

.toc-item {
    margin-bottom: 5px;
}

.toc-item a {
    color: #666;
    text-decoration: none;
    display: block;
    padding: 3px 0;
    transition: color 0.3s;
}

.toc-item a:hover {
    color: #26a69a;
}

.toc-item.toc-h3 {
    padding-left: 20px;
}

.toc-item.toc-h4 {
    padding-left: 40px;
}

/* Mobile menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

/* Search form */
.search-form {
    display: inline-block;
    margin-left: 15px;
    vertical-align: middle;
    display: flex;
    align-items: center;
}

.search-form form {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 20px;
    padding: 5px 15px;
    transition: all 0.3s;
}

.search-form form:hover {
    background-color: #eeeeee;
}

.search-input {
    border: none;
    background: none;
    padding: 5px;
    width: 150px;
    outline: none;
    font-size: 14px;
    color: #333;
}

.search-input::placeholder {
    color: #999;
}

.search-button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
    transition: color 0.3s;
}

.search-button:hover {
    color: #26a69a;
}

.login-button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s;
}

.login-button:hover {
    color: #26a69a;
}

/* Search results */
.page-title {
    margin-bottom: 30px;
    text-align: center;
}

.page-title h2 {
    font-size: 30px;
    color: #333;
    margin-bottom: 10px;
}

.search-count {
    color: #666;
    font-size: 18px;
}

.search-no-results {
    text-align: center;
    padding: 40px 0;
}

.search-no-results h3 {
    font-size: 26px;
    color: #333;
    margin-bottom: 15px;
}

.search-no-results p {
    color: #666;
    margin-bottom: 20px;
}

.search-no-results .search-form {
    display: block;
    margin: 0 auto;
    max-width: 400px;
}

.search-no-results .search-form form {
    width: 100%;
}

.search-no-results .search-input {
    width: 100%;
}

/* Categories Page */
.categories-container {
    margin: 40px 0;
}

.categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-name {
    margin: 0 0 10px 0;
    font-size: 22px;
}

.category-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-name a:hover {
    color: #4a90e2;
}

.category-description {
    color: #666;
    margin: 0 0 10px 0;
    font-size: 16px;
}

.category-count {
    color: #999;
    margin: 0;
    font-size: 14px;
}

/* Archive Page */
.archives-container {
    margin: 40px 0;
}

.archive-group {
    margin-bottom: 30px;
}

.archive-title {
    font-size: 26px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.archive-list {
    margin-left: 20px;
}

.archive-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.archive-date {
    color: #999;
    font-size: 14px;
    margin-right: 15px;
    min-width: 50px;
}

.archive-title {
    flex: 1;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.archive-title:hover {
    color: #4a90e2;
}

.archive-comments {
    color: #999;
    font-size: 14px;
}

/* Tags Page */
.tags-container {
    margin: 40px 0;
}

.tags-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tag-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tag-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tag-name {
    margin: 0 0 10px 0;
    font-size: 22px;
}

.tag-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tag-name a:hover {
    color: #4a90e2;
}

.tag-count {
    color: #999;
    margin: 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tags-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tag-item {
        padding: 15px;
    }
    
    .tag-name {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .tags-container {
        margin: 20px 0;
    }
    
    .tag-item {
        padding: 12px;
    }
    
    .tag-name {
        font-size: 18px;
    }
}

/* Tag Page Specific Styles */
.post-list {
    margin-top: 30px;
}

.post-list .post {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.post-list .post:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.post-list .post-title {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-list .post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-list .post-title a:hover {
    color: #4a90e2;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.post-meta time {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.post-meta time::before {
    content: "📅";
    margin-right: 5px;
}

.post-meta .category {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.post-meta .category::before {
    content: "📁";
    margin-right: 5px;
}

.post-meta .category a {
    color: #4a90e2;
    text-decoration: none;
}

.post-meta .category a:hover {
    text-decoration: underline;
}

.post-meta .tags {
    display: flex;
    align-items: center;
}

.post-meta .tags::before {
    content: "🏷️";
    margin-right: 5px;
}

.post-meta .tags a {
    color: #666;
    text-decoration: none;
    margin-right: 5px;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.post-meta .tags a:hover {
    background: #4a90e2;
    color: #fff;
}

.post-excerpt {
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 16px;
}

.post-read-more {
    text-align: right;
    margin-top: 15px;
}

.post-read-more a {
    display: inline-block;
    padding: 8px 20px;
    background: #4a90e2;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.post-read-more a:hover {
    background: #3a7bc8;
    transform: translateY(-2px);
}

.page-navigator {
    text-align: center;
    margin: 40px 0;
}

.page-navigator a {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #f5f5f5;
    color: #333;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-navigator a:hover {
    background: #4a90e2;
    color: #fff;
}

.no-posts {
    text-align: center;
    padding: 40px 0;
    color: #999;
}

.no-posts p {
    font-size: 18px;
    margin-bottom: 20px;
}

.no-posts::before {
    content: "📭";
    display: block;
    font-size: 48px;
    margin-bottom: 20px;
}

/* Post Category */
.post-category {
    color: #4a90e2;
}

/* Copyright Notice */
.copyright-notice {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-left: 4px solid #4a90e2;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: flex-start;
}

.copyright-icon {
    font-size: 24px;
    color: #4a90e2;
    margin-right: 15px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.copyright-text {
    flex: 1;
}

.copyright-text p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.copyright-text strong {
    color: #333;
    font-weight: 600;
}

.copyright-text a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.copyright-text a:hover {
    color: #3a7bc8;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .main {
        padding: 10px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .post-title {
        font-size: 22px;
    }
    
    .post-detail .post-title {
        font-size: 28px;
    }
    
    .copyright-notice {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .copyright-icon {
        margin-bottom: 10px;
        margin-right: 0;
    }
}
    
    .post-navigation {
        flex-direction: column;
    }
    
    .prev-post,
    .next-post {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .next-post {
        text-align: left;
    }
    
    .menu-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-form {
        width: 100%;
        margin-top: 10px;
        text-align: center;
        justify-content: center;
    }
    
    .search-form form {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .search-input {
        width: 100%;
    }
    
    .login-button {
        margin-left: 5px;
    }
    
    /* Categories Responsive */
    .categories-list {
        grid-template-columns: 1fr;
    }
    
    /* Archive Responsive */
    .archive-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .archive-date {
        margin-bottom: 5px;
    }
    
    .archive-comments {
        margin-top: 5px;
    }
    
    /* Tags Responsive */
    .tags-cloud {
        justify-content: flex-start;
    }
    
    .scroll-top {
        bottom: 20px;
        right: 20px;
    }
/* 修复：移除多余的右大括号，保持样式表结构完整 */
