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

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #8b5cf6;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-bg);
}

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

/* Navigation */
.navbar {
    background: var(--dark-bg);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.logo {
    width: 40px;
    height: 40px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

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

.nav-links a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 2px;
}

.nav-sep {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    margin: 0 0.25rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1e3a8a 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card.highlight-card {
    background: rgba(37, 99, 235, 0.3);
    border-color: var(--primary-color);
}

.stat-card.success-card {
    background: rgba(16, 185, 129, 0.3);
    border-color: var(--secondary-color);
}

.stat-card.amber-card {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.stat-percent {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0.5rem;
    color: var(--secondary-color);
}

.stat-stacked {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-stacked-row {
    text-align: center;
}

.stat-number-sm {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #f59e0b;
}

.stat-label-sm {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 0.3rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--dark-bg);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.alt-bg {
    background: white;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

/* Chart Grid */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
    max-width: 100%;
}

/* Two Column Layout */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.left-column .chart-card {
    margin: 0;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.right-column .chart-card {
    margin: 0;
}

.csv-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

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

.csv-preview-trigger {
    cursor: pointer;
}

.csv-preview-trigger:hover {
    opacity: 0.8;
}

/* CSV Modal */
.csv-modal-content {
    background: white;
    margin: 2% auto;
    padding: 2rem;
    width: 90%;
    max-width: 1200px;
    border-radius: 12px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.csv-modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--dark-bg);
}

.csv-browser-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
}

.csv-browser-controls .search-box {
    min-width: 300px;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    background: var(--light-bg);
}

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

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

.csv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.csv-table thead {
    position: sticky;
    top: 0;
    background: var(--dark-bg);
    color: white;
    z-index: 10;
}

.csv-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.csv-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.csv-table tbody tr.hidden {
    display: none;
}

.function-name {
    font-family: 'Monaco', 'Courier New', monospace;
    font-weight: 500;
    color: var(--dark-bg);
}

.function-module {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

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

.status-verified {
    background: #d1fae5;
    color: #065f46;
}

.status-spec {
    background: #dbeafe;
    color: #1e40af;
}

.status-external {
    background: #fef3c7;
    color: #92400e;
}

.status-axiom {
    background: #fef3c7;
    color: #92400e;
}

.csv-summary {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.75rem;
}

.status-none {
    background: #f3f4f6;
    color: #6b7280;
}

.function-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

.loading {
    text-align: center;
    padding: 2rem !important;
    color: var(--text-secondary);
}

.chart-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.chart-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.chart-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.chart-card img:hover {
    opacity: 0.9;
}

.chart-caption {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Modal for full-size image viewing */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    animation: fadeIn 0.3s;
}

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

.modal-content {
    max-width: 95%;
    max-height: 95%;
    margin: auto;
    display: block;
    animation: zoomIn 0.3s;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
}

.modal-caption {
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 1.125rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* Metrics Summary */
.metrics-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.metrics-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Metrics Summary Vertical */
.metrics-summary-vertical {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.metrics-summary-vertical h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.metrics-vertical-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Metrics Inline (within chart card) */
.metrics-inline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.verification-metrics-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.metric-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.metric-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.content-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section.alt-bg .content-card {
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.content-card ul {
    list-style-position: inside;
    color: var(--text-secondary);
}

.content-card ul li {
    margin-bottom: 0.5rem;
}

.content-card a {
    color: var(--primary-color);
}

/* Trust Grid */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.trust-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.trust-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.trust-item h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.trust-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.info-box.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: var(--warning);
}

.info-box h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.info-box pre {
    background: var(--dark-bg);
    color: #10b981;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.info-box code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
}

.info-box ul {
    list-style-position: inside;
    margin-top: 1rem;
}

.info-box ul li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        align-items: center;
    }

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

    .two-column-layout {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .section {
        padding: 3rem 0;
    }
}

/* Certifications Table */
.certifications-table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
}

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

.certifications-table thead {
    background: var(--dark-bg);
    color: white;
}

.certifications-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.certifications-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

.certifications-table .tx-hash {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.certifications-table .content-hash {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--accent-color);
}

.certifications-table .commit-link {
    font-family: 'Monaco', 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.certifications-table .tx-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.certifications-table .tx-link:hover {
    text-decoration: underline;
}

.certifications-table .verified-count {
    font-weight: 600;
    color: var(--success);
}

.certifications-table .artifact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.certifications-table .no-data {
    color: var(--text-secondary);
    font-style: italic;
}

.certifications-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Link Styles */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

