/* ============================================================================
   DATA REPOSITORY & FIGURE LIBRARY STYLES
   Native page styles for data and figures browsing
   ============================================================================ */

/* ============================================================================
   SHARED PAGE LAYOUT
   ============================================================================ */
.data-page,
.figures-page {
    padding: var(--space-2xl) 0 var(--space-3xl);
    min-height: calc(100vh - 200px);
}

.data-page .container,
.figures-page .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ============================================================================
   PAGE HEADERS
   ============================================================================ */
.data-header,
.figures-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.data-header h1,
.figures-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: var(--space-md);
}

.data-subtitle,
.figures-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================================================
   QUICK ACTIONS BAR
   ============================================================================ */
.quick-actions-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    margin-bottom: var(--space-md);
}

.quick-action-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.quick-action-item:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.quick-action-item svg {
    flex-shrink: 0;
}

.quick-action-label {
    white-space: nowrap;
}

.quick-action-cite {
    border-color: var(--accent-purple);
    background: var(--accent-translucent);
}

.quick-action-cite:hover {
    background: var(--accent-purple);
    color: white;
}

.quick-action-cite:hover .quick-action-doi {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.quick-action-doi {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: var(--accent-purple);
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: var(--space-xs);
    transition: all var(--transition-fast);
}

/* ============================================================================
   STATS BAR (Data page)
   ============================================================================ */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    padding: var(--space-xl) 0;
    margin-bottom: var(--space-2xl);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

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

.stat-value {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-purple);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================================
   VIEW TOGGLE (Data page)
   ============================================================================ */
.view-toggle-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-lg);
}

.view-toggle {
    display: inline-flex;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 3px;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-btn:hover {
    color: var(--text);
}

.view-btn.active {
    background: var(--accent-purple);
    color: white;
}

.view-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================================================
   DATA CATEGORIES
   ============================================================================ */
.data-categories {
    margin-bottom: var(--space-3xl);
}

.data-category {
    margin-bottom: var(--space-2xl);
}

.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--accent-purple);
}

.category-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-translucent);
    color: var(--accent-purple);
    border-radius: 8px;
}

.category-info {
    flex: 1;
}

.category-info h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: var(--space-xs);
}

.category-info p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.category-count {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-darker);
    padding: var(--space-xs) var(--space-md);
    border-radius: 20px;
}

/* Compact header for table view */
.category-header-compact {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
}

.category-header-compact h2 {
    font-size: 18px;
    margin-bottom: 0;
}

.category-header-compact .category-icon {
    width: 32px;
    height: 32px;
}

.category-header-compact .category-icon svg {
    width: 16px;
    height: 16px;
}

/* ============================================================================
   DATASETS TABLE (Compact View)
   ============================================================================ */
.datasets-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    font-size: 13px;
}

.datasets-table thead {
    background: var(--bg-darker);
}

.datasets-table th {
    text-align: left;
    padding: var(--space-sm) var(--space-md);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
}

.datasets-table td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.datasets-table tbody tr:last-child td {
    border-bottom: none;
}

.datasets-table tbody tr:hover {
    background: var(--bg);
}

.dataset-name {
    font-weight: 500;
    color: var(--text-heading);
    white-space: nowrap;
}

.dataset-title-text {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dataset-desc {
    color: var(--text-muted);
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dataset-rows {
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
}

.dataset-actions-cell {
    white-space: nowrap;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    text-decoration: none;
    transition: all var(--transition-fast);
    margin-right: var(--space-xs);
}

.btn-icon:last-child {
    margin-right: 0;
}

.btn-icon:hover {
    color: var(--accent-purple);
    border-color: var(--accent-purple);
    background: var(--accent-translucent);
}

.btn-icon svg {
    width: 14px;
    height: 14px;
}

/* ============================================================================
   DATASET CARDS
   ============================================================================ */
.datasets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.dataset-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: var(--space-lg);
    transition: all var(--transition-normal);
    text-decoration: none;
    color: inherit;
}

.dataset-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-purple);
}

.dataset-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.dataset-title svg {
    flex-shrink: 0;
    color: var(--accent-teal);
}

.dataset-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-md);
    flex: 1;
}

.dataset-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.dataset-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-darker);
    padding: 3px var(--space-sm);
    border-radius: 4px;
}

.dataset-meta-item svg {
    width: 12px;
    height: 12px;
}

.dataset-columns {
    font-size: 12px;
    color: var(--text-light);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: var(--bg);
    padding: var(--space-sm);
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dataset-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

.dataset-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 12px;
    padding: var(--space-sm) var(--space-md);
}

/* ============================================================================
   CONTRIBUTE BANNER
   ============================================================================ */
.contribute-banner {
    margin-bottom: var(--space-2xl);
}

.contribute-content {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-dark) 100%);
    border-radius: 12px;
    padding: var(--space-xl);
    color: white;
}

.contribute-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
}

.contribute-icon svg {
    stroke: white;
}

.contribute-text {
    flex: 1;
}

.contribute-text h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-xs);
}

.contribute-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.5;
}

.contribute-content .btn-primary {
    flex-shrink: 0;
    background: white;
    color: var(--accent-purple);
}

.contribute-content .btn-primary:hover {
    background: var(--bg);
    color: var(--accent-purple-dark);
}

/* ============================================================================
   USAGE SECTION
   ============================================================================ */
.usage-section {
    margin-bottom: var(--space-3xl);
}

.usage-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-heading);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.usage-card {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

.usage-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-translucent);
    color: var(--accent-purple);
    border-radius: 50%;
    margin: 0 auto var(--space-md);
}

.usage-card h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: var(--space-sm);
}

.usage-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ============================================================================
   DOWNLOAD ALL SECTION (Figures page)
   ============================================================================ */
.download-all-section {
    margin-bottom: var(--space-2xl);
}

.download-all-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: var(--space-lg) var(--space-xl);
    gap: var(--space-lg);
}

.download-all-info h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: var(--space-xs);
}

.download-all-info p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.download-all-buttons {
    display: flex;
    gap: var(--space-md);
    flex-shrink: 0;
}

/* ============================================================================
   FILTERS SECTION (Figures page)
   ============================================================================ */
.filters-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.filter-group {
    margin-bottom: var(--space-md);
}

.filter-group:last-of-type {
    margin-bottom: var(--space-sm);
}

.filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.filter-chip {
    padding: var(--space-xs) var(--space-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip:hover {
    background: var(--bg-darker);
    border-color: var(--accent-purple);
}

.filter-chip.active {
    background: var(--accent-purple);
    color: white;
    border-color: var(--accent-purple);
}

.filter-results {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-muted);
}

#results-count {
    font-weight: 600;
    color: var(--accent-purple);
}

/* ============================================================================
   FIGURES GRID
   ============================================================================ */
.figures-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-3xl);
}

/* ============================================================================
   FIGURE CARD
   ============================================================================ */
.figure-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    cursor: pointer;
}

.figure-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.figure-card.hand-drawn {
    border-color: var(--accent-gold);
    border-width: 2px;
}

.figure-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--bg-darker);
    overflow: hidden;
}

.figure-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--space-sm);
    transition: transform var(--transition-normal);
}

.figure-card:hover .figure-card-image img {
    transform: scale(1.02);
}

.figure-card-badge {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--accent-gold);
    color: #2A2A32;  /* Dark text for WCAG AA contrast on gold background */
    border-radius: 4px;
}

.figure-card-content {
    padding: var(--space-md);
}

.figure-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.figure-card-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.figure-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.figure-tag {
    padding: 2px var(--space-sm);
    font-size: 11px;
    font-weight: 500;
    color: var(--accent-purple);
    background: var(--accent-translucent);
    border-radius: 4px;
}

.figure-tag.organism {
    color: #1F5560;  /* Darker teal for WCAG AA on light teal background */
    background: rgba(74, 144, 164, 0.15);
}

/* Data source attribution */
.figure-card-source {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg);
    border-radius: 4px;
    border-left: 2px solid var(--accent-teal);
}

.figure-card-source svg {
    flex-shrink: 0;
    color: var(--accent-teal);
}

.figure-card-source a {
    color: var(--accent-teal);
    text-decoration: none;
    font-weight: 500;
}

.figure-card-source a:hover {
    text-decoration: underline;
}

.figure-card-actions {
    display: flex;
    gap: var(--space-sm);
}

.figure-card-actions .btn {
    flex: 1;
    justify-content: center;
}

/* ============================================================================
   LICENSE SECTION
   ============================================================================ */
.license-section {
    margin-top: var(--space-3xl);
}

.license-card {
    display: flex;
    gap: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: var(--space-xl);
}

.license-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-translucent);
    color: var(--accent-purple);
    border-radius: 50%;
}

.license-content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: var(--space-sm);
}

.license-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.license-content p:last-child {
    margin-bottom: 0;
}

.license-attribution {
    font-size: 13px;
}

.license-attribution strong {
    color: var(--text);
}

/* ============================================================================
   CITATION & LICENSE SECTION
   ============================================================================ */
.citation-license-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-3xl);
}

.citation-card {
    background: var(--bg-card);
    border: 2px solid var(--accent-purple);
    border-radius: 8px;
    padding: var(--space-xl);
}

.citation-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.citation-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-translucent);
    color: var(--accent-purple);
    border-radius: 50%;
}

.citation-header h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
}

.citation-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--space-sm);
}

.citation-tab {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: var(--space-xs) var(--space-md);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.citation-tab:hover {
    color: var(--accent-purple);
    background: var(--accent-translucent);
}

.citation-tab.active {
    color: var(--accent-purple);
    background: var(--accent-translucent);
    border-color: var(--accent-purple);
    border-bottom-color: var(--bg-card);
}

.citation-content {
    background: var(--bg-darker);
    border-radius: 4px;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    overflow-x: auto;
}

.citation-text {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

.citation-copy-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.citation-copy-btn.copied {
    background: var(--success, #22c55e);
    border-color: var(--success, #22c55e);
}

.citation-doi {
    text-align: center;
}

.doi-badge {
    display: inline-block;
    border-bottom: none;
}

.doi-badge:hover {
    border-bottom: none;
    opacity: 0.8;
}

/* Usage card link style */
.usage-card-link {
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.usage-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 900px) {
    .citation-license-section {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   MODAL (Figures page)
   ============================================================================ */
.figure-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.figure-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.figure-modal[aria-hidden="false"] .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    color: var(--text);
    background: var(--bg-darker);
}

.modal-image-container {
    flex-shrink: 0;
    background: var(--bg-darker);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 60vh;
    overflow: hidden;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-info {
    padding: var(--space-xl);
}

.modal-info h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: var(--space-sm);
}

.modal-info p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

/* Modal data source attribution */
.modal-data-source {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg);
    border-radius: 6px;
    border-left: 3px solid var(--accent-teal);
}

.modal-data-source svg {
    flex-shrink: 0;
    color: var(--accent-teal);
}

.modal-data-source a {
    color: var(--accent-teal);
    text-decoration: none;
    font-weight: 500;
}

.modal-data-source a:hover {
    text-decoration: underline;
}

.modal-downloads {
    display: flex;
    gap: var(--space-md);
}

/* Modal Share Button */
#modal-share {
    position: relative;
}

#modal-share.copied {
    background: var(--success);
    border-color: var(--success);
    color: #FFFFFF;
}

.share-dropdown {
    position: absolute;
    bottom: calc(100% + var(--space-sm));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
    z-index: 10;
}

.share-dropdown.visible {
    opacity: 1;
    visibility: visible;
}

.share-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-card);
}

.share-dropdown-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast);
    text-decoration: none;
}

.share-dropdown-btn:hover {
    background: var(--bg-darker);
}

.share-dropdown-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */
.figures-empty,
.data-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-3xl);
    color: var(--text-muted);
}

.figures-empty-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.figures-empty h3,
.data-empty h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

/* ============================================================================
   BUTTONS (Shared)
   ============================================================================ */
.data-page .btn,
.figures-page .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.data-page .btn svg,
.figures-page .btn svg {
    flex-shrink: 0;
}

.data-page .btn-primary,
.figures-page .btn-primary {
    background: var(--accent-purple);
    color: white;
}

.data-page .btn-primary:hover,
.figures-page .btn-primary:hover {
    background: var(--accent-purple-dark);
    color: white;
}

.data-page .btn-secondary,
.figures-page .btn-secondary {
    background: var(--bg-darker);
    color: var(--text);
    border: 1px solid var(--border);
}

.data-page .btn-secondary:hover,
.figures-page .btn-secondary:hover {
    background: var(--border-light);
    color: var(--text);
}

.data-page .btn-outline,
.figures-page .btn-outline {
    background: transparent;
    color: var(--accent-purple);
    border: 1px solid var(--accent-purple);
}

.data-page .btn-outline:hover,
.figures-page .btn-outline:hover {
    background: var(--accent-translucent);
}

.btn-small {
    padding: var(--space-xs) var(--space-sm);
    font-size: 12px;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 1024px) {
    .figures-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .usage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .data-page,
    .figures-page {
        padding: var(--space-xl) 0 var(--space-2xl);
    }

    .data-header h1,
    .figures-header h1 {
        font-size: 32px;
    }

    .contribute-content {
        flex-direction: column;
        text-align: center;
    }

    .contribute-content .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: var(--space-xl);
    }

    .stat-item {
        flex: 1;
        min-width: 120px;
    }

    .stat-value {
        font-size: 24px;
    }

    .quick-actions-bar {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .quick-action-item {
        font-size: 12px;
        padding: var(--space-xs) var(--space-sm);
    }

    .quick-action-doi {
        display: none;
    }

    .view-toggle-section {
        justify-content: center;
    }

    .datasets-grid {
        grid-template-columns: 1fr;
    }

    /* Table responsive - hide description on mobile */
    .datasets-table .dataset-desc {
        display: none;
    }

    .dataset-title-text {
        max-width: 160px;
    }

    .usage-grid {
        grid-template-columns: 1fr;
    }

    .download-all-card {
        flex-direction: column;
        text-align: center;
    }

    .download-all-buttons {
        flex-direction: column;
        width: 100%;
    }

    .download-all-buttons .btn {
        justify-content: center;
    }

    .figures-grid {
        grid-template-columns: 1fr;
    }

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

    .modal-image-container {
        max-height: 40vh;
        padding: var(--space-md);
    }

    .modal-info {
        padding: var(--space-lg);
    }

    .modal-downloads {
        flex-direction: column;
    }

    .license-card {
        flex-direction: column;
        text-align: center;
    }

    .license-icon {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .data-header h1,
    .figures-header h1 {
        font-size: 26px;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .category-count {
        align-self: flex-start;
    }

    .filter-chips {
        gap: var(--space-xs);
    }

    .filter-chip {
        font-size: 12px;
        padding: var(--space-xs) var(--space-sm);
    }
}
