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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: white;
}

.lang-switch {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.lang-switch a {
    margin: 0 0.5rem;
}

.lang-switch a.active {
    color: white;
    font-weight: 600;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    width: 250px;
    font-size: 0.9rem;
}

.search-box button {
    padding: 0.5rem 1.5rem;
    background: #4299e1;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #3182ce;
}

/* Main Content */
.main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Footer Styles */
.footer {
    background: #1a202c;
    color: #a0aec0;
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    background: #171923;
    padding: 1rem 0;
    text-align: center;
    margin-top: 2rem;
}

/* 通用卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 10px;
}

.card h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

/* 标准卡片 */
.standard-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow 0.2s;
    cursor: pointer;
    height: 100%;
}

.standard-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.standard-card .header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.standard-card .code-badge {
    background: #ebf8ff;
    color: #2b6cb0;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 统一的状态徽章样式 */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 状态1: 现行标准 (active) */
.status-badge.status-1 {
    background: #c6f6d5;
    color: #22543d;
}

/* 状态2: 即将实施 (pending) */
.status-badge.status-2 {
    background: #feebc8;
    color: #744210;
}

/* 状态3: 被代替 (replaced) */
.status-badge.status-3 {
    background: #fed7d7;
    color: #742a2a;
}

/* 状态4: 废止 (abolished) */
.status-badge.status-4 {
    background: #e2e8f0;
    color: #4a5568;
}

/* 状态5: 废止并转化 (abolished_transferred) */
.status-badge.status-5 {
    background: #e2e8f0;
    color: #4a5568;
}

.standard-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c5282;
}

.standard-card .meta {
    color: #718096;
    font-size: 0.85rem;
}

.standard-card .summary {
    color: #718096;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* 侧边栏 */
.sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.sidebar h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.sidebar ul {
    list-style: none;
}

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

.sidebar details {
    cursor: pointer;
}

.sidebar summary {
    font-weight: 600;
    color: #2c5282;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar summary:hover {
    background: #f7fafc;
}

.sidebar ul ul {
    margin-top: 0.5rem;
    padding-left: 1rem;
}

.sidebar ul ul li {
    padding: 0.3rem 0;
}

.sidebar ul ul a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
}

.sidebar ul ul a:hover,
.sidebar ul ul a.active {
    color: #2b6cb0;
    font-weight: 600;
}

/* 分页 */
.pagination {
    margin-top: 2rem;
    text-align: center;
}

/* 分类树样式 */
.category-tree {
    list-style: none;
}

.category-tree li {
    margin-bottom: 0.25rem;
}

.category-tree a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.category-tree a:hover {
    background: #f7fafc;
}

.category-tree a.active {
    background: #ebf8ff;
    color: #2b6cb0;
    font-weight: 600;
}

.category-tree .children {
    display: none;
    margin-top: 0.25rem;
    padding-left: 1rem;
}

.category-tree .parent > a {
    font-weight: 500;
}

.category-tree .category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-tree .expand-icon {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.category-tree .category-header.expanded .expand-icon {
    transform: rotate(90deg);
}

.category-tree .level-2 > a {
    padding-left: 1.5rem;
}

.category-tree .level-3 > a {
    padding-left: 2.25rem;
}

.empty-category {
    color: #999;
    padding: 0.5rem 0.75rem;
    display: block;
}

/* 标准链接样式 */
.standard-link {
    text-decoration: none;
    color: inherit;
}

/* 搜索无结果样式 */
.no-results {
    text-align: center;
    padding: 3rem;
}

.no-results-title {
    color: #718096;
    font-size: 1.1rem;
}

.no-results-hint {
    color: #a0aec0;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Footer语言切换样式 */
.footer-lang-switch {
    margin-top: 1rem;
}

.footer-lang-switch a {
    margin-right: 1rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}

.float-contact-btn {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 1000;
}

.float-contact-btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    transition: all 0.3s ease;
}

.float-contact-btn a:hover {
    background-color: #0056b3;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.5);
}

.float-contact-btn a i {
    font-size: 24px;
}

.float-contact-btn .tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.float-contact-btn .tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #333;
}

.float-contact-btn a:hover .tooltip {
    opacity: 1;
    visibility: visible;
}
.cookie-consent-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 20px;
    display: none;
    font-family: Arial, sans-serif;
}

.cookie-consent-popup.show {
    display: block;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.cookie-consent-text a {
    color: #007bff;
    text-decoration: none;
}

.cookie-consent-text a:hover {
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn-accept {
    background-color: #28a745;
    color: white;
}

.cookie-btn-accept:hover {
    background-color: #218838;
}

.cookie-btn-decline {
    background-color: #6c757d;
    color: white;
}

.cookie-btn-decline:hover {
    background-color: #5a6268;
}

.cookie-consent-icon {
    display: inline-block;
    margin-right: 8px;
}
