/* ═══════════════════════════════════════════════════════════
   DomainPulse — Custom Stylesheet
   ═══════════════════════════════════════════════════════════ */

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: #0f172a; }
::-webkit-scrollbar-thumb        { background: #334155; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover  { background: #475569; }

/* ── Gradient text ─────────────────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Metric card (gauge) ───────────────────────────────────── */
.metric-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem 1rem;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(30,41,59,0.8), rgba(15,23,42,0.9));
    border: 1px solid rgba(51,65,85,0.6);
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.2);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
}

/* Source badge */
.metric-source {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #475569;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
    border: 1px solid rgba(51,65,85,0.8);
    background: rgba(15,23,42,0.6);
}

/* SVG gauge */
.metric-gauge-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    margin-bottom: 0.75rem;
}

.metric-gauge {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-bg   { stroke: rgba(51,65,85,0.5); }
.gauge-fill { stroke: #6366f1; transition: stroke-dashoffset 1s ease; }

.metric-score {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.03em;
}

.metric-label {
    font-size: 0.7rem;
    color: #64748b;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 0.15rem;
}

.metric-abbr {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #334155;
}

/* ── Stat card (large numbers) ─────────────────────────────── */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.25rem;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(30,41,59,0.8), rgba(15,23,42,0.9));
    border: 1px solid rgba(51,65,85,0.6);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.3), transparent);
}

.stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.stat-value--sm {
    font-size: 1.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
}

.stat-source {
    margin-left: auto;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #334155;
    text-transform: uppercase;
    align-self: flex-start;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
    border: 1px solid rgba(51,65,85,0.6);
}

/* ── Mini stat ─────────────────────────────────────────────── */
.mini-stat {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(15,23,42,0.7);
    border: 1px solid rgba(51,65,85,0.5);
    text-align: center;
    transition: transform 0.2s;
}

.mini-stat:hover { transform: translateY(-2px); }

.mini-stat-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: -0.03em;
    margin-bottom: 0.2rem;
}

.mini-stat-label {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.mini-stat-src {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #334155;
    text-transform: uppercase;
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 99px;
    border: 1px solid rgba(51,65,85,0.6);
}

/* ── Result reveal animation ───────────────────────────────── */
.result-animate {
    opacity: 0;
    transform: translateY(20px);
}

/* ── Spinner ───────────────────────────────────────────────── */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 0.8s linear infinite;
}

/* ── Responsive tweaks ─────────────────────────────────────── */
@media (max-width: 480px) {
    .metric-gauge-wrap { width: 76px; height: 76px; }
    .metric-score      { font-size: 1.25rem; }
    .stat-value        { font-size: 1.4rem; }
}
