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

:root {
    --primary-color: #14F195;
    --secondary-color: #00D4FF;
    --dark-bg: #0A0E27;
    --card-bg: #141829;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A9BB;
    --border-color: #2D3748;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
}

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

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

/* Command center: the redesign's L0 pulse. It intentionally distinguishes
   observed values from unavailable/placeholder backend responses. */
.command-center { margin: 0 0 30px; padding: 28px; border: 1px solid #25445a; border-radius: 18px; background: linear-gradient(135deg, #101b39, #0c172c 62%, #102b3a); box-shadow: 0 18px 42px rgba(0,0,0,.25); }
.command-center-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.command-center .eyebrow { margin-bottom: 7px; color: var(--secondary-color); font-size: .68rem; letter-spacing: .18em; }
.command-center h2 { margin: 0; color: #fff; font-size: clamp(1.7rem,3vw,2.5rem); letter-spacing: -.04em; }
.command-center-lede { max-width: 620px; margin: 7px 0 0; color: #9ab2c8; font-size: .92rem; }
.command-center-meta { display: flex; align-items: center; gap: 9px; color: #9ab2c8; font: .72rem ui-monospace,monospace; white-space: nowrap; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-color); box-shadow: 0 0 12px var(--primary-color); }
.command-refresh { border: 1px solid #385e76; border-radius: 999px; padding: 7px 12px; background: #142b42; color: #d8edf4; cursor: pointer; }
.pulse-grid { display: grid; grid-template-columns: repeat(6, minmax(120px,1fr)); gap: 1px; margin-top: 25px; background: #31516a; border: 1px solid #31516a; border-radius: 12px; overflow: hidden; }
.pulse-card { min-height: 105px; padding: 15px; background: rgba(14,31,55,.92); }
.pulse-label, .flow-kicker { display: block; color: #79a9be; font: 700 .58rem ui-monospace,monospace; letter-spacing: .13em; }
.pulse-card strong { display: block; margin: 13px 0 6px; color: #f1fbff; font: 600 1.22rem ui-monospace,monospace; }
.pulse-card small { display: block; color: #8da7bc; font-size: .65rem; line-height: 1.35; }
.pulse-value { color: #f1fbff; }
.operating-flow { display: flex; align-items: center; gap: 10px; margin: 22px 0 0; overflow-x: auto; padding-bottom: 2px; }
.flow-node { min-width: 150px; flex: 1; padding: 13px 14px; border: 1px solid #31516a; border-radius: 10px; background: rgba(9,22,42,.72); }
.flow-node b, .flow-node small { display: block; margin-top: 5px; }.flow-node b { color: #edfaff; font-size: .82rem; }.flow-node small { color: #87a5b9; font-size: .65rem; }.flow-arrow { color: var(--secondary-color); font-size: 1.25rem; }
.command-panels { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; margin-top: 14px; }
.command-panel { min-width: 0; padding: 17px; border: 1px solid #31516a; border-radius: 12px; background: rgba(9,22,42,.72); }.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }.panel-heading h3 { margin: 5px 0 14px; color: #edfaff; font-size: 1rem; }.panel-heading a { color: #83ddec; font-size: .72rem; white-space: nowrap; }
.manifest-apps { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }.manifest-app { display: flex; flex-direction: column; gap: 4px; padding: 9px; border: 1px solid #294860; border-radius: 8px; color: #d9edf4; text-decoration: none; }.manifest-app:hover { border-color: var(--secondary-color); }.manifest-app b { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }.manifest-app span { color: #7eabb8; font: .55rem ui-monospace,monospace; letter-spacing: .08em; }.state-copy, .command-events p { margin: 0; color: #91aabd; font-size: .72rem; }.command-events { display: grid; gap: 9px; }.event-unknown { padding-left: 10px; border-left: 2px solid var(--warning-color); }.event-good { padding-left: 10px; border-left: 2px solid var(--success-color); }
@media (max-width: 950px) { .pulse-grid { grid-template-columns: repeat(3,1fr); }.command-panels { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .command-center { padding: 18px; }.command-center-head { align-items: start; flex-direction: column; }.pulse-grid { grid-template-columns: repeat(2,1fr); }.manifest-apps { grid-template-columns: repeat(2,1fr); }.operating-flow { align-items: stretch; flex-direction: column; }.flow-arrow { transform: rotate(90deg); align-self: center; } }

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(20, 248, 149, 0.1);
    border-radius: 8px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

.status-indicator.loading {
    background-color: var(--warning-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 12px rgba(20, 248, 149, 0.2);
}

.card h2 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--primary-color);
}

/* Health Card */
.health-card {
    grid-column: 1 / 2;
}

.health-status {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.health-score-circle {
    position: relative;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.health-score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.health-score-circle circle {
    fill: none;
    stroke-width: 8;
}

.health-bg {
    stroke: var(--border-color);
}

.health-progress {
    stroke: var(--primary-color);
    stroke-linecap: round;
    stroke-dasharray: 283;
    transition: stroke-dashoffset 0.5s ease;
}

.score {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.health-details {
    flex: 1;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.detail-row .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-row .value {
    font-weight: 600;
}

.recommendations {
    margin-top: 15px;
    padding: 10px;
    background: rgba(20, 248, 149, 0.1);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.recommendations p {
    margin: 5px 0;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 10px 15px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Performers List */
.performers-list {
    max-height: 300px;
    overflow-y: auto;
}

.performer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.performer-item:last-child {
    border-bottom: none;
}

.performer-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--border-color);
    border-radius: 50%;
    font-weight: bold;
    margin-right: 10px;
    font-size: 0.9rem;
}

.performer-rank.top-3 {
    background: var(--primary-color);
    color: var(--dark-bg);
}

.performer-name {
    flex: 1;
    font-size: 0.9rem;
}

.performer-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Trend Analysis */
.trend-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.trend-item {
    padding: 15px;
    background: rgba(20, 248, 149, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.metric-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.metric-direction {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.metric-change {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

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

/* Direction Colors */
.direction-up {
    color: var(--success-color);
}

.direction-down {
    color: var(--danger-color);
}

.direction-stable {
    color: var(--warning-color);
}

/* Anomalies */
.anomalies-list {
    max-height: 300px;
    overflow-y: auto;
}

.anomaly-item {
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--danger-color);
    border-radius: 4px;
}

.anomaly-type {
    font-weight: bold;
    color: var(--danger-color);
    font-size: 0.9rem;
}

.anomaly-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.anomaly-severity {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-top: 5px;
}

.severity-critical {
    background: var(--danger-color);
    color: white;
}

.severity-warning {
    background: var(--warning-color);
    color: white;
}

.severity-info {
    background: var(--secondary-color);
    color: var(--dark-bg);
}

/* Rankings */
.rankings-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.rankings-controls input {
    width: 80px;
    padding: 8px 12px;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
}

.rankings-controls button {
    padding: 8px 16px;
    background: var(--primary-color);
    color: var(--dark-bg);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.rankings-controls button:hover {
    background: var(--secondary-color);
}

.rankings-table {
    overflow-x: auto;
}

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

.rankings-table th {
    background: var(--border-color);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
}

.rankings-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.rankings-table tr:hover {
    background: rgba(20, 248, 149, 0.05);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat {
    padding: 15px;
    background: rgba(20, 248, 149, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Debug Panel */
.debug-panel {
    margin-top: 20px;
    padding: 15px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.debug-panel button {
    padding: 8px 16px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 10px;
}

.debug-panel button:hover {
    opacity: 0.9;
}

.debug-panel details {
    margin: 8px 0;
    padding: 8px;
    background: var(--dark-bg);
    border-radius: 4px;
}

.debug-panel summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--primary-color);
}

.debug-panel pre {
    margin-top: 10px;
    padding: 10px;
    background: var(--dark-bg);
    border-radius: 4px;
    overflow-x: auto;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Loading State */
.loading {
    color: var(--text-secondary);
    font-style: italic;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-content h1 {
        font-size: 1.8rem;
    }

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

    .trend-metrics {
        grid-template-columns: 1fr;
    }

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

    .health-status {
        flex-direction: column;
        align-items: center;
    }
}

/* Tab Navigation */
.main-nav {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.nav-tab {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-tab:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.nav-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Validators Tab Styles */
.validators-container {
    max-width: 100%;
}

.validators-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.validators-title h2 {
    font-size: 2rem;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.validators-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.validators-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.action-btn.secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 241, 149, 0.3);
}

/* Collection Progress */
.collection-progress-container {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.progress-eta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    min-width: 45px;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Filters Panel */
.filters-panel {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.filters-section h3 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-group input,
.filter-group select {
    padding: 10px;
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filters-actions {
    display: flex;
    gap: 10px;
}

/* Sort Controls */
.sort-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.sort-group select {
    padding: 8px 12px;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Validators Table Container */
.validators-table-container {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.validators-count {
    font-weight: 600;
    color: var(--primary-color);
}

.view-controls {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 15px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

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

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

/* Table View */
.table-view {
    display: none;
}

.table-view.active {
    display: block;
}

.validators-table-wrapper {
    overflow-x: auto;
}

.validators-table {
    width: 100%;
    border-collapse: collapse;
}

.validators-table th,
.validators-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.validators-table th {
    background: var(--dark-bg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.validators-table th.sortable {
    cursor: pointer;
    position: relative;
}

.validators-table th.sortable:hover {
    color: var(--primary-color);
}

.validators-table td {
    color: var(--text-primary);
}

.validator-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.validator-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.validator-info {
    display: flex;
    flex-direction: column;
}

.validator-info .name {
    font-weight: 600;
    margin-bottom: 2px;
}

.validator-info .pubkey {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.country-flag {
    font-size: 1.2rem;
}

.location-text {
    font-size: 0.9rem;
}

.metric-value {
    font-weight: 600;
}

.metric-value.apy {
    color: var(--success-color);
}

.metric-value.commission {
    color: var(--warning-color);
}

.metric-value.uptime {
    color: var(--primary-color);
}

.stake-amount {
    display: flex;
    flex-direction: column;
}

.stake-amount .value {
    font-weight: 600;
}

.stake-amount .unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.status-badge.verified {
    background: rgba(20, 241, 149, 0.2);
    color: var(--primary-color);
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons button {
    padding: 6px 10px;
    background: var(--border-color);
    border: none;
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.action-buttons button:hover {
    background: var(--primary-color);
    color: white;
}

/* Card View */
.card-view {
    display: none;
    padding: 20px;
}

.card-view.active {
    display: block;
}

.validators-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.validator-card {
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.validator-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(20, 241, 149, 0.15);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    width: 90%;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

/* Loading States */
.loading-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-btn {
    padding: 8px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enhanced Responsive Design for Validators Tab */
@media (max-width: 768px) {
    .validators-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

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

    .sort-controls {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .pagination-container {
        flex-direction: column;
        gap: 15px;
    }

    .validators-cards-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        flex-direction: column;
        gap: 5px;
    }

    .validators-table-wrapper {
        font-size: 0.85rem;
    }

    .validators-table th,
    .validators-table td {
        padding: 10px 8px;
    }
}

/* ============================================================================
   DAPPS TAB STYLES
   ============================================================================ */

/* Dapps Container */
.dapps-container {
    width: 100%;
}

/* Dapps Header */
.dapps-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.dapps-title h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dapps-title p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
}

/* Ecosystem Stats Pills */
.ecosystem-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(20, 241, 149, 0.1), rgba(0, 212, 255, 0.1));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-pill:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px rgba(20, 241, 149, 0.2);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Dapps Filters */
.dapps-filters {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* Category Chips */
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chip {
    padding: 10px 18px;
    background: rgba(45, 55, 72, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-chip:hover {
    background: rgba(20, 241, 149, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.category-chip.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    font-weight: 600;
}

/* Type Filters */
.type-filters {
    display: flex;
    gap: 10px;
}

.type-filter {
    flex: 1;
    padding: 12px 20px;
    background: rgba(45, 55, 72, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-filter:hover {
    background: rgba(20, 241, 149, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.type-filter.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    font-weight: 600;
}

/* Search Input */
.search-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(45, 55, 72, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(20, 241, 149, 0.05);
    box-shadow: 0 0 0 3px rgba(20, 241, 149, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* Dapps Grid */
.dapps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Dapp Card */
.dapp-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dapp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.dapp-card:hover::before {
    transform: scaleX(1);
}

.dapp-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 24px rgba(20, 241, 149, 0.15);
}

.dapp-card.existing {
    background: linear-gradient(135deg, rgba(20, 241, 149, 0.03), rgba(0, 0, 0, 0));
}

.dapp-card.envisioned {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.03), rgba(0, 0, 0, 0));
}

/* Dapp Card Header */
.dapp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.dapp-icon {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(20, 241, 149, 0.3));
}

.dapp-type-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dapp-type-badge.existing {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(20, 241, 149, 0.2));
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dapp-type-badge.envisioned {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(99, 102, 241, 0.2));
    color: var(--secondary-color);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* Dapp Card Body */
.dapp-card-body {
    margin-bottom: 20px;
}

.dapp-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dapp-tagline {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
}

.dapp-category {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: inline-block;
    padding: 4px 12px;
    background: rgba(45, 55, 72, 0.5);
    border-radius: 12px;
}

.dapp-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Dapp Card Footer */
.dapp-card-footer {
    display: flex;
    justify-content: flex-end;
}

.view-details-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-details-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(20, 241, 149, 0.4);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* ============================================================================
   DAPP MODAL STYLES
   ============================================================================ */

.dapp-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--card-bg);
}

.dapp-modal .modal-header {
    background: linear-gradient(135deg, rgba(20, 241, 149, 0.1), rgba(0, 212, 255, 0.1));
    border-bottom: 2px solid var(--border-color);
    padding: 25px 30px;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.modal-title-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dapp-modal .modal-header h3 {
    font-size: 2rem;
    margin: 0;
}

.dapp-modal .modal-body {
    padding: 0;
}

/* Modal Content Sections */
.dapp-modal-content {
    padding: 30px;
}

.dapp-modal-header-section {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(20, 241, 149, 0.05), rgba(0, 212, 255, 0.05));
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.dapp-icon-large {
    font-size: 5rem;
    line-height: 1;
    filter: drop-shadow(0 8px 16px rgba(20, 241, 149, 0.4));
}

.dapp-info {
    flex: 1;
}

.dapp-tagline-large {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.dapp-category-large {
    font-size: 1rem;
    color: var(--text-secondary);
    display: inline-block;
    padding: 8px 16px;
    background: rgba(45, 55, 72, 0.5);
    border-radius: 12px;
}

.dapp-modal-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.dapp-modal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.dapp-modal-section h4 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dapp-description-full {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Feature List */
.feature-list,
.advantage-list {
    list-style: none;
    padding: 0;
}

.feature-list li,
.advantage-list li {
    padding: 12px 0 12px 30px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

.feature-list li::before,
.advantage-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.advantage-list li::before {
    content: '⚡';
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.metric-item {
    padding: 15px;
    background: rgba(45, 55, 72, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.metric-item:hover {
    background: rgba(20, 241, 149, 0.05);
    border-color: var(--primary-color);
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.metric-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Why Notable */
.why-notable {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    padding: 20px;
    background: linear-gradient(135deg, rgba(20, 241, 149, 0.05), rgba(0, 212, 255, 0.05));
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
}

/* Visit Website Button */
.visit-website-btn {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-align: center;
}

.visit-website-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(20, 241, 149, 0.4);
}

/* ============================================================================
   RESPONSIVE DESIGN FOR DAPPS TAB
   ============================================================================ */

@media (max-width: 768px) {
    .dapps-header {
        flex-direction: column;
        gap: 20px;
    }

    .ecosystem-stats {
        width: 100%;
        justify-content: space-between;
    }

    .stat-pill {
        flex: 1;
        min-width: 80px;
        padding: 12px 15px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

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

    .type-filters {
        flex-direction: column;
    }

    .dapp-modal-header-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .dapp-icon-large {
        font-size: 4rem;
    }

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

    .dapp-modal {
        max-width: 95%;
        margin: 20px auto;
    }
}

/* ============================================================================
   LOADING ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dapp-card {
    animation: fadeIn 0.4s ease forwards;
}

.dapp-card:nth-child(1) { animation-delay: 0.05s; }
.dapp-card:nth-child(2) { animation-delay: 0.1s; }
.dapp-card:nth-child(3) { animation-delay: 0.15s; }
.dapp-card:nth-child(4) { animation-delay: 0.2s; }
.dapp-card:nth-child(5) { animation-delay: 0.25s; }
.dapp-card:nth-child(6) { animation-delay: 0.3s; }

/* Smooth scrollbar for modal */
.dapp-modal::-webkit-scrollbar {
    width: 10px;
}

.dapp-modal::-webkit-scrollbar-track {
    background: var(--dark-bg);
    border-radius: 5px;
}

.dapp-modal::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

.dapp-modal::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.yellowstone-panel { margin: 1.25rem 0; }
.yellowstone-status { display: flex; align-items: center; gap: .75rem; margin: .75rem 0; }
.yellowstone-status strong { letter-spacing: .08em; }
.yellowstone-status #yellowstone-latency { color: #94a3b8; font-size: .85rem; }
.yellowstone-status .health-dot { color: #94a3b8; }
.yellowstone-status .health-dot.healthy { color: #22c55e; }
.yellowstone-status .health-dot.critical { color: #ef4444; }
