/* Famoson Papers Styles */
.famoson-papers-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Arial', sans-serif;
    background: #ffffff;
}

/* Main Tab Navigation */
.papers-main-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: none;
    padding: 0 20px;
}

.main-tab-button {
    padding: 12px 30px;
    border: none;
    background: #e5e5e5;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 2px;
    transition: all 0.3s ease;
}

.main-tab-button:first-child {
    border-radius: 0;
}

.main-tab-button.active {
    background: #f2a900;
    color: #ffffff;
}

.main-tab-button:hover:not(.active) {
    background: #d5d5d5;
}

/* Year Tabs Navigation */
.papers-year-tabs {
    background: #f8f8f8;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
}

.year-tabs-container {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.year-tabs-container::before {
    content: "📅";
    margin-right: 10px;
    font-size: 16px;
}

.year-tab-button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.year-tab-button:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.year-tab-button.active {
    background: #f2a900;
    color: white;
    border-color: #f2a900;
}

.year-tab-button.active:hover {
    background: #d89000;
    border-color: #d89000;
}

/* Search Section */
.papers-search-section {
    background: #f8f8f8;
    padding: 20px;
    margin-bottom: 0;
}

.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

#papers-search-type {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    font-size: 14px;
    min-width: 100px;
}

#papers-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    font-size: 14px;
    min-width: 200px;
}

#papers-search-btn {
    padding: 8px 15px;
    background: #f2a900;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

#papers-search-btn:hover {
    background: #d89000;
}

/* Papers Content */
.papers-content {
    background: white;
    min-height: 400px;
    padding: 20px;
}

.papers-loading {
    text-align: center;
    padding: 50px;
    color: #999;
    font-size: 16px;
}

.no-papers {
    text-align: center;
    padding: 50px;
    color: #999;
    font-size: 16px;
}

/* Year Section (for general papers) */
.year-section {
    margin-bottom: 40px;
}

.year-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

/* Taxonomy Papers Header */
.taxonomy-papers-header {
    margin-bottom: 20px;
}

.total-count {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Paper Item */
.paper-item {
    display: flex;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
    gap: 20px;
}

.paper-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Paper Image */
.paper-image {
    position: relative;
    flex-shrink: 0;
    width: 120px;
}

.paper-image img {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    display: block;
}

.paper-number {
    position: absolute;
    top: -5px;
    left: -10px;
    background: #333;
    color: white;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
}

.no-image-container {
    width: 120px;
    height: 150px;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.paper-number-only {
    background: #333;
    color: white;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50%;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Paper Content */
.paper-content {
    flex: 1;
    padding-left: 0;
}

.paper-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.paper-authors {
    color: #666;
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.paper-journal {
    color: #666;
    margin: 0 0 15px 0;
    font-size: 14px;
    font-style: italic;
}

.paper-link {
    margin-top: 10px;
}

.link-button {
    display: inline-block;
    color: #ff4444;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.link-button:hover {
    border-bottom-color: #ff4444;
    text-decoration: none;
}

/* Pagination */
.papers-pagination {
    padding: 30px 20px;
    border-top: 1px solid #eee;
    background: white;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 5px;
    align-items: center;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 40px;
}

.page-btn:hover {
    background: #f5f5f5;
}

.page-btn.active {
    background: #f2a900;
    color: white;
    border-color: #f2a900;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .famoson-papers-wrapper {
        margin: 0 10px;
    }
    
    .papers-main-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 15px;
    }
    
    .main-tab-button {
        margin-right: 0;
        margin-bottom: 0;
        flex: 1;
        min-width: 0;
        text-align: center;
    }
    
    .papers-year-tabs {
        padding: 10px 15px;
    }
    
    .year-tabs-container {
        gap: 5px;
    }
    
    .year-tab-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .search-container {
        flex-direction: column;
        gap: 10px;
    }
    
    #papers-search-input {
        min-width: unset;
        width: 100%;
    }
    
    .paper-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .paper-image {
        width: 100px;
        align-self: center;
    }
    
    .paper-content {
        padding-left: 0;
    }
    
    .year-title {
        font-size: 24px;
    }
    
    .pagination-wrapper {
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .page-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 35px;
    }
}

@media (max-width: 480px) {
    .papers-content {
        padding: 15px;
    }
    
    .paper-title {
        font-size: 16px;
    }
    
    .paper-authors,
    .paper-journal {
        font-size: 13px;
    }
    
    .paper-image {
        width: 80px;
    }
    
    .papers-main-tabs {
        flex-direction: column;
        gap: 8px;
        padding: 0 10px;
    }
    
    .main-tab-button {
        flex: none;
        width: 100%;
    }
}

/* Animation for content loading */
.papers-content.loading {
    opacity: 0.6;
    pointer-events: none;
}

.papers-content.loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Focus states for accessibility */
.main-tab-button:focus,
.year-tab-button:focus,
.page-btn:focus,
#papers-search-btn:focus,
#papers-search-input:focus,
#papers-search-type:focus {
    outline: 2px solid #f2a900;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .papers-main-tabs,
    .papers-year-tabs,
    .papers-search-section,
    .papers-pagination {
        display: none;
    }
    
    .paper-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
} 