.stats-card {
    background-color: white;
    border: 1px solid #ccc;
    padding: 16px;
    font-family: 'Consolas', monospace;
}

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

.stats-title {
    margin: 0;
    font-size: 18px;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 1;
    min-width: 0;
}

.cluster-toggle {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-radius: 0;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    cursor: pointer;
    min-width: 160px;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

/* Global Cluster - Black/White theme */
.dropdown-trigger.global-cluster {
    background: black;
    border: 1px solid black;
    color: white;
}

.dropdown-trigger.global-cluster:hover {
    background-color: #f0f0f0;
    color: black;
}

/* Smooth waving animation for patriotic gradient */
@keyframes smoothWave {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* USA Cluster - Patriotic theme */
.dropdown-trigger.usa-cluster {
    background: linear-gradient(45deg, #B22234, #3C3B6E, #B22234);
    background-size: 300% 300%;
    border: 1px solid #B22234;
    color: white;
    animation: smoothWave 4s ease-in-out infinite;
}

.dropdown-trigger.usa-cluster:hover {
    background: #f0f0f0;
    color: #dc143c;
}

.dropdown-label {
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.dropdown-arrow {
    margin-left: 8px;
    font-size: 10px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: white;
    cursor: pointer;
    text-align: left;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.dropdown-option:hover {
    background-color: #f8f9fa;
}

/* USA Cluster option hover - Red theme */
.dropdown-option.usa-option:hover {
    background-color: #ffebee;
}

/* Global Cluster selected option - Grey theme */
.dropdown-option.global-option.selected {
    background-color: #f5f5f5;
    border-left: 3px solid #666;
}

/* USA Cluster selected option - Red theme */
.dropdown-option.usa-option.selected {
    background-color: #ffebee;
    border-left: 3px solid #dc143c;
}

.dropdown-option.usa-option.selected .option-name {
    color: black;
    font-weight: bold;
}

.dropdown-option.usa-option.selected .option-description {
    color: black;
}

.option-name {
    font-weight: bold;
    margin-bottom: 4px;
    color: #2c3e50;
}

.option-description {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}

.option-description strong {
    color: #2c3e50;
}

.stats-grid {
    display: flex;
    gap: 12px;
}

.stat-box {
    position: relative;
    padding: 12px;
}

.validator-metrics {
    flex: 1;
    background-color: #f5f5f5;
    border-left: 4px solid #2c3e50;
}

.browser-metrics {
    flex: 2;
    background-color: #ffb30068;
    border-left: 4px solid #ffb200;
}

.browser-metrics-container {
    display: flex;
    gap: 20px;
}

.browser-metrics-container .metric-container {
    flex: 1;
}

.source-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

.metric-container {
    padding: 8px;
    background: rgba(255, 255, 255, 0.7);
}

.metric-container:hover {
    background: rgba(255, 255, 255, 0.9);
}

.stat-label {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 22px;
    font-weight: bold;
    color: #2c3e50;
}

.stats-disclaimer {
    margin-top: 16px;
    font-style: italic;
    color: #777;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.tooltip-container {
    position: relative;
    display: inline-block;
    width: 100%;
    cursor: pointer;
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    text-align: center;
    padding: 8px 12px;
    z-index: 1000;
    width: 250px;
    max-width: 100%;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

@media (max-width: 639px) {
    .stats-grid {
        flex-direction: column;
    }

    .browser-metrics-container {
        flex-direction: column;
        gap: 12px;
    }

    .dropdown-trigger {
        min-width: 150px;
        padding: 6px 12px;
    }

    .dropdown-menu {
        width: 280px;
    }

    .dropdown-option {
        padding: 10px 12px;
    }

    .option-description {
        font-size: 10px;
    }
}

@media (min-width: 768px) {
    .source-label {
        font-size: 13px;
    }

    .stats-title {
        font-size: 20px;
    }

    .dropdown-trigger {
        font-size: 14px;
        min-width: 180px;
        padding: 10px 18px;
    }

    .dropdown-option {
        font-size: 13px;
        padding: 14px 18px;
    }

    .option-description {
        font-size: 12px;
    }

    .stat-label {
        font-size: 14px;
    }

    .stat-value {
        font-size: 16px;
    }

    .stats-disclaimer {
        font-size: 12px;
    }

    .connection-status-badge {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stats-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .source-label {
        font-size: 10px;
    }

    .stats-title {
        font-size: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .dropdown-trigger {
        font-size: 10px;
        min-width: 130px;
        padding: 4px 8px;
    }

    .dropdown-menu {
        width: 250px;
    }

    .dropdown-option {
        font-size: 10px;
        padding: 8px 10px;
    }

    .option-description {
        font-size: 9px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stat-value {
        font-size: 12px;
    }

    .stats-disclaimer {
        font-size: 9px;
    }

    .connection-status-badge {
        font-size: 10px;
    }
}