/* ---
post.css specific styles for the article archive page
--- */
.archive-page-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 0 1rem;
}
.archive-main-content {
    display: none; /* Hide original container, we use a new layout */
}

.archive-articles-container {
    flex: 1; 
    min-width: 0;
    /* This container doesn't need a background, the inner list items will have it */
}

.archive-header {
    margin-bottom: 2rem;
    text-align: center;
}

.archive-title {
    font-size: 2.5rem;
    margin: 0 0 1.5rem 0;
    color: rgba(255, 255, 255, 0.9);
}

.archive-sidebar {
    width: 300px; /* Narrower sidebar */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 90px;
}

.sidebar-card .card-title {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    color: white;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.search-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

#archive-search {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#archive-search:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.5);
}

.search-wrapper .fa-search {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
}

.archive-section {
    margin-bottom: 0;
}

.archive-year-group {
    margin-bottom: 2.5rem;
}

.archive-year {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.archive-list {
    list-style: none;
    padding: 0;
    border-left: none;
}

.archive-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.archive-item:hover {
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.archive-date {
    width: 60px;
    font-family: monospace;
    color: rgba(255, 255, 255, 0.7);
}

.archive-link {
    color: #fff;
    text-decoration: none;
    flex-grow: 1;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.archive-link:hover {
    color: #60a5fa;
}

.archive-item.hidden {
    display: none;
}

.categories-container,
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.category-item,
.tag-item {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.category-item:hover,
.tag-item:hover {
    background: rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.8);
    transform: translateY(-2px);
}

.category-item.active,
.tag-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: bold;
}

.category-count {
    font-size: 0.8em;
    margin-left: 0.5rem;
    padding: 0.1rem 0.4rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* ---
Styles for Single Post Pages (w*.html)
--- */

.post-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.post-cover {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.post-title {
    font-size: 2.2rem;
    margin: 0 0 1rem 0;
    color: #fff;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.post-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-body {
    line-height: 1.8;
    font-size: 1.05rem;
}

.post-body h2 {
    font-size: 1.8rem;
    color: #fff;
    margin: 2.5rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.post-body .post-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.post-body .post-link:hover {
    border-bottom-color: #60a5fa;
}

.post-footer {
    margin-top: 3rem;
}

.comments-section h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .post-content {
        padding: 1.5rem;
    }

    .post-title {
        font-size: 1.8rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
}