/* Device Selector */
.device-selector {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.device-tabs {
    display: flex;
    gap: 8px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 8px;
    width: fit-content;
}

.device-tab {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.device-tab:hover {
    background: #e9ecef;
    color: #495057;
}

.device-tab.active {
    background: #007cba;
    color: white;
}

.device-icon {
    width: 16px;
    height: 16px;
}

/* Score Overview */
.scores-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.score-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.score-circle {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
}

.score-circle svg {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}

.score-circle .background {
    fill: none;
    stroke: #f1f3f4;
    stroke-width: 6;
}

.score-circle .progress {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dasharray 0.3s ease;
}

.score-circle .score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
}

.score-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 0;
    text-transform: capitalize;
}

/* Performance Metrics */
.performance-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f3f4;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.metric-item:hover {
    background: #e9ecef;
}

.metric-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.metric-status.good {
    background: #009967;
}

.metric-status.warning {
    background: #fc9105;
}

.metric-status.error {
    background: #fb2c36;
}

.metric-content {
    flex: 1;
}

.metric-name {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin: 0 0 4px;
}

.metric-value {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.metric-value.good {
    color: #009967 !important;
}

.metric-value.warning {
    color: #fc9105 !important;
}

.metric-value.error {
    color: #fb2c36 !important;
}

/* Info Panel */
.info-panel {
    background: #f3f7fc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

/* Responsive Design */
@media(max-width: 768px) {
    .scores-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .device-tabs {
        width: 100%;
        justify-content: center;
    }
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f1f3f4;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}