/* RDFSolve Styles - GitHub-inspired clean design */
:root {
    --primary-color: #0969da;
    --success-color: #1a7f37;
    --error-color: #d1242f;
    --warning-color: #bf8700;
    --info-color: #0969da;
    --data-color: #8250df;
    --background-color: #ffffff;
    --card-background: #f6f8fa;
    --text-primary: #24292f;
    --text-secondary: #656d76;
    --text-muted: #8b949e;
    --border-color: #d0d7de;
    --border-radius: 6px;
    --box-shadow: 0 1px 3px rgba(16, 22, 26, 0.15);
    --transition: all 0.15s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 24px;
    line-height: 1.5;
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 14px;
}

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

/* Header */
.header {
    background: var(--background-color);
    color: var(--text-primary);
    padding: 32px 0;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.header h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.25;
}

.header p {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: var(--text-secondary);
}

.header-nav {
    display: flex;
    gap: 16px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.header-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--card-background);
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.header-nav a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
}

.last-updated {
    font-size: 12px;
    color: var(--text-muted);
}

/* Stats Section */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-background);
    padding: 16px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--text-secondary);
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.25;
}

.stat-number.total-number { color: var(--info-color); }
.stat-number.success-number { color: var(--success-color); }
.stat-number.error-number { color: var(--error-color); }
.stat-number.data-number { color: var(--data-color); }

/* Section Titles */
.section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 16px 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

/* Dataset Grid */
.dataset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.dataset-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

.dataset-card:hover {
    border-color: var(--text-secondary);
}

.dataset-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-icon {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 500;
}

.status-icon.success {
    background: var(--success-color);
    color: white;
}

.status-icon.error {
    background: var(--error-color);
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.status-badge.success {
    color: var(--success-color);
    background: #dafbe1;
    border: 1px solid rgba(26, 127, 55, 0.15);
}

.status-badge.error {
    color: var(--error-color);
    background: #ffebe9;
    border: 1px solid rgba(209, 36, 47, 0.15);
}

.dataset-meta {
    margin: 8px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.data-files {
    margin: 12px 0;
    padding: 12px;
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.data-files-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 12px;
}

.data-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.data-link {
    display: inline-block;
    padding: 2px 6px;
    background: var(--card-background);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    font-size: 11px;
    transition: var(--transition);
}

.data-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.view-link {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 16px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
    width: 100%;
}

.view-link:hover {
    background: #0550ae;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 16px;
}

/* Footer */
.footer {
    margin-top: 48px;
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
    background: var(--card-background);
    border-radius: var(--border-radius);
    color: var(--text-muted);
    font-size: 12px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    padding: 0 24px;
    text-align: left;
}

.footer-section h3 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.footer-section h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
}

.footer-section p {
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }
    
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .dataset-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .header {
        padding: 24px 0;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .dataset-card {
        padding: 12px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Dark mode support (optional - uncomment to enable) */
/*
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #0d1117;
        --card-background: #161b22;
        --text-primary: #f0f6fc;
        --text-secondary: #7d8590;
        --text-muted: #656d76;
        --border-color: #30363d;
    }
    
    .data-files {
        background: var(--card-background);
    }
    
    .status-badge.success {
        background: rgba(26, 127, 55, 0.15);
    }
    
    .status-badge.error {
        background: rgba(209, 36, 47, 0.15);
    }
}
*/