/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --background-light: #f8fafc;
    --background-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --accent-color: #93c5fd;
    --text-dark: #f9fafb;
    --text-light: #d1d5db;
    --background-light: #1f2937;
    --background-white: #111827;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    min-height: 100vh;
}

html {
    scroll-behavior: smooth;
}

/* Header */
.header {
    background-color: var(--background-white);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Scenario Selector */
.scenario-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scenario-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
}

.scenario-dropdown {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--background-white);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.scenario-dropdown:hover {
    border-color: var(--secondary-color);
}

.scenario-dropdown:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Theme Toggle */
.theme-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.theme-switch-input {
    display: none;
}

.theme-switch-slider {
    width: 50px;
    height: 26px;
    background-color: var(--border-color);
    border-radius: 13px;
    position: relative;
    transition: var(--transition);
}

.theme-switch-handle {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background-color: var(--background-white);
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.theme-switch-input:checked + .theme-switch-slider {
    background-color: var(--secondary-color);
}

.theme-switch-input:checked + .theme-switch-slider .theme-switch-handle {
    transform: translateX(24px);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Title Section */
.title-section {
    text-align: center;
    margin-bottom: 2rem;
}

.title-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.scenario-title {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 500;
}

.scenario-hint {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background-color: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #92400e;
    max-width: 600px;
}

[data-theme="dark"] .scenario-hint {
    background-color: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.hint-icon {
    font-size: 1.2rem;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Canvas Section */
.canvas-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Settings Panel */
.settings-panel {
    background-color: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

.settings-panel h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-item label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

.setting-item input[type="number"] {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    background-color: var(--background-white);
    color: var(--text-dark);
    transition: var(--transition);
}

.setting-item input[type="number"]:focus {
    border-color: var(--secondary-color);
    outline: none;
}

/* Simulation Panel */
.simulation-panel {
    background-color: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

.simulation-panel h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.simulation-description {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.simulation-controls {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.simulation-controls .setting-item {
    flex: 1;
}

.simulation-controls button {
    flex-shrink: 0;
}

/* Progress Bar */
.simulation-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background-color: var(--background-light);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#progress-text {
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
}

/* Simulation Results */
.simulation-results {
    background-color: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

.simulation-results h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-stat {
    padding: 1rem;
    background-color: var(--background-light);
    border-radius: 8px;
    text-align: center;
}

.result-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

#simulation-histogram {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    background-color: var(--background-light);
}

.canvas-container {
    background-color: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

#visualization-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.canvas-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.sample-info {
    margin-left: auto;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: var(--background-white);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

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

/* Info Section */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Method Tabs */
.method-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    background-color: var(--background-white);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.tab-btn {
    padding: 0.75rem 1rem;
    background-color: var(--background-light);
    color: var(--text-dark);
    border: 2px solid transparent;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    background-color: var(--border-color);
}

.tab-btn.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Probability vs Non-Probability Method Styling */
.tab-btn.probability-method {
    border-left: 3px solid #10b981;
}

.tab-btn.nonprobability-method {
    border-left: 3px solid #ef4444;
}

.tab-btn.probability-method.active {
    background-color: #10b981;
    border-color: #059669;
}

.tab-btn.nonprobability-method.active {
    background-color: #ef4444;
    border-color: #dc2626;
}

/* Method Content */
.method-content {
    background-color: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

.method-panel {
    display: none;
}

.method-panel.active {
    display: block;
}

.method-panel h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.method-description {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Pros & Cons */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.pros h4, .cons h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pros h4 {
    color: #059669;
}

.cons h4 {
    color: #dc2626;
}

.pros ul, .cons ul {
    list-style: none;
    padding: 0;
}

.pros li, .cons li {
    padding: 0.375rem 0;
    color: var(--text-dark);
    font-size: 0.9rem;
    line-height: 1.5;
}

.pros li::before {
    content: "✓ ";
    color: #059669;
    font-weight: bold;
    margin-right: 0.5rem;
}

.cons li::before {
    content: "✗ ";
    color: #dc2626;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Method Badges */
.method-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.probability-badge {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

[data-theme="dark"] .probability-badge {
    background-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.nonprobability-badge {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

[data-theme="dark"] .nonprobability-badge {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Key Insights */
.key-insight {
    background-color: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-dark);
}

[data-theme="dark"] .key-insight {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--text-light);
}

.key-insight strong {
    color: #1e40af;
}

[data-theme="dark"] .key-insight strong {
    color: #93c5fd;
}

.warning-insight {
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
}

[data-theme="dark"] .warning-insight {
    background-color: rgba(239, 68, 68, 0.15);
}

.warning-insight strong {
    color: #991b1b;
}

[data-theme="dark"] .warning-insight strong {
    color: #fca5a5;
}

/* Best Use */
.best-use {
    background-color: var(--background-light);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    color: var(--text-dark);
    font-size: 0.9rem;
    line-height: 1.6;
}

.best-use strong {
    color: var(--primary-color);
}

/* Legend */
.legend {
    background-color: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

.legend h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.legend-label {
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Statistics Panel */
.statistics-panel {
    background-color: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.statistics-panel.bias-excellent {
    border: 3px solid #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    animation: pulse-green 2s ease-in-out infinite;
}

.statistics-panel.bias-moderate {
    border: 3px solid #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.statistics-panel.bias-high {
    border: 3px solid #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    animation: shake 0.5s ease-in-out;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.statistics-panel h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.parameter-explanation {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background-color: var(--background-light);
    border-radius: 6px;
    border-left: 3px solid var(--secondary-color);
}

.parameter-explanation strong {
    color: var(--text-dark);
    font-weight: 600;
}

.stat-metric {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: var(--background-light);
    border-radius: 6px;
    font-size: 0.9rem;
}

.stat-metric strong {
    color: var(--text-dark);
}

.stat-metric span {
    color: var(--secondary-color);
    font-weight: 500;
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-sublabel {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.population-stat {
    background-color: #eff6ff;
    border: 2px solid var(--primary-color);
}

[data-theme="dark"] .population-stat {
    background-color: rgba(59, 130, 246, 0.1);
}

.sample-stat {
    background-color: #f0fdf4;
    border: 2px solid #10b981;
}

[data-theme="dark"] .sample-stat {
    background-color: rgba(16, 185, 129, 0.1);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-difference {
    padding: 0.75rem;
    background-color: var(--background-light);
    border-radius: 6px;
    text-align: center;
    margin-bottom: 1rem;
}

.stat-difference strong {
    color: var(--text-dark);
    font-size: 0.9rem;
}

.stat-difference span {
    font-size: 1.1rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.bias-icon {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}

/* Footer */
.footer {
    background-color: var(--background-white);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .pros-cons {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .canvas-container {
        min-height: 400px;
    }

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

    .simulation-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .simulation-controls button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .title-section h1 {
        font-size: 2rem;
    }

    .scenario-title {
        font-size: 1rem;
    }

    .method-tabs {
        flex-direction: column;
    }

    .tab-btn {
        min-width: 100%;
    }

    .canvas-controls {
        flex-direction: column;
    }

    .sample-info {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .header-right {
        gap: 0.5rem;
    }

    .scenario-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .scenario-dropdown {
        min-width: 150px;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    #new-scenario-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 1rem 1rem;
    }

    .canvas-container {
        padding: 1rem;
        min-height: 350px;
    }

    .method-content {
        padding: 1rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 0.625rem 1rem;
    }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
a:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Data View Modal */
.data-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.data-modal-content {
    background-color: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.data-modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.data-modal-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-close:hover {
    background-color: var(--background-light);
    color: var(--text-dark);
}

.data-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.data-info {
    background-color: var(--background-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.data-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.data-info strong {
    font-weight: 600;
}

.data-legend {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.legend-highlight {
    font-size: 1.2rem;
    margin-right: 0.25rem;
}

.legend-highlight.sampled {
    color: var(--secondary-color);
}

.legend-highlight.not-sampled {
    color: var(--text-light);
}

.data-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead {
    background-color: var(--background-light);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: var(--background-light);
}

.data-table tbody tr.sampled {
    background-color: rgba(59, 130, 246, 0.1);
    font-weight: 500;
}

[data-theme="dark"] .data-table tbody tr.sampled {
    background-color: rgba(59, 130, 246, 0.2);
}

.data-table tbody tr.sampled:hover {
    background-color: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .data-table tbody tr.sampled:hover {
    background-color: rgba(59, 130, 246, 0.25);
}

.data-table td {
    padding: 0.75rem 1rem;
    color: var(--text-dark);
}

.data-table td.group-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.group-color-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.data-table td.value-cell {
    font-family: 'Monaco', 'Menlo', monospace;
}

.data-table td.sample-indicator {
    text-align: center;
}

.sample-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sample-badge.yes {
    background-color: var(--secondary-color);
    color: white;
}

.sample-badge.no {
    background-color: var(--border-color);
    color: var(--text-light);
}

/* Responsive adjustments for data modal */
@media (max-width: 768px) {
    .data-modal {
        padding: 0;
    }
    
    .data-modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .data-modal-header {
        padding: 1rem;
    }
    
    .data-modal-header h2 {
        font-size: 1.25rem;
    }
    
    .data-modal-body {
        padding: 1rem;
    }
    
    .data-info {
        grid-template-columns: 1fr;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
