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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.tab {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s;
}

.tab:hover {
    background: #e9ecef;
    color: #495057;
}

.tab.active {
    color: #667eea;
    border-bottom: 3px solid #667eea;
    background: white;
}

main {
    padding: 30px;
    min-height: 500px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1em;
}

.search-bar button, #search-btn {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover, #search-btn:hover {
    background: #5568d3;
}

.filters {
    margin-bottom: 20px;
}

.filters select {
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1em;
}

.results-list {
    margin-bottom: 20px;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
}

/* Table Styles */
.targets-table-container {
    width: 100%;
    overflow-x: auto;
}

.targets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.targets-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.targets-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #5568d3;
}

.targets-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.targets-table tbody tr:hover {
    background-color: #f8f9fa;
}

.targets-table td {
    padding: 10px 15px;
}

.target-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.target-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.modulations-cell {
    white-space: nowrap;
}

.modulation-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #667eea;
    color: white;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    margin-right: 4px;
    transition: all 0.2s;
}

.modulation-badge:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.results-count {
    padding: 15px;
    text-align: center;
    color: #6c757d;
    font-size: 0.9em;
    background: #f8f9fa;
    border-top: 2px solid #dee2e6;
}

.target-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.target-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.target-card h3 {
    color: #667eea;
    margin-bottom: 8px;
}

.target-card .meta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 0.9em;
    color: #6c757d;
}

.target-card .badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e9ecef;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Pagination removed - showing all targets on one page */

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.placeholder {
    text-align: center;
    padding: 60px;
    color: #6c757d;
    font-size: 1.2em;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2em;
    font-weight: bold;
    color: #adb5bd;
    cursor: pointer;
}

.close:hover {
    color: #495057;
}

#target-detail h2 {
    color: #667eea;
    margin-bottom: 20px;
}

#target-detail .section {
    margin-bottom: 25px;
}

#target-detail .section h3 {
    color: #495057;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e9ecef;
}

#target-detail .modulation-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

#target-detail .reference-item {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

#target-detail .reference-item:last-child {
    border-bottom: none;
}

/* Reference Cards */
.references-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.reference-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reference-card:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    transform: translateY(-2px);
}

.reference-title {
    font-size: 1.1em;
    margin-bottom: 12px;
    color: #212529;
    line-height: 1.4;
}

.reference-title strong {
    color: #667eea;
}

.reference-meta {
    margin-bottom: 10px;
}

.reference-authors {
    color: #495057;
    font-size: 0.95em;
    margin-bottom: 6px;
    line-height: 1.4;
}

.reference-journal {
    color: #6c757d;
    font-size: 0.9em;
}

.reference-year {
    color: #6c757d;
    font-size: 0.9em;
}

.reference-link {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.reference-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
}

.reference-link a:hover {
    text-decoration: underline;
}

/* Status badges for compounds */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

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

.status-badge.status-target_candidate {
    background: #d1ecf1;
    color: #0c5460;
}

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

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

/* Tier badges */
.tier-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50%;
    font-size: 0.9em;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.tier-badge.tier-1 {
    background: #28a745;
    color: white;
}

.tier-badge.tier-2 {
    background: #6c757d;
    color: white;
}

.tier-badge.tier-3 {
    background: #17a2b8;
    color: white;
}

.tier-badge.tier-4 {
    background: #ffc107;
    color: #333;
}

.tier-badge.tier-5 {
    background: #fd7e14;
    color: white;
}

.tier-badge.tier-6 {
    background: #dc3545;
    color: white;
}

.tier-badge.tier-7 {
    background: #e83e8c;
    color: white;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-top: 2px solid #dee2e6;
}

.pagination button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #5568d3;
}

.pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pagination span {
    color: #495057;
    font-weight: 500;
}

/* Filters spacing */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters select {
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1em;
    min-width: 200px;
}

/* ===================================================================
   CITATION TOOLTIPS
   =================================================================== */

.citation-tooltip {
    position: absolute;
    z-index: 10000;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 0;
    max-width: 450px;
    min-width: 350px;
    transition: opacity 0.2s;
}

.citation-tooltip.hidden {
    display: none;
}

.tooltip-content {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.citation-header {
    font-size: 1em;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
    color: #333;
}

.citation-detail {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.badge-small {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}

.value-small {
    background: #f8f9fa;
    color: #495057;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

.effect-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
}

.citation-sources {
    margin-top: 12px;
}

.sources-header {
    font-weight: 600;
    font-size: 0.85em;
    color: #495057;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid #667eea;
}

.source-text {
    font-size: 0.9em;
    line-height: 1.4;
    color: #333;
    margin-bottom: 6px;
    font-style: italic;
}

.source-ref {
    margin-bottom: 4px;
}

.ref-link {
    color: #667eea;
    font-size: 0.85em;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.ref-link:hover {
    text-decoration: underline;
}

.source-location {
    font-size: 0.75em;
    color: #6c757d;
}

.no-sources {
    font-size: 0.9em;
    color: #999;
    font-style: italic;
    padding: 10px;
    text-align: center;
}

.loading-small {
    font-size: 0.9em;
    color: #666;
    padding: 10px;
    text-align: center;
}

.error-small {
    font-size: 0.9em;
    color: #dc3545;
    padding: 10px;
    text-align: center;
}

/* Citation-enabled elements */
[data-citation-type] {
    cursor: help;
    border-bottom: 1px dotted #667eea;
}

[data-citation-type]:hover {
    background: #f0f3ff;
}

/* ===================================================================
   PDF VIEWER MODAL
   =================================================================== */

.pdf-viewer-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-viewer-modal.hidden {
    display: none;
}

.pdf-viewer-content {
    background: white;
    width: 90%;
    max-width: 1400px;
    height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.pdf-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
}

.pdf-viewer-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3em;
}

.pdf-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.pdf-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pdf-viewer-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.pdf-sidebar {
    width: 350px;
    background: #f8f9fa;
    padding: 20px;
    overflow-y: auto;
    border-right: 2px solid #e9ecef;
}

.pdf-sidebar h4 {
    color: #667eea;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.citation-info-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.citation-info-section:last-child {
    border-bottom: none;
}

.citation-info-section strong {
    display: block;
    color: #495057;
    font-size: 0.9em;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.citation-info-section p {
    margin: 4px 0;
    font-size: 0.9em;
    color: #333;
}

.cited-text {
    background: #fff3cd;
    padding: 8px;
    border-radius: 4px;
    font-style: italic;
    line-height: 1.5;
}

.cited-text.highlighted {
    background: #d4edda;
    border-left: 3px solid #28a745;
}

.context-text {
    color: #6c757d;
    font-size: 0.85em;
    line-height: 1.5;
}

.ref-title {
    font-weight: 500;
    color: #333;
}

.ref-authors {
    color: #666;
    font-size: 0.85em;
}

.ref-citation {
    color: #666;
    font-size: 0.85em;
    font-style: italic;
}

.doi-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85em;
}

.doi-link:hover {
    text-decoration: underline;
}

.extraction-date {
    color: #999;
    font-size: 0.8em;
}

.pdf-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: white;
}

#pdf-container {
    max-width: 900px;
    margin: 0 auto;
}

.text-view {
    background: white;
    padding: 30px;
    border-radius: 8px;
}

.text-view h4 {
    color: #667eea;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.text-content {
    line-height: 1.8;
    font-size: 1.05em;
    color: #333;
    margin-bottom: 30px;
}

.text-content .context {
    color: #666;
}

.citation-highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
    border-left: 3px solid #ffc107;
    padding-left: 6px;
}

.pdf-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #6c757d;
}

.pdf-placeholder p {
    margin: 10px 0;
}

.external-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}

.external-link:hover {
    background: #5568d3;
}

/* ===================================================================
   PDF UPLOAD INTERFACE
   =================================================================== */

.upload-container {
    max-width: 900px;
    margin: 0 auto;
}

.upload-header {
    text-align: center;
    margin-bottom: 40px;
}

.upload-header h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 10px;
}

.upload-header p {
    font-size: 1.1em;
    color: #6c757d;
}

/* Drop Zone */
.drop-zone {
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.drop-zone.drag-over {
    border-color: #667eea;
    background: #e8ebff;
    border-style: solid;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-icon {
    color: #667eea;
    opacity: 0.5;
}

.drop-zone h3 {
    font-size: 1.5em;
    color: #333;
    margin: 0;
}

.drop-zone p {
    color: #6c757d;
    margin: 0;
}

.select-files-btn {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.select-files-btn:hover {
    background: #5568d3;
}

.upload-hint {
    font-size: 0.9em;
    color: #adb5bd;
}

/* Upload Options */
.upload-options {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.upload-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1em;
    color: #495057;
    cursor: pointer;
}

.upload-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Upload Progress */
.upload-progress {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.upload-progress h3 {
    margin-bottom: 20px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    transition: width 0.3s;
    width: 0%;
}

#progress-text {
    font-size: 1.1em;
    color: #495057;
    margin: 0;
}

/* Upload Results */
.upload-results {
    margin-top: 40px;
}

.upload-results h3 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.upload-summary {
    padding: 20px;
    background: #e7f3ff;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    margin-bottom: 30px;
}

.upload-summary p {
    font-size: 1.1em;
    color: #495057;
    margin: 0;
}

.results-section {
    margin-bottom: 30px;
}

.results-section h4 {
    font-size: 1.3em;
    color: #495057;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

/* Result Items */
.result-item {
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
    background: #f8f9fa;
}

.result-item.success {
    border-left-color: #28a745;
    background: #f0fdf4;
}

.result-item.error {
    border-left-color: #dc3545;
    background: #fef2f2;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.result-filename {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
}

/* Match Type Badges */
.match-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.match-doi {
    background: #d4edda;
    color: #155724;
}

.match-title {
    background: #d1ecf1;
    color: #0c5460;
}

.match-created {
    background: #fff3cd;
    color: #856404;
}

.match-error {
    background: #f8d7da;
    color: #721c24;
}

.result-details {
    margin-top: 10px;
}

.result-message {
    color: #495057;
    margin-bottom: 10px;
}

.result-message.error-text {
    color: #dc3545;
    font-weight: 500;
}

.result-ref-id {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 0.95em;
}

.result-ref-id strong {
    color: #667eea;
}

/* Result Metadata */
.result-metadata {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.metadata-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.metadata-authors {
    color: #6c757d;
    font-size: 0.95em;
    margin-bottom: 6px;
}

.metadata-journal {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 6px;
}

.metadata-doi {
    color: #667eea;
    font-size: 0.85em;
    font-family: monospace;
    margin-bottom: 6px;
}

.metadata-similarity {
    color: #28a745;
    font-size: 0.9em;
    font-weight: 600;
}

/* Hidden state */
.hidden {
    display: none !important;
}

/* ===================================================================
   COMPOUND DETAIL TABS
   =================================================================== */

.compound-detail-container {
    width: 100%;
}

.compound-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.compound-detail-header h2 {
    margin: 0;
    color: #333;
}

.compound-badges {
    display: flex;
    gap: 10px;
    align-items: center;
}

.detail-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.detail-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s;
}

.detail-tab:hover {
    color: #495057;
    background: #f8f9fa;
}

.detail-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.detail-tab-content {
    padding: 20px 0;
}

.overview-content .section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.overview-content .section:last-child {
    border-bottom: none;
}

.overview-content .section h3 {
    color: #667eea;
    font-size: 1.2em;
    margin-bottom: 12px;
}

.overview-content .section p {
    margin: 8px 0;
    color: #333;
}

/* Interactions Content */
.interactions-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.interaction-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    cursor: help;
    transition: all 0.3s;
}

.interaction-item:hover {
    background: #f0f3ff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.interaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.interaction-header strong {
    font-size: 1.1em;
    color: #333;
}

.interaction-activity {
    color: #28a745;
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 6px;
}

.interaction-mechanism {
    color: #495057;
    font-size: 0.95em;
    margin-bottom: 6px;
    font-style: italic;
}

.interaction-meta {
    color: #6c757d;
    font-size: 0.85em;
    margin-top: 4px;
}

/* Effects Content */
.effects-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.effect-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    cursor: help;
    transition: all 0.3s;
}

.effect-item:hover {
    background: #f0fff4;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
}

.effect-header {
    margin-bottom: 8px;
}

.effect-description {
    color: #333;
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 8px;
}

.effect-dosage {
    color: #17a2b8;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 6px;
}

.effect-meta {
    color: #6c757d;
    font-size: 0.85em;
    margin-top: 4px;
}

.citation-hint {
    text-align: center;
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 20px;
    font-style: italic;
}

.placeholder {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* ===================================================================
   SOURCE-COMPOUND LINKING
   =================================================================== */

.sources-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.source-compound-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.source-compound-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.source-compound-header strong {
    font-size: 1.1em;
    color: #333;
    font-style: italic;
}

.source-family {
    color: #6c757d;
    font-size: 0.9em;
    font-style: normal;
    margin-left: 8px;
}

.source-detail {
    color: #495057;
    font-size: 0.95em;
    margin-bottom: 6px;
}

.source-concentration {
    color: #17a2b8;
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 8px;
}

.source-notes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 0.9em;
    font-style: italic;
}

.badge-small {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    background: #e9ecef;
    color: #495057;
}

/* ===================================================================
   PDF.JS VIEWER INTEGRATION
   =================================================================== */

.pdf-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    flex-wrap: wrap;
}

.pdf-nav-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.pdf-nav-btn:hover:not(:disabled) {
    background: #5568d3;
}

.pdf-nav-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

.pdf-page-info {
    font-size: 0.95em;
    color: #495057;
    font-weight: 500;
}

.pdf-zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-zoom-btn {
    width: 32px;
    height: 32px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.pdf-zoom-btn:hover {
    background: #138496;
}

#pdf-zoom-level {
    font-size: 0.9em;
    color: #495057;
    min-width: 50px;
    text-align: center;
}

.pdf-canvas-container {
    flex: 1;
    overflow: auto;
    background: #525659;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

#pdf-canvas {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: white;
    display: block;
}

.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px 50px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.pdf-loading p {
    margin: 0;
    font-size: 1.1em;
    color: #495057;
}

/* Text view fallback */
.text-view {
    padding: 30px;
    background: white;
    overflow: auto;
    height: 100%;
}

.text-view-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.text-view-note p {
    margin: 0;
    color: #856404;
}

.text-view h4 {
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.text-content {
    font-size: 1em;
    line-height: 1.8;
    color: #333;
}

.text-paragraph {
    margin-bottom: 15px;
}

.context-text {
    color: #6c757d;
}

.citation-highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.pdf-link {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.external-pdf-link {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.external-pdf-link:hover {
    background: #5568d3;
}

/* ===================================================================
   SINGLE-PAGE DETAIL LAYOUT (Refactored)
   =================================================================== */

.detail-page-container {
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 0;
}

.detail-page-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding: 20px 30px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-page-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.8em;
}

/* Table of Contents */
.detail-toc {
    position: sticky;
    top: 76px;
    background: #f8f9fa;
    padding: 15px 30px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    z-index: 9;
}

.toc-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: color 0.3s;
}

.toc-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* Page Content */
.detail-page-content {
    padding: 30px;
}

.detail-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

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

.detail-section h3 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.detail-section h4 {
    color: #495057;
    font-size: 1.2em;
    margin: 20px 0 15px 0;
}

/* Primary Sources Section */
.primary-source-summary {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 15px;
}

.primary-source-summary em {
    font-style: italic;
    color: #667eea;
}

.secondary-sources {
    color: #6c757d;
    font-size: 0.95em;
}

.secondary-sources em {
    font-style: italic;
}

/* Molecular Targets Section */
.targets-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.target-item {
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 4px;
    cursor: help;
    transition: background 0.3s;
}

.target-item:hover {
    background: #f0f3ff;
}

.target-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.target-name strong {
    font-size: 1.1em;
    color: #333;
}

.interaction-badge {
    background: #d1ecf1;
    color: #0c5460;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.activity-values {
    color: #28a745;
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 6px;
}

.mechanism-text {
    color: #495057;
    font-size: 0.95em;
    margin-bottom: 6px;
    font-style: italic;
}

.meta-info {
    color: #6c757d;
    font-size: 0.85em;
}

/* Physiological Effects Section */
.effects-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.effect-item {
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    border-radius: 4px;
    cursor: help;
    transition: background 0.3s;
}

.effect-item:hover {
    background: #f0fff4;
}

.effect-category-badge {
    display: inline-block;
    background: #d4edda;
    color: #155724;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.effect-description {
    color: #333;
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 8px;
}

.dosage-info {
    color: #17a2b8;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 6px;
}

.effect-context {
    color: #6c757d;
    font-size: 0.85em;
}

/* Detailed Sources Section */
.source-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.source-item {
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #17a2b8;
    border-radius: 4px;
}

.source-header {
    margin-bottom: 10px;
}

.source-header strong {
    font-size: 1.05em;
    color: #333;
}

.source-family {
    color: #6c757d;
    font-size: 0.9em;
    margin-left: 8px;
    font-style: normal;
}

.source-concentration-detail {
    color: #17a2b8;
    font-weight: 600;
    margin-bottom: 8px;
}

.source-meta {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 4px;
}

.source-items-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.source-item-compact {
    color: #495057;
    font-size: 0.95em;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.source-item-compact em {
    font-style: italic;
}

/* Molecular Properties Section */
.molecular-properties {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.property-group {
    flex: 1;
    min-width: 250px;
}

.property-group h4 {
    color: #495057;
    font-size: 1.1em;
    margin-bottom: 12px;
}

.property-group p {
    color: #333;
    margin: 8px 0;
    font-size: 0.95em;
}

.property-group a {
    color: #667eea;
    text-decoration: none;
}

.property-group a:hover {
    text-decoration: underline;
}

/* References Section */
.references-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.reference-item {
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
    border-radius: 4px;
}

.reference-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.reference-authors {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 6px;
}

.reference-citation {
    color: #495057;
    font-size: 0.9em;
}

.citation-hint {
    text-align: center;
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 15px;
    font-style: italic;
}

.placeholder {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 4px;
}

/* ===================================================================
   SOURCE DETAIL SPECIFIC STYLES
   =================================================================== */

.common-names-section {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    color: #495057;
}

.compound-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.compound-item {
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 4px;
}

.compound-name-row {
    margin-bottom: 8px;
}

.compound-link {
    color: #667eea;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.05em;
}

.compound-link:hover {
    text-decoration: underline;
}

.compound-concentration {
    color: #17a2b8;
    font-weight: 600;
    margin-bottom: 6px;
}

.compound-meta {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 4px;
}

.compound-items-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compound-item-compact {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    color: #495057;
    font-size: 0.95em;
}

/* Distribution Section */
.distribution-info h4 {
    color: #495057;
    margin-bottom: 12px;
}

.distribution-info ul {
    list-style: disc;
    padding-left: 25px;
    color: #333;
}

.distribution-info li {
    margin-bottom: 6px;
}

.distribution-notes {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.distribution-notes p {
    color: #495057;
    margin: 8px 0;
}

/* Taxonomy Tree */
.taxonomy-tree {
    font-family: monospace;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.taxonomy-level {
    margin: 6px 0;
    color: #333;
}

.taxonomy-label {
    color: #6c757d;
    font-weight: 600;
    min-width: 100px;
    display: inline-block;
}

.taxonomy-value {
    color: #333;
    font-style: italic;
}

/* Traditional Uses */
.traditional-uses-content {
    max-width: 800px;
}

.traditional-uses-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin-bottom: 20px;
    color: #856404;
    font-size: 0.9em;
}

.traditional-uses-text {
    color: #495057;
    line-height: 1.7;
}

/* ===================================================================
   TARGET DETAIL SPECIFIC STYLES
   =================================================================== */

.target-description-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.target-description-section p {
    color: #495057;
    line-height: 1.7;
    margin: 0;
}

/* Modulation Effects */
.modulation-effects {
    max-width: 800px;
}

.effects-description {
    background: #e8ebff;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.effects-description p {
    margin: 0;
    color: #333;
    font-weight: 500;
}

/* Compound Interactions List */
.compound-interactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.compound-interaction-item {
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    border-radius: 4px;
    cursor: help;
    transition: background 0.3s;
}

.compound-interaction-item:hover {
    background: #f0fff4;
}

.compound-interaction-header {
    margin-bottom: 8px;
}

/* Target Network */
.target-network {
    max-width: 900px;
}

.target-network h4 {
    color: #495057;
    font-size: 1.1em;
    margin: 25px 0 15px 0;
}

.target-network h4:first-child {
    margin-top: 0;
}

.epitargets-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin: 15px 0;
    border-radius: 4px;
}

.epitargets-note p {
    margin: 0;
    color: #856404;
    font-size: 0.9em;
}

/* Pathways */
.pathways-content ul {
    list-style: disc;
    padding-left: 25px;
}

.pathways-content li {
    color: #333;
    margin-bottom: 8px;
}

/* Gene Info */
.gene-info-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.gene-info-row {
    margin: 10px 0;
    color: #333;
}

.gene-label {
    font-weight: 600;
    color: #6c757d;
    min-width: 150px;
    display: inline-block;
}

.gene-value {
    color: #333;
}

/* ========================================
   ADMIN REVIEW PORTAL
   ======================================== */

.admin-review-container {
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    margin-bottom: 30px;
}

.admin-header h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.admin-header p {
    color: #6c757d;
    font-size: 0.95em;
}

/* Review Statistics */
.review-stats {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.stat-card.stat-pending {
    border-left-color: #ffc107;
}

.stat-card.stat-maybe {
    border-left-color: #fd7e14;
}

.stat-card.stat-approved {
    border-left-color: #28a745;
}

.stat-card.stat-rejected {
    border-left-color: #dc3545;
}

.stat-card.stat-manual-approved {
    border-left-color: #20c997;
}

.stat-card.stat-manual-rejected {
    border-left-color: #e83e8c;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85em;
    color: #6c757d;
}

.stats-summary {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
    color: #495057;
}

/* Review Filters */
.review-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 20px;
}

.selection-count {
    margin-left: auto;
    font-weight: 600;
    color: #495057;
}

.btn-bulk {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-bulk.btn-approve {
    background: #28a745;
    color: white;
}

.btn-bulk.btn-approve:hover:not(:disabled) {
    background: #218838;
}

.btn-bulk.btn-reject {
    background: #dc3545;
    color: white;
}

.btn-bulk.btn-reject:hover:not(:disabled) {
    background: #c82333;
}

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

/* Queue Items */
.queue-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.queue-item {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
}

.queue-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.queue-item.selected {
    border-color: #667eea;
    background: #f8f9ff;
}

.queue-item-header {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.ref-checkbox {
    margin-top: 5px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.queue-item-title {
    flex: 1;
}

.queue-item-title strong {
    font-size: 1.05em;
    color: #333;
    display: block;
    line-height: 1.4;
}

.queue-item-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 15px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #f8f9fa;
}

.btn-small.btn-approve {
    border-color: #28a745;
    color: #28a745;
}

.btn-small.btn-approve:hover {
    background: #28a745;
    color: white;
}

.btn-small.btn-reject {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-small.btn-reject:hover {
    background: #dc3545;
    color: white;
}

.queue-item-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 10px;
}

.ref-authors, .ref-journal, .ref-year {
    display: inline;
}

.queue-item-status {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}

.status-pending_review {
    background: #fff3cd;
    color: #856404;
}

.status-maybe_relevant {
    background: #ffe5cc;
    color: #cc6600;
}

.status-highly_relevant {
    background: #d4edda;
    color: #155724;
}

.status-not_relevant {
    background: #f8d7da;
    color: #721c24;
}

.status-manually_approved {
    background: #d1f2eb;
    color: #0c5460;
}

.status-manually_rejected {
    background: #f8bbd0;
    color: #880e4f;
}

.relevance-score {
    font-size: 0.9em;
    font-weight: 600;
    color: #495057;
}

.queue-item-abstract {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 10px;
}

.queue-item-keywords {
    margin-top: 10px;
}

.keyword-matches {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.keyword-group {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85em;
}

.keyword-group strong {
    margin-right: 8px;
}

.keyword-athletic {
    background: #e3f2fd;
    color: #0d47a1;
}

.keyword-phytochemical {
    background: #e8f5e9;
    color: #1b5e20;
}

.keyword-cancer {
    background: #ffebee;
    color: #b71c1c;
}

.keyword-irrelevant {
    background: #f5f5f5;
    color: #616161;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 1.1em;
}

/* Notification */
.notification {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================================================
   ENHANCEMENTS SECTION
   =================================================================== */

.enhancements-container {
    padding: 20px;
}

.enhancements-header {
    margin-bottom: 30px;
}

.enhancements-header h2 {
    color: #2c3e50;
    margin-bottom: 8px;
}

.enhancements-header p {
    color: #6c757d;
    font-size: 0.95em;
}

.enhancements-controls {
    margin-bottom: 30px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.category-filter-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.category-filter-btn:hover {
    background: #f8f9fa;
    border-color: #4CAF50;
}

.category-filter-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.enhancements-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.enhancement-category-section h3.category-header {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

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

.enhancement-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.enhancement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #4CAF50;
}

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

.enhancement-name {
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.enhancement-category-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 10px;
}

.enhancement-category-badge.athletic_performance {
    background: #e3f2fd;
    color: #1565c0;
}

.enhancement-category-badge.muscle_strength {
    background: #fce4ec;
    color: #c2185b;
}

.enhancement-category-badge.cardio_respiratory {
    background: #f3e5f5;
    color: #7b1fa2;
}

.enhancement-category-badge.metabolic_energy {
    background: #fff3e0;
    color: #ef6c00;
}

.enhancement-category-badge.cognitive_neural {
    background: #e8f5e9;
    color: #2e7d32;
}

.enhancement-category-badge.recovery_adaptation {
    background: #e0f2f1;
    color: #00695c;
}

.enhancement-description {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
}

.enhancement-targets {
    margin-bottom: 15px;
}

.targets-label {
    font-size: 0.85em;
    color: #6c757d;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.target-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.target-badge {
    background: #f8f9fa;
    color: #495057;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    border: 1px solid #e9ecef;
}

.target-badge-more {
    color: #6c757d;
    font-size: 0.8em;
    font-style: italic;
}

.view-details-btn {
    width: 100%;
    padding: 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.view-details-btn:hover {
    background: #45a049;
}

/* Enhancement Detail Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.modal.active {
    display: block;
}

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

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #212529;
}

.modal-body {
    padding: 40px;
}

.enhancement-detail-header {
    margin-bottom: 30px;
}

.enhancement-detail-title {
    color: #2c3e50;
    font-size: 2em;
    margin: 10px 0 8px 0;
}

.enhancement-detail-subtitle {
    color: #6c757d;
    font-size: 1.1em;
}

.enhancement-detail-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.detail-section h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.detail-description {
    color: #495057;
    line-height: 1.7;
}

.placeholder-text {
    color: #6c757d;
    font-style: italic;
}

.outcome-measures {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.outcome-measure-badge {
    background: #e3f2fd;
    color: #1565c0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    border: 1px solid #bbdefb;
}

.related-targets-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.target-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s;
}

.target-item:hover {
    border-color: #4CAF50;
    background: white;
}

.target-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.target-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.05em;
}

.target-gene {
    color: #6c757d;
    font-size: 0.9em;
    margin-left: 8px;
}

.target-type-badge {
    background: white;
    border: 1px solid #dee2e6;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    color: #495057;
}

.target-description {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 10px;
}

.target-item-footer {
    display: flex;
    align-items: center;
    gap: 15px;
}

.target-stat {
    font-size: 0.85em;
    color: #6c757d;
}

.view-target-btn {
    margin-left: auto;
    padding: 6px 14px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: background 0.2s;
}

.view-target-btn:hover {
    background: #45a049;
}

.target-not-found {
    opacity: 0.6;
}

.target-status {
    font-size: 0.85em;
    color: #dc3545;
    font-style: italic;
}

.detail-section.coming-soon {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.no-results,
.error-message,
.no-data {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .enhancement-cards {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-body {
        padding: 25px;
    }

    .enhancement-detail-title {
        font-size: 1.5em;
    }

    .category-filter {
        justify-content: center;
    }
}
