/* ==============================================
   SCORE HERO — Radial breakdown with sub-scores
   ============================================== */

.overall-score-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 36px;
    padding: 32px 16px 24px;
    visibility: hidden;
}

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

.overall-score-hero.revealed {
    visibility: visible;
    animation: scoreHeroReveal 0.6s ease forwards;
}

/* ---------- Main ring ---------- */

.score-hero-ring {
    position: relative;
    width: 160px;
    height: 160px;
}

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

.score-hero-track {
    fill: none;
    stroke: var(--border-color, rgba(255, 255, 255, 0.06));
    stroke-width: 10;
}

.score-hero-fill {
    fill: none;
    stroke: hsl(var(--hero-hue, 199), 60%, 50%);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 553;              /* 2 * PI * 88 */
    stroke-dashoffset: 553;
    transition: stroke-dashoffset 1.4s cubic-bezier(0.4, 0, 0.15, 1),
                stroke 0.6s ease;
    filter: drop-shadow(0 0 8px hsla(var(--hero-hue, 199), 60%, 50%, 0.35));
}

.score-hero-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-hero-number {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: hsl(var(--hero-hue, 199), 55%, 60%);
    transition: color 0.6s ease;
}

.score-hero-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary, rgba(255, 255, 255, 0.5));
    margin-top: 2px;
}

/* ---------- Verdict ---------- */

.score-hero-verdict {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    max-width: 560px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    min-height: 1.3em;
    color: hsl(var(--hero-hue, 199), 50%, 65%);
    transition: color 0.6s ease;
}

.score-hero-verdict-text {
    line-height: 1.35;
}

.score-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.score-hero-meta-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid hsla(var(--hero-hue, 199), 55%, 58%, 0.22);
    border-radius: 999px;
    background: hsla(var(--hero-hue, 199), 55%, 50%, 0.08);
    color: var(--text-color, #fff);
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.score-hero-meta-chip[hidden] {
    display: none !important;
}

/* ---------- Sub-score breakdown ---------- */

.score-hero-breakdown {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.score-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--card-bg, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    border-radius: 14px;
    padding: 10px 8px 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    min-width: 64px;
}

.score-segment:hover {
    background: var(--surface-elevated, rgba(255, 255, 255, 0.06));
    border-color: hsla(var(--seg-hue, 199), 50%, 50%, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px hsla(var(--seg-hue, 199), 50%, 50%, 0.12);
}

.score-segment:focus-visible {
    outline: 2px solid hsl(var(--hero-hue, 199), 60%, 50%);
    outline-offset: 2px;
}

.score-segment.weak {
    border-color: hsla(0, 70%, 55%, 0.3);
    background: hsla(0, 70%, 55%, 0.06);
}

.segment-ring {
    width: 40px;
    height: 40px;
    transform: rotate(-90deg);
}

.seg-track {
    fill: none;
    stroke: var(--border-color, rgba(255, 255, 255, 0.06));
    stroke-width: 3;
}

.seg-fill {
    fill: none;
    stroke: hsl(var(--seg-hue, 199), 60%, 50%);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 113;             /* 2 * PI * 18 */
    stroke-dashoffset: 113;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.15, 1) 0.4s,
                stroke 0.6s ease;
}

.segment-val {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-color, #fff);
    line-height: 1;
}

.segment-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary, rgba(255, 255, 255, 0.45));
    line-height: 1;
}

/* ---------- Weak spots callout ---------- */

.score-hero-weakspots {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.weakspot-tag {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: hsla(0, 60%, 55%, 0.12);
    color: hsl(0, 60%, 68%);
    border: 1px solid hsla(0, 60%, 55%, 0.2);
}

/* ---------- Light mode overrides ---------- */

[data-theme="light"] .score-hero-number {
    color: hsl(var(--hero-hue, 199), 55%, 40%);
}

[data-theme="light"] .score-hero-verdict {
    color: hsl(var(--hero-hue, 199), 50%, 40%);
}

[data-theme="light"] .score-hero-meta-chip {
    background: hsla(var(--hero-hue, 199), 55%, 44%, 0.08);
    border-color: hsla(var(--hero-hue, 199), 55%, 40%, 0.2);
    color: hsl(var(--hero-hue, 199), 35%, 28%);
}

[data-theme="light"] .score-hero-fill {
    filter: drop-shadow(0 0 6px hsla(var(--hero-hue, 199), 60%, 50%, 0.2));
}

[data-theme="light"] .weakspot-tag {
    background: hsla(0, 60%, 55%, 0.08);
    color: hsl(0, 55%, 45%);
    border-color: hsla(0, 60%, 55%, 0.15);
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
    .overall-score-hero {
        padding: 24px 8px 16px;
        gap: 18px;
    }

    .score-hero-ring {
        width: 130px;
        height: 130px;
    }

    .score-hero-number {
        font-size: 2.2rem;
    }

    .score-hero-verdict {
        gap: 8px;
        padding: 0 4px;
    }

    .score-hero-meta {
        gap: 6px;
    }

    .score-hero-meta-chip {
        min-height: 32px;
        padding: 7px 10px;
        font-size: 0.74rem;
    }

    .score-segment {
        min-width: 54px;
        padding: 8px 6px 6px;
    }

    .segment-ring {
        width: 34px;
        height: 34px;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .overall-score-hero.revealed {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .score-hero-fill,
    .seg-fill {
        transition: none;
    }
}
