/* ============================================
   WOS论文整理平台 - Veterinary Research Theme
   Primary: #2d5016 (Forest Green)
   Accent: #8B4513 (Saddle Brown / Earth)
   Background: #f5f2eb (Warm Cream)
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    background-color: #f5f2eb;
    color: #2c2c2c;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #2d5016;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #4a8a2a;
}

img {
    max-width: 100%;
}

/* === Header === */
.site-header {
    background: linear-gradient(135deg, #2d5016 0%, #3d6b22 50%, #4a7d2a 100%);
    color: #fff;
    padding: 0;
    box-shadow: 0 3px 15px rgba(45, 80, 22, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 16px;
}

.site-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 2px;
}

.site-title a {
    color: #fff;
}

.site-title a:hover {
    color: #d4e8c4;
}

.site-subtitle {
    font-size: 0.88rem;
    color: #c8dbb8;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* === Navigation === */
.site-nav {
    background: #3a5e24;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.nav-inner a {
    color: #d4e8c4;
    padding: 10px 16px;
    font-size: 0.88rem;
    display: inline-block;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-inner a:hover,
.nav-inner a.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-bottom-color: #8fc478;
}

.nav-inner .nav-home {
    font-weight: 600;
}

.nav-sep {
    color: #6a8f4a;
    padding: 0 4px;
    font-size: 0.75rem;
}

/* === Main Container === */
.main-container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
}

/* === Hero Section === */
.hero {
    background: linear-gradient(135deg, #f0f5ea 0%, #e8f0dc 100%);
    border-radius: 12px;
    padding: 40px 36px;
    margin-bottom: 36px;
    border-left: 5px solid #2d5016;
    box-shadow: 0 2px 8px rgba(45, 80, 22, 0.08);
}

.hero h1 {
    font-size: 1.8rem;
    color: #2d5016;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero p {
    font-size: 1.05rem;
    color: #555;
    max-width: 700px;
    line-height: 1.8;
}

.hero .stats {
    margin-top: 16px;
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.hero .stat-item {
    background: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.hero .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d5016;
}

.hero .stat-label {
    font-size: 0.82rem;
    color: #777;
    margin-left: 6px;
}

/* === Category Grid === */
.section-title {
    font-size: 1.3rem;
    color: #2d5016;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dce8d0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #e8e4dc;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(45, 80, 22, 0.15);
    border-color: #b8cf9c;
}

.category-card-header {
    background: linear-gradient(135deg, #f5f8f0, #ecf3e4);
    padding: 18px 20px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e8e4dc;
}

.category-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d5016;
}

.badge {
    display: inline-block;
    background: #2d5016;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.badge-warning {
    background: #b8860b;
}

.badge-info {
    background: #3a7bc8;
}

.category-card-body {
    padding: 14px 20px 16px;
    flex: 1;
}

.category-card-body ul {
    list-style: none;
    padding: 0;
}

.category-card-body li {
    font-size: 0.84rem;
    color: #555;
    padding: 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-card-body li::before {
    content: "•";
    color: #6a8f4a;
    margin-right: 6px;
}

.category-card-footer {
    padding: 10px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.category-card-footer a {
    font-size: 0.82rem;
    font-weight: 500;
    color: #2d5016;
}

.category-card-footer a:hover {
    color: #4a8a2a;
}

/* === Status Badges === */
.status-badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 500;
}

.status-complete {
    background: #e8f5e0;
    color: #2d5016;
    border: 1px solid #b8cf9c;
}

.status-partial {
    background: #fff8e0;
    color: #8B6914;
    border: 1px solid #f0dba0;
}

/* === Paper List === */
.paper-list {
    list-style: none;
    padding: 0;
}

.paper-list-item {
    background: #fff;
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    border: 1px solid #e8e4dc;
    transition: all 0.2s ease;
}

.paper-list-item:hover {
    border-color: #b8cf9c;
    box-shadow: 0 3px 12px rgba(45, 80, 22, 0.1);
}

.paper-list-item .paper-title-en {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d5016;
    margin-bottom: 4px;
}

.paper-list-item .paper-title-cn {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
}

.paper-list-item .paper-meta {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.paper-list-item .paper-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* === Paper Detail Page === */
.paper-detail {
    background: #fff;
    border-radius: 10px;
    padding: 32px 36px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid #e8e4dc;
}

.paper-detail-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e8e4dc;
}

.paper-detail-header .paper-category {
    font-size: 0.82rem;
    color: #2d5016;
    background: #ecf3e4;
    padding: 3px 12px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 12px;
}

.paper-detail-header h1 {
    font-size: 1.35rem;
    color: #1a1a1a;
    line-height: 1.5;
    margin-bottom: 8px;
}

.paper-detail-header h2 {
    font-size: 1.05rem;
    color: #666;
    font-weight: 400;
    margin-bottom: 14px;
}

.paper-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    font-size: 0.88rem;
    color: #555;
}

.paper-detail-meta .meta-label {
    font-weight: 600;
    color: #444;
}

.paper-detail-meta .meta-value {
    color: #666;
}

.paper-detail-meta a.doi-link {
    color: #3a7bc8;
    word-break: break-all;
}

.paper-detail-meta a.doi-link:hover {
    text-decoration: underline;
}

/* === PDF Link === */
.paper-detail-meta .pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: #fff !important;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
    transition: all 0.2s ease;
}

.paper-detail-meta .pdf-link:hover {
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
    transform: translateY(-1px);
}

/* === OA Badge === */
.oa-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.oa-badge.oa-gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #333;
}

.oa-badge.oa-hybrid {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: #fff;
}

.oa-badge.oa-bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
    color: #fff;
}

.oa-badge.oa-free {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: #fff;
}

.oa-badge.oa-closed {
    background: #9e9e9e;
    color: #fff;
}

/* === Back Link === */
.detail-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0eee8;
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-section h3 {
    font-size: 1.05rem;
    color: #2d5016;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid #2d5016;
}

.detail-section p {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.8;
    text-align: justify;
}

.detail-section .data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.85rem;
}

.detail-section .data-table th {
    background: #2d5016;
    color: #fff;
    padding: 8px 12px;
    text-align: left;
    font-weight: 500;
}

.detail-section .data-table td {
    padding: 7px 12px;
    border: 1px solid #ddd;
}

.detail-section .data-table tr:nth-child(even) {
    background: #f8faf5;
}

.detail-section .data-table tr:hover {
    background: #ecf3e4;
}

/* Partial notice */
.partial-notice {
    background: #fff8e0;
    border: 1px solid #f0dba0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    color: #8B6914;
    font-size: 0.9rem;
}

.partial-notice::before {
    content: "⚠️ ";
}

/* Back button */
.btn {
    display: inline-block;
    background: #2d5016;
    color: #fff;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #3d6b22;
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #2d5016;
    border: 1px solid #2d5016;
}

.btn-outline:hover {
    background: #2d5016;
    color: #fff;
}

.btn-sm {
    padding: 5px 14px;
    font-size: 0.82rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    color: #2d5016;
}

.back-link:hover {
    color: #4a8a2a;
}

/* === Recent Papers Section === */
.recent-section {
    margin-top: 10px;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.recent-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 18px;
    border: 1px solid #e8e4dc;
    transition: all 0.2s ease;
}

.recent-card:hover {
    border-color: #b8cf9c;
    box-shadow: 0 2px 8px rgba(45, 80, 22, 0.1);
}

.recent-card .rc-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2d5016;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.rc-translation {
    font-size: 0.78rem;
    color: #888;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-title-en {
    font-size: 0.82rem;
    color: #2d5016;
    line-height: 1.3;
}

.cat-title-cn {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.3;
    margin-top: 1px;
}
}

.rc-title + .rc-translation {
    margin-top: 2px;
}

.recent-card .rc-cat {
    font-size: 0.75rem;
    color: #888;
    margin-top: 6px;
}

/* === Category Page Header === */
.category-header {
    margin-bottom: 24px;
}

.category-header h1 {
    font-size: 1.5rem;
    color: #2d5016;
    margin-bottom: 4px;
}

.category-header p {
    color: #888;
    font-size: 0.9rem;
}

/* Subcategory navigation */
.subcategory-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #f8faf5;
    border-radius: 8px;
    border: 1px solid #e8e4dc;
}

.subcat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #dce8d0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #2d5016;
    transition: all 0.2s ease;
}

.subcat-btn:hover {
    background: #2d5016;
    color: #fff;
    border-color: #2d5016;
}

.subcat-btn .badge {
    font-size: 0.72rem;
    padding: 1px 6px;
}

/* === Footer === */
.site-footer {
    background: #2d5016;
    color: #b8cf9c;
    padding: 20px 24px;
    text-align: center;
    font-size: 0.82rem;
    margin-top: auto;
}

.site-footer a {
    color: #d4e8c4;
}

.site-footer a:hover {
    color: #fff;
}

/* === Error Page === */
.error-page {
    text-align: center;
    padding: 60px 20px;
}

.error-page h2 {
    font-size: 1.5rem;
    color: #2d5016;
    margin-bottom: 12px;
}

.error-page p {
    color: #888;
    margin-bottom: 20px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .header-inner {
        padding: 16px 16px 12px;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .main-container {
        padding: 20px 16px;
    }
    
    .hero {
        padding: 24px 20px;
    }
    
    .hero h1 {
        font-size: 1.35rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .recent-grid {
        grid-template-columns: 1fr;
    }
    
    .paper-detail {
        padding: 20px 18px;
    }
    
    .paper-detail-header h1 {
        font-size: 1.1rem;
    }
    
    .nav-inner {
        padding: 0 12px;
    }
    
    .nav-inner a {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .paper-detail-meta {
        flex-direction: column;
        gap: 6px;
    }
    
    .hero .stats {
        flex-direction: column;
        gap: 10px;
    }
}

/* === Print === */
@media print {
    .site-header, .site-nav, .site-footer, .back-link, .btn {
        display: none;
    }
    
    .paper-detail {
        box-shadow: none;
        border: none;
        padding: 0;
    }
}
