
.loading-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--ig-purple), var(--ig-pink));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: .85; }
}

.loading-icon svg { width: 28px; height: 28px; }

#loading h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
#loading p { font-size: 13px; color: var(--text-2); }

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    text-align: left;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.lstep {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-3);
    transition: color .3s;
}

.lstep.active { color: var(--text); }
.lstep.done { color: var(--wa-green); }

.lstep-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
    transition: background .3s;
}

.lstep.active .lstep-dot { background: var(--ig-pink); animation: pulse-dot 1s infinite; }
.lstep.done .lstep-dot { background: var(--wa-green); animation: none; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* ============================================================
   ERROR
   ============================================================ */

#error-box {
    display: none;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 12px;
    color: #dc2626;
    font-size: 14px;
}

/* ============================================================
   RESULTADOS
   ============================================================ */

#results { display: none; }

.section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-2);
    margin: 20px 0 10px;
}

/* Score general */
.score-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.score-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.score-meta .brand-name { font-size: 17px; font-weight: 600; margin-bottom: 3px; }
.score-meta .brand-sub  { font-size: 13px; color: var(--text-2); }

.score-num-wrap { text-align: right; }
.score-num {
    font-size: 54px;
    font-weight: 700;
    line-height: 1;
    color: var(--ig-pink);
}
.score-num small { font-size: 20px; color: var(--text-3); font-weight: 400; }
.score-label-small { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* Barras de dimensiones */
.dim { margin-bottom: 12px; }
.dim:last-child { margin-bottom: 0; }
.dim-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 5px;
}
.dim-meta span:first-child { color: var(--text-2); }
.dim-meta span:last-child { font-weight: 600; color: var(--text); }
.track {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}
.fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

/* Cards por red */
.nets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.net-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.net-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.net-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.net-pill svg { width: 16px; height: 16px; }

.yt-pill  { background: rgba(255,0,0,.1);   color: var(--yt-dark); }
.ig-pill  { background: rgba(225,48,108,.1); color: var(--ig-pink); }
.fb-pill  { background: rgba(24,119,242,.1); color: #1877F2; }

.net-score { font-size: 26px; font-weight: 700; line-height: 1; }
.net-score small { font-size: 12px; color: var(--text-3); font-weight: 400; }
.net-score.yt { color: var(--yt-red); }
.net-score.ig { color: var(--ig-pink); }

.mrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
}
.mrow:last-child { border-bottom: none; }
.mrow .mk { color: var(--text-2); }
.mrow .mv { font-weight: 600; color: var(--text); }

/* Últimos posts */
.posts-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-2);
    margin: 14px 0 8px;
}

.post-item {
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 6px;
    font-size: 13px;
}

.post-title {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.post-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-2);
}

.post-stats span { display: flex; align-items: center; gap: 4px; }

/* IA Card */
.ia-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.ia-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.ia-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--ig-purple), var(--ig-pink));
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ia-icon svg { width: 18px; height: 18px; }

.ia-head h3 { font-size: 15px; font-weight: 600; }

.ia-text {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 16px;
}

.recs { display: flex; flex-direction: column; gap: 8px; }

.rec {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}
