/* 存档页面基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Public Sans Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
}

/* 主内容容器 */
.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 页面标题 */
.page-header {
    background: linear-gradient(135deg, #162e51 0%, #1e3a5f 100%);
    color: white;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* 统计卡片 */
.archive-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    border-top: 4px solid #E0B93C;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #162e51;
    display: block;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* 筛选栏 */
.filter-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #333;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.filter-group input[type="text"] {
    min-width: 250px;
}

.search-btn {
    background-color: #E0B93C;
    color: #1b1b1b;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #c9a535;
}

/* 分类浏览 */
.category-section {
    margin-bottom: 2rem;
}

.category-section h2 {
    color: #162e51;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #E0B93C;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    color: #162e51;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.category-count {
    display: inline-block;
    background: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #555;
}

/* 存档列表 */
.archive-section {
    margin-bottom: 2rem;
}

.archive-section h2 {
    color: #162e51;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #E0B93C;
}

.archive-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 存档条目 */
.archive-item {
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.archive-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.archive-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.archive-content {
    flex: 1;
}

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.archive-title {
    flex: 1;
}

.archive-title h3 {
    color: #162e51;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.archive-id {
    color: #666;
    font-size: 0.9rem;
    font-family: monospace;
}

.archive-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-classified {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-restricted {
    background-color: #fff3cd;
    color: #856404;
}

.badge-public {
    background-color: #d4edda;
    color: #155724;
}

.badge-top {
    background-color: #721c24;
    color: white;
}

.archive-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    color: #666;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.archive-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.archive-description {
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.archive-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #555;
}

.archive-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.archive-link {
    color: #162e51;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.archive-link:hover {
    color: #E0B93C;
}

.archive-date {
    color: #888;
    font-size: 0.85rem;
    margin-left: auto;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #162e51;
    color: white;
    border-color: #162e51;
}

.pagination .current {
    background-color: #E0B93C;
    color: #1b1b1b;
    border-color: #E0B93C;
    font-weight: 600;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

/* 存档详情页样式 (用于子页面) */
.archive-detail {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.archive-detail-header {
    border-bottom: 2px solid #E0B93C;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.archive-detail-title {
    font-size: 2rem;
    color: #162e51;
    margin-bottom: 1rem;
}

.archive-detail-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    color: #666;
}

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

.archive-content h4 {
    color: #162e51;
    margin: 1.5rem 0 0.75rem;
    font-size: 1.2rem;
}

.archive-content p {
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.8;
}

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

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

.document-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    border-left: 4px solid #E0B93C;
}

.document-section h4 {
    color: #162e51;
    margin-bottom: 1rem;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.warning-box strong {
    color: #856404;
}

.classified-stamp {
    display: inline-block;
    background: #721c24;
    color: white;
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #721c24;
    transform: rotate(-5deg);
    margin: 1rem 0;
}

/* 返回按钮 */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #162e51;
    text-decoration: none;
    margin-bottom: 1rem;
    font-weight: 500;
}

.back-link:hover {
    color: #E0B93C;
}

/* 相关文档 */
.related-documents {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e6e6e6;
}

.related-documents h4 {
    color: #162e51;
    margin-bottom: 1rem;
}

.related-list {
    list-style: none;
}

.related-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.related-item a {
    color: #162e51;
    text-decoration: none;
    font-weight: 500;
}

.related-item a:hover {
    color: #E0B93C;
}

/* 折叠栏组件 */
.accordion {
    background: white;
    border: 2px solid #162e51;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.accordion-header:hover {
    background: #f8f9fa;
}

.accordion-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.accordion-toggle {
    width: 32px;
    height: 32px;
    border: 2px solid #162e51;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    background: white;
}

.accordion-toggle svg {
    width: 16px;
    height: 16px;
    fill: #162e51;
    transition: transform 0.3s;
}

.accordion.active .accordion-toggle svg {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border-left: 4px solid #E0B93C;
}

.accordion.active .accordion-content {
    max-height: 500px;
}

.accordion-body {
    padding: 1rem 1.5rem;
}

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

.accordion-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #005ea2;
    font-weight: 500;
}

.accordion-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #005ea2;
    border-radius: 50%;
}

.accordion-list li a {
    color: #005ea2;
    text-decoration: none;
}

.accordion-list li a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .archive-container {
        padding: 1rem;
    }

    .page-header {
        padding: 2rem 1rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group input[type="text"] {
        min-width: auto;
        width: 100%;
    }

    .archive-item {
        flex-direction: column;
    }

    .archive-icon {
        font-size: 2rem;
    }

    .archive-header {
        flex-direction: column;
    }

    .archive-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .archive-detail {
        padding: 1.5rem;
    }

    .archive-detail-title {
        font-size: 1.5rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }
}
