@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #1e293b;
    line-height: 1.7;
    font-weight: 300;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 40px;
}

.hero-section {
    text-align: center;
    margin-bottom: 120px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 200;
    background: linear-gradient(135deg, #d97706 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 40px;
}

.circular-badge {
    width: 120px;
    height: 120px;
    border: 2px solid;
    border-image: linear-gradient(135deg, #d97706, #0891b2) 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px auto;
    background: white;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 80px 60px;
    margin-bottom: 100px;
}

.chart-section {
    position: relative;
}

.chart-header {
    margin-bottom: 40px;
}

.chart-title {
    font-size: 1.8rem;
    font-weight: 200;
    color: #1e293b;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.chart-category {
    font-size: 0.9rem;
    background: linear-gradient(135deg, #d97706 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.chart-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px;
    height: 400px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.chart-container:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.chart-container.large {
    grid-column: 1 / -1;
    height: 500px;
}

.metrics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
    margin-bottom: 120px;
}

.metric-item {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #d97706 0%, #0891b2 100%);
}

.metric-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.metric-value {
    font-size: 3.5rem;
    font-weight: 200;
    background: linear-gradient(135deg, #d97706 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.metric-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.metric-description {
    font-size: 1rem;
    color: #94a3b8;
    margin-top: 12px;
    line-height: 1.6;
    font-weight: 300;
}

.load-btn {
    background: linear-gradient(135deg, #d97706 0%, #0891b2 100%);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    margin: 0 auto 60px auto;
    display: block;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.load-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
}

.divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #d97706 0%, #0891b2 100%);
    margin: 80px 0;
    border-radius: 1px;
}

@media (max-width: 768px) {
    .container {
        padding: 60px 20px;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .chart-container {
        padding: 30px;
        height: 350px;
    }
}

.gradient-text {
    background: linear-gradient(135deg, #d97706 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Homepage table CSS */
.dao-analytics-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 80px 0;
}

.dao-table-container {
    background: #ffffff;
    /*border-radius: 20px;*/
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dao-table-header {
    background: linear-gradient(to right, #d18215, #3797a1, #d18215);
    color: white;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dao-table-row {
    padding: 20px 35px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    background: #ffffff;
}

.dao-table-row:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
    border-left: 4px solid #3498db;
}

.dao-table-row:last-child {
    border-bottom: none;
}

.dao-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
}

.dao-rank.top-3 {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.dao-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.chain-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    color: #2c3e50;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chain-badge.ethereum {
    background: linear-gradient(135deg, #627eea, #4f6bd5);
    color: white;
}

.chain-badge.off-chain {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.grade-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    min-width: 60px;
}

.grade-aplus {
    background: linear-gradient(135deg, #006699, #006680);
    color: white;
}

.grade-a {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.grade-b {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.grade-c {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.grade-d {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.score-display {
    font-weight: 700;
    font-size: 18px;
    color: #2c3e50;
}

.compliance-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.compliance-high {
    background: linear-gradient(135deg, #d5f4e6, #a8e6cf);
    color: #27ae60;
}

.compliance-low {
    background: linear-gradient(135deg, #fdeaea, #f8d7da);
    color: #e74c3c;
}

.decentralization-metric {
    display: flex;
    align-items: center;
    gap: 10px;
}

.decentralization-icon {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.trend-up {
    color: #e74c3c;
}

.trend-down {
    color: #27ae60;
}

.trend-neutral {
    color: #95a5a6;
}

.decentralization-value {
    font-weight: 600;
    font-size: 14px;
}

.section-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -1px;
}

.section-subtitle {
    color: #7f8c8d;
    font-size: 18px;
    margin-bottom: 50px;
    font-weight: 400;
}

.table-loading {
    display: none;
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hover-indicator {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    color: #3498db;
}

.dao-table-row:hover .hover-indicator {
    opacity: 1;
    transform: translateY(-50%) translateX(-5px);
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.loading-overlay.active {
    opacity: 1;
}

.loading-content {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 200px;
}

.loading-text {
    color: #333;
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

/* Ensure relative positioning for target elements */
.loading-target {
    position: relative;
}

.bg-image {
    background-image: url('/images/home_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Footer logo responsive styling */
#footer_logo {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Tablet styles (768px to 991px) */
@media (max-width: 991.98px) and (min-width: 768px) {
    #footer_logo {
        max-width: 90%;
        height: auto;
    }
}

/* Mobile styles (up to 767px) */
@media (max-width: 767.98px) {
    #footer_logo {
        max-width: 70%;
        height: auto;
        margin: 0 auto;
    }

    .dao-table-header,
    .dao-table-row {
        padding: 15px 20px;
    }

    .dao-rank {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-right: 10px;
    }

    .dao-name {
        font-size: 14px;
    }

    .section-title {
        font-size: 24px;
    }
}

/* Small mobile styles (up to 575px) */
@media (max-width: 575.98px) {
    #footer_logo {
        max-width: 50%;
        height: auto;
    }

    .dao-analytics-section {
        padding: 60px 0;
    }
}

/* ===== MOBILE CARD STYLES ===== */
/* These styles apply to the mobile card layout */
.dao-table-mobile-card {
    display: block;
    padding: 20px 25px;
    border-bottom: 1px solid #f1f3f4;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.dao-table-mobile-card:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.12);
    border-left: 3px solid #3498db;
}

.dao-table-mobile-card:last-child {
    border-bottom: none;
}

.dao-mobile-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.3;
    display: flex;
    align-items: center;
}

.dao-mobile-meta {
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.4;
}

/* Add subtle arrow indicator for mobile cards */
.dao-table-mobile-card::after {
    content: "→";
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
    font-size: 18px;
    transition: all 0.3s ease;
}

.dao-table-mobile-card:hover::after {
    color: #3498db;
    transform: translateY(-50%) translateX(3px);
}

/* Mobile card rank styling */
.dao-mobile-name .dao-rank {
    width: 28px;
    height: 28px;
    font-size: 12px;
    margin-right: 12px;
}

/* Mobile loading state adjustments */
@media (max-width: 575.98px) {
    .table-loading {
        padding: 40px 20px;
        text-align: center;
    }
}

/* Ensure mobile cards container has proper styling */
#dao-mobile-cards {
    background: #ffffff;
}

/* ===== IMPROVED MOBILE CARD STYLES ===== */
.dao-table-mobile-card {
    display: block;
    padding: 0;
    border-bottom: 1px solid #f1f3f4;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dao-table-mobile-card:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.12);
    border-left: 3px solid #3498db;
}

.dao-table-mobile-card:last-child {
    border-bottom: none;
}

/* Mobile Card Header */
.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px 20px;
}

.mobile-card-title {
    display: flex;
    align-items: center;
    flex: 1;
}

.mobile-dao-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.3;
    margin-left: 2px;
}

.mobile-card-arrow {
    color: #bdc3c7;
    font-size: 18px;
    transition: all 0.3s ease;
}

.dao-table-mobile-card:hover .mobile-card-arrow {
    color: #3498db;
    transform: translateX(3px);
}

/* Mobile Card Content */
.mobile-card-content {
    padding: 0 20px 16px 20px;
}

.mobile-card-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mobile-grade-score {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-score {
    font-weight: 700;
    font-size: 16px;
    color: #2c3e50;
}

.mobile-chain {
    font-size: 12px;
    color: #7f8c8d;
    background: #ecf0f1;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-card-secondary {
    margin-top: 8px;
}

.mobile-compliance {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mobile-compliance.compliance-high {
    background: linear-gradient(135deg, #d5f4e6, #a8e6cf);
    color: #27ae60;
}

.mobile-compliance.compliance-low {
    background: linear-gradient(135deg, #fdeaea, #f8d7da);
    color: #e74c3c;
}

/* Rank styling for mobile */
.mobile-card-title .dao-rank {
    width: 28px;
    height: 28px;
    font-size: 12px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Alternative minimal layout styles */
.mobile-grade-score-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.mobile-score-simple {
    font-weight: 700;
    font-size: 18px;
    color: #2c3e50;
}

/* Responsive adjustments */
@media (max-width: 575.98px) {
    .mobile-card-header {
        padding: 14px 18px 10px 18px;
    }

    .mobile-card-content {
        padding: 0 18px 14px 18px;
    }

    .mobile-dao-name {
        font-size: 15px;
    }

    .mobile-score {
        font-size: 15px;
    }

    .mobile-score-simple {
        font-size: 16px;
    }
}

/* Remove the old mobile card after class since we're not using it anymore */
.dao-table-mobile-card::after {
    display: none;
}



/* Improved CSS for Ultra-Fast DAO Rankings */

/* FIXED: Better positioned and styled banner */
.data-status-banner-improved {
    padding: 12px 20px;
    margin: 15px 0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border-left: 4px solid;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.banner-ultra-fast {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-left-color: #34d399;
}

.banner-enhanced {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border-left-color: #a78bfa;
}

.banner-cached {
    background-color: #fef3c7;
    color: #92400e;
    border-left-color: #f59e0b;
}

.banner-default {
    background-color: #f1f5f9;
    color: #475569;
    border-left-color: #64748b;
}

.banner-error {
    background-color: #fecaca;
    color: #dc2626;
    border-left-color: #ef4444;
}

/* FIXED: Better banner content layout */
.banner-content-improved {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.banner-message {
    flex: 1;
    line-height: 1.3;
    font-weight: 500;
}

.banner-badge {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.retry-button-improved {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #dc2626;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.retry-button-improved:hover {
    background: rgba(220, 38, 38, 0.25);
}

/* IMPROVED: Better table row styling */
.dao-row-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin-bottom: 2px;
    padding: 8px 12px;
}

.dao-row-clickable:hover {
    background-color: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* IMPROVED: Better DAO name styling */
.dao-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dao-name-text {
    font-weight: 500;
    color: #1f2937;
}

/* IMPROVED: Live badge styling */
.live-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse-green 2s infinite;
}

.live-badge-mobile {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* IMPROVED: Better chain badges */
.chain-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chain-ethereum {
    background: #627eea;
    color: white;
}

.chain-polygon {
    background: #8247e5;
    color: white;
}

.chain-arbitrum {
    background: #28a0f0;
    color: white;
}

.chain-base {
    background: #0052ff;
    color: white;
}

.chain-unknown {
    background: #6b7280;
    color: white;
}

/* IMPROVED: Better grade badges */
.grade-badge {
    font-size: 14px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 6px;
    text-align: center;
    min-width: 40px;
    display: inline-block;
}

.grade-a {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.grade-b {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.grade-c {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.grade-d {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.grade-f {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

/* IMPROVED: Better score display */
.score-display {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

/* IMPROVED: Better compliance badges */
.compliance-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.compliance-high {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.compliance-medium {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.compliance-low {
    background: #fecaca;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.compliance-minimal {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

/* IMPROVED: Mobile card styling */
.dao-card-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 8px;
    background: white;
}

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

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px 8px;
}

.mobile-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.mobile-dao-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 14px;
}

.mobile-card-arrow {
    color: #6b7280;
    font-size: 16px;
    font-weight: bold;
}

.mobile-card-content {
    padding: 0 15px 12px;
}

.mobile-card-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.mobile-grade-score {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-score {
    font-weight: 600;
    color: #1f2937;
    font-size: 13px;
}

.mobile-chain {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #4b5563;
    text-transform: uppercase;
}

/* IMPROVED: Decentralization metric */
.decentralization-metric {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

.trend-neutral {
    color: #6b7280;
}

.decentralization-value {
    color: #4b5563;
}

/* IMPROVED: Hover indicators */
.hover-indicator {
    color: #9ca3af;
    transition: all 0.2s;
    font-size: 14px;
}

.dao-row-clickable:hover .hover-indicator {
    color: #4b5563;
    transform: translateX(2px);
}

/* RESPONSIVE: Better mobile styling */
@media (max-width: 768px) {
    .data-status-banner-improved {
        padding: 10px 15px;
        margin: 10px 0;
        font-size: 12px;
    }

    .banner-content-improved {
        flex-direction: row;
        gap: 8px;
    }

    .banner-badge {
        padding: 2px 6px;
        font-size: 10px;
    }

    .dao-row-clickable {
        padding: 6px 10px;
    }

    .mobile-card-header {
        padding: 10px 12px 6px;
    }

    .mobile-card-content {
        padding: 0 12px 10px;
    }
}

/* ACCESSIBILITY: Better focus states */
.dao-row-clickable:focus,
.dao-card-clickable:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* PERFORMANCE: Reduce animations on mobile */
@media (prefers-reduced-motion: reduce) {

    .live-badge,
    .live-badge-mobile,
    .dao-row-clickable,
    .dao-card-clickable {
        animation: none;
        transition: none;
    }
}


/* Additional CSS for All DAOs Interface */

/* Enhanced banner styles */
.banner-complete {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-left-color: #34d399;
}

.banner-incomplete {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-left-color: #fbbf24;
}

/* Banner actions */
.banner-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-load-all,
.btn-refresh {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-load-all:hover,
.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-load-all {
    background: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.5);
}

.btn-refresh {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

/* DAO count info */
.dao-count-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 20px;
    margin-top: 15px;
    font-size: 13px;
}

.count-info-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.count-display {
    font-weight: 600;
    color: #1f2937;
}

.data-source {
    color: #6b7280;
    font-style: italic;
}

.computation-time {
    color: #059669;
    font-weight: 500;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.spinner-large {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-content p {
    margin: 0;
    color: #4b5563;
    font-weight: 500;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #22c55e;
    color: white;
}

.notification-error {
    background: #ef4444;
    color: white;
}

.notification-info {
    background: #3b82f6;
    color: white;
}

/* Enhanced DAO table improvements */
.dao-table-row {
    transition: all 0.2s ease;
    border-radius: 4px;
    margin-bottom: 1px;
}

.dao-table-row:hover {
    background-color: #f8fafc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Make sure all DAOs are visible */
.dao-table-container {
    min-height: auto;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .banner-content-improved {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .banner-actions {
        align-self: flex-end;
    }

    .count-info-content {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
        max-width: none;
    }

    .notification.show {
        transform: translateY(0);
    }
}

/* Debug helper for counting DAOs */
.dao-debug-count::after {
    content: " (DAO #" counter(dao-counter) ")";
    counter-increment: dao-counter;
    color: #6b7280;
    font-size: 11px;
}

.dao-table-body {
    counter-reset: dao-counter;
}

/* Improved grade badges with better contrast */
.grade-badge {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Better chain badges */
.chain-ethereum {
    background: linear-gradient(135deg, #627eea, #4c63d2);
}

.chain-unknown {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: #f9fafb;
}

/* Loading state for individual rows */
.dao-row-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dao-row-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Ensure proper spacing */
.table-responsive {
    margin-bottom: 20px;
}

/* Better visual hierarchy */
.dao-name-text {
    font-weight: 500;
    color: #111827;
}

.dao-rank {
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

/* Accessibility improvements */
.dao-table-row:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.btn-load-all:focus,
.btn-refresh:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.logout-message {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Add to your existing CSS */
.btn-yellow {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #212529 !important;
}

.btn-yellow:hover {
    background-color: #e0a800 !important;
    border-color: #d39e00 !important;
}

/* Hide #bg_intro only on mobile portrait */
@media screen and (max-width: 767px) {
    #bg_intro {
        display: none !important;
    }
}

/* Center login form on mobile screens */
@media screen and (max-width: 767px) {
    #login-form .row {
        display: flex;
        flex-direction: column;
        /* stack content vertically */
        justify-content: center;
        /* center vertically */
        min-height: 100vh;
        /* take full viewport height */
    }

    #login-form .col-lg-7 {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #login-form form {
        margin-top: 20px;
        /* reduce the margin so it's not pushed down */
    }
}

/* Mobile + tablets (portrait & landscape, incl. iPad) */
@media (max-width: 991.98px) {

    .mfp-wrap,
    .mfp-container {
        height: 100vh !important;
    }

    .mfp-container {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 16px;
        overflow: hidden;
    }

    .mfp-content {
        display: block !important;
        margin: 0 auto !important;
        width: 100% !important;
        text-align: left;
    }

    /* Stack/hide the left image column on small screens */
    #login-form .col-lg-5 {
        display: none !important;
    }

    #login-form .col-lg-7 {
        width: 100% !important;
        max-width: 560px;
        margin: 0 auto;
    }

    /* Keep panel within viewport; scroll inside if needed */
    #login-form .bg-white {
        max-height: calc(100vh - 64px);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    #login-form form {
        margin-top: 16px !important;
    }
}

.dao-listing-prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.dao-listing-prompt-overlay {
    background: rgba(0, 0, 0, 0.5);
    /* darken */
    backdrop-filter: blur(12px);
    /* add blur */
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    /* Safari support */

    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dao-listing-prompt-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100000;
}

.dao-listing-prompt-content h3 {
    margin-bottom: 15px;
    color: #333;
}

.dao-listing-prompt-content p {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.5;
}

.dao-listing-prompt-buttons {
    margin-top: 20px;
}

.dao-listing-prompt-buttons .btn {
    margin: 0 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

#data-status-banner { display: block; }
@media (max-width: 1024px) {
  #data-status-banner { position: relative; z-index: 1; }
}

/* Center banner content on mobile & tablet */
@media (max-width: 748px) {
  #data-status-banner .banner-content-improved {
    display: flex;
    flex-direction: column;
    align-items: center;   /* centers everything inside */
    text-align: center;
  }

  #data-status-banner .banner-actions {
    margin-top: 10px;
    width: 100%;
    display: flex;
    justify-content: center; /* center button horizontally */
  }

  #data-status-banner .banner-actions a.btn {
    margin: 0 auto;         /* force center */
    display: inline-block;  /* avoid full width stretch */
  }
}

/* Simplified CSS - The WordSlider will calculate the width automatically */

.word-slider-container {
    display: inline-block;
    position: relative;
    overflow: hidden;
    vertical-align: top;
}

.word-slider {
    position: relative;
    display: inline-block;
    min-height: 1.2em;
    /* Width will be set automatically by JavaScript */
}

.word-slider .word {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    white-space: nowrap;
    /* Let each word use its natural width */
    width: max-content;
}

.word-slider .word.active {
    opacity: 1;
    transform: translateY(0);
}

.word-slider .word.exit {
    opacity: 0;
    transform: translateY(-30px);
}

/* Optional: Different colors for each word */
.word[data-word="Intelligence"] { color: #007bff; }
.word[data-word="Governance"] { color: #28a745; }
.word[data-word="Security"] { color: #dc3545; }
.word[data-word="Finance"] { color: #ffc107; }
.word[data-word="Analytics"] { color: #6f42c1; }
.word[data-word="Innovation"] { color: #fd7e14; }
.word[data-word="Automation"] { color: #20c997; }
.word[data-word="Transparency"] { color: #17a2b8; }