/* ── Base ── */
html, body {
    background-color: #030712;
    color: #f3f4f6;
}

/* ── Tab Navigation ── */
.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

.tab-btn.active {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

/* ── Loading Spinner ── */
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Verdict Grid ── */
.verdict-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.verdict-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px 12px;
    text-align: center;
    transition: all 0.2s;
}

.verdict-card.pass {
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.05);
}

.verdict-card.fail {
    border-color: rgba(255, 255, 255, 0.06);
}

.verdict-card .verdict-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.verdict-card .verdict-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #e5e7eb;
}

.verdict-card .verdict-detail {
    font-size: 11px;
    color: #9ca3af;
}

/* ── Results Container ── */
.results-section {
    display: none;
}

/* ── Detail Section ── */
.detail-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.detail-section h3 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #9ca3af;
}

/* ── Collapsible Section Toggle ── */
.section-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    margin-bottom: 12px;
}

.section-toggle:hover {
    opacity: 0.8;
}

.section-toggle h3 {
    margin-bottom: 0;
}

.section-arrow {
    font-size: 11px;
    width: 16px;
    color: #6b7280;
}

/* ── Check Icons ── */
.check-yes { color: #34d399; }
.check-no { color: #6b7280; }
.check-unknown { color: #f59e0b; font-size: 12px; }

/* ── Probe Summary ── */
.probe-summary .field {
    display: flex;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 4px;
}

.probe-summary .field .label {
    color: #9ca3af;
    min-width: 160px;
}

/* ── Categories Grid ── */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
    margin-bottom: 16px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

/* ── Badge ── */
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
}

.badge-green {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
}

.badge-blue {
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
}

.badge-purple {
    background: rgba(167, 139, 250, 0.12);
    color: #a78bfa;
}

/* ── Tools Grid ── */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.tool-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
}

.tool-item .tool-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.tool-item .tool-desc {
    color: #9ca3af;
    font-size: 12px;
}

.tool-item.x402-tool {
    border-color: rgba(52, 211, 153, 0.2);
    background: rgba(52, 211, 153, 0.03);
}

/* ── Latency Bar ── */
.latency-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 4px;
}

.latency-bar .latency-label {
    color: #9ca3af;
    min-width: 120px;
}

.latency-bar .latency-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    max-width: 200px;
}

.latency-bar .latency-fill {
    height: 100%;
    border-radius: 3px;
    background: #818cf8;
    transition: width 0.3s ease;
}

.latency-bar .latency-value {
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    min-width: 60px;
}

/* ── Messages List ── */
.messages-list {
    list-style: none;
    padding: 0;
}

.messages-list li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: #9ca3af;
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

.messages-list li:last-child {
    border-bottom: none;
}

/* ── Payment Option Groups ── */
.payment-option-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 12px 14px;
}

.payment-option-header {
    margin-bottom: 6px;
}

.payment-option-details {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.payment-option-tools {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.8;
}

.tool-tag {
    display: inline-block;
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.15);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    color: #60a5fa;
}

/* ── Raw Assessment ── */
.raw-assessment-section {
    margin-top: 12px;
}

.raw-actions {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.raw-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.raw-btn:hover {
    color: #e5e7eb;
    border-color: #818cf8;
}

.detail-section pre {
    margin: 0;
    padding: 16px 0;
    max-height: 500px;
    overflow: auto;
}

.detail-section code {
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
    white-space: pre;
}

/* ── Dependency Footer ── */
.dep-info {
    font-size: 12px;
    color: #6b7280;
    line-height: 2;
}

.dep-info-label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dep-link {
    color: #d1d5db;
    text-decoration: none;
    margin: 0 2px;
    transition: color 0.15s;
}

.dep-link:hover {
    color: #818cf8;
}

.dep-hash {
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    color: #6b7280;
    font-size: 11px;
}

.dep-link:hover .dep-hash {
    color: #818cf8;
}

/* ── Endpoint Links ── */
.endpoint-link {
    color: #818cf8;
    text-decoration: none;
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    word-break: break-all;
    transition: color 0.15s;
}

.endpoint-link:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .verdict-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

@media (max-width: 480px) {
    .verdict-grid {
        grid-template-columns: 1fr;
    }
}
