:root {
    --primary-color: #8B4513;
    --primary-light: #A0522D;
    --secondary-color: #D2691E;
    --accent-color: #CD853F;
    --bg-color: #FDF5E6;
    --bg-secondary: #FAF0E6;
    --text-color: #3E2723;
    --text-secondary: #5D4037;
    --text-light: #8D6E63;
    --border-color: #D7CCC8;
    --card-bg: #FFFFFF;
    --shadow: 0 4px 15px rgba(139, 69, 19, 0.1);
    --shadow-hover: 0 8px 30px rgba(139, 69, 19, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, select {
    font-family: inherit;
}

.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    z-index: 100;
}

.header-content {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.navbar {
    background: rgba(139, 69, 19, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: relative;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-menu {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

.header-banner {
    padding: 40px 0 50px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
}

.banner-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 3px;
}

.banner-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto 30px;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    font-size: 1.1rem;
    border: none;
    outline: none;
}

.search-box button {
    padding: 15px 30px;
    background: var(--secondary-color);
    color: #fff;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--accent-color);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    font-family: "Times New Roman", serif;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.85;
}

.main-content {
    padding: 40px 0;
    min-height: 60vh;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 1.6rem;
    color: var(--primary-color);
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 100%;
    background: var(--secondary-color);
    border-radius: 3px;
}

.result-count {
    color: var(--text-light);
    font-size: 0.95rem;
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    font-size: 0.95rem;
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
}

.card-tag {
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: #fff;
    border-radius: 20px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.card-type {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.card-content {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-author {
    font-size: 0.85rem;
    color: var(--text-light);
}

.card-action {
    color: var(--secondary-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
}

.no-results p {
    font-size: 1.3rem;
    color: var(--text-secondary);
}

.no-results-hint {
    font-size: 0.95rem !important;
    color: var(--text-light) !important;
    margin-top: 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s;
}

.page-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.page-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius);
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-light);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--secondary-color);
}

.detail-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.detail-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.detail-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-light);
    font-size: 0.9rem;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section-title {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.detail-section p, .detail-section li {
    color: var(--text-secondary);
    line-height: 2;
}

.detail-section ul {
    padding-left: 20px;
}

.detail-section li {
    list-style: disc;
    margin-bottom: 8px;
}

.detail-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.detail-tag {
    padding: 5px 15px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
}

.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 99;
}

.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
}

.float-btn.show {
    opacity: 1;
    visibility: visible;
}

.float-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.site-footer {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #E8D5C4 100%);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.85rem;
}

@media (max-width: 992px) {
    .banner-title {
        font-size: 2rem;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        padding: 15px;
        gap: 5px;
        display: none;
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .stats {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .banner-title {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .search-box input {
        padding: 12px 18px;
        font-size: 1rem;
    }
    
    .search-box button {
        padding: 12px 20px;
    }
    
    .stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-content {
        padding: 25px 20px;
    }
    
    .detail-title {
        font-size: 1.5rem;
    }
    
    .floating-buttons {
        right: 15px;
        bottom: 20px;
    }
    
    .float-btn {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .header-banner {
        padding: 30px 0 40px;
    }
    
    .banner-title {
        font-size: 1.4rem;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

.card-expand-icon {
    transition: transform 0.3s;
}

.card.expanded .card-expand-icon {
    transform: rotate(180deg);
}

.search-highlight {
    background: linear-gradient(120deg, #FFE4B5 0%, #FFD700 100%);
    padding: 0 3px;
    border-radius: 3px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.4s ease forwards;
}

.back-to-top-icon {
    display: inline-block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}