/* ====================================================
   LEC-Style Live Scoreboard
   ==================================================== */

/* ── Top scorebar ── */
.lck-scoreboard {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: linear-gradient(160deg, rgba(21,35,55,0.85), rgba(8,15,25,0.7));
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    border: 1px solid var(--border2);
    border-top: 2px solid var(--gold);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
    padding: 18px 26px;
    margin-bottom: 12px;
    position: relative;
}

.lck-scoreboard::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* Bloque nombre + récord de liga */
.team-block {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.team-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lck-scoreboard .team-info:last-child .team-name-row { flex-direction: row-reverse; }

/* Marcador de la serie (pips) */
.series-pips { display: inline-flex; gap: 4px; }
.series-pip {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.07);
    transition: background 0.2s, box-shadow 0.2s;
}
.series-pip.won {
    background: var(--gold);
    border-color: var(--gold-light);
    box-shadow: 0 0 9px rgba(200,155,60,0.55);
}

/* Blue side (left): nombre/récord fuera, kills pegadas al centro */
.lck-scoreboard .team-info:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.lck-scoreboard .team-info:first-child .team-block { align-items: flex-start; }

.lck-scoreboard .team-info:first-child .team-name-score {
    color: var(--blue);
    border-left: 3px solid var(--blue);
    padding-left: 10px;
}

.lck-scoreboard .team-info:first-child .team-kills {
    color: var(--blue);
    margin-right: 8px;
}

/* Red side (right): kills pegadas al centro, nombre/récord fuera */
.lck-scoreboard .team-info:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.lck-scoreboard .team-info:last-child .team-block { align-items: flex-end; }

.lck-scoreboard .team-info:last-child .team-name-score {
    color: var(--red);
    border-right: 3px solid var(--red);
    padding-right: 10px;
}

.lck-scoreboard .team-info:last-child .team-kills {
    color: var(--red);
    margin-left: 8px;
}

.team-name-score {
    font-family: 'Russo One', sans-serif;
    font-size: 1.05em;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.team-kills {
    font-family: 'Russo One', sans-serif;
    font-size: 2.6em;
    font-weight: 900;
    line-height: 1;
    color: var(--text-white);
    min-width: 48px;
    text-align: center;
    text-shadow: 0 0 18px rgba(255,255,255,0.18);
}

.team-record {
    font-size: 0.68em;
    color: var(--text);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.75;
}

/* Center time block */
.game-info {
    text-align: center;
    padding: 0 20px;
}

.game-time {
    font-family: 'Russo One', sans-serif;
    font-size: 1.6em;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(200,155,60,0.4);
}

.game-label {
    font-size: 0.65em;
    color: var(--text);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ── Gold Advantage Bar ── */
.gold-bar-wrap {
    background: rgba(5,10,18,0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border2);
    border-radius: var(--r-sm);
    padding: 9px 16px;
    margin: 7px 0;
}

.gold-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.72em;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.gold-bar-label span:first-child { color: var(--blue); font-weight: 600; }
.gold-bar-label span:last-child  { color: var(--red);  font-weight: 600; }
.gold-bar-label .gold-diff-text  { color: var(--gold-light); font-weight: 600; }

.gold-bar-track {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.gold-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease, background 0.5s ease;
    position: absolute;
    top: 0;
}

/* ── Objectives Bar ── */
.objectives-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    background: rgba(5,10,18,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border2);
    border-radius: var(--r-sm);
    margin: 7px 0;
    overflow: hidden;
}

.objective-item {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    border-right: 1px solid var(--border2);
    transition: background 0.2s;
}

.objective-item:last-child { border-right: none; }

.objective-label {
    font-size: 0.62em;
    color: var(--text);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.objective-value {
    font-size: 1em;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: 1px;
}

.objective-value .positive { color: var(--blue); }
.objective-value .negative { color: var(--red); }

/* ── Broadcast Controls ── */
#broadcastControls {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 4px;
}

/* ── Responsive ── */
/* ── Broadcast Wrapper (SR background) ── */
.broadcast-wrapper {
    background: radial-gradient(ellipse at 50% 40%, rgba(10,30,50,0.9), rgba(3,12,22,0.98)),
                repeating-linear-gradient(45deg, rgba(20,60,40,0.06) 0px, rgba(20,60,40,0.06) 2px, transparent 2px, transparent 6px);
    border: 1px solid var(--border2);
    border-radius: var(--r);
    padding: 14px;
    position: relative;
    overflow: hidden;
}
.broadcast-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(30,80,120,0.08), transparent 60%),
                radial-gradient(circle at 80% 50%, rgba(120,50,30,0.06), transparent 60%);
    pointer-events: none;
}

/* ── Minimap (SVG) ── */
.minimap-container-inline {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}
.minimap-label-inline {
    font-size: 0.62em;
    letter-spacing: 3px;
    color: var(--gold-light);
    text-transform: uppercase;
    writing-mode: horizontal-tb;
    opacity: 0.75;
}
.mm-stage {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    position: relative;
}
.mm-svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 10px;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.55));
}
.mm-frame { fill: none; stroke: rgba(200,155,60,0.35); stroke-width: 1.4; }
/* Calles */
.mm-lane { fill: none; stroke: rgba(206,186,128,0.16); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.mm-lane-edge { fill: none; stroke: rgba(140,120,70,0.22); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
/* Río */
.mm-river { fill: none; stroke: url(#mmRiverG); stroke-width: 15; stroke-linecap: round; }
.mm-river-line { fill: none; stroke: rgba(150,210,255,0.22); stroke-width: 2; stroke-linecap: round; }
/* Junglas y campamentos */
.mm-camp { fill: rgba(150,205,120,0.6); stroke: rgba(190,230,150,0.5); stroke-width: 0.5; }
/* Objetivos (baron/dragon) */
.mm-objective .pit { stroke-width: 1.4; transition: fill 0.4s, stroke 0.4s; }
.mm-objective .pit-label { fill: #fff; font-size: 7px; font-weight: 800; text-anchor: middle; font-family: 'Russo One', sans-serif; pointer-events: none; }
.mm-objective.baron .pit { fill: rgba(140,90,200,0.34); stroke: rgba(164,114,232,0.6); }
.mm-objective.dragon .pit { fill: rgba(200,110,60,0.34); stroke: rgba(232,116,59,0.6); }
/* Torres (anillo + cuerpo + núcleo) */
.mm-tower { transition: opacity 0.4s; }
.mm-tower .tw-ring { fill: none; stroke-width: 1; opacity: 0.55; }
.mm-tower .tw { stroke-width: 0.8; }
.mm-tower .tw-core { fill: rgba(255,255,255,0.9); }
.mm-tower.t1 .tw { fill: #2e7fc8; stroke: #9fd4ff; }
.mm-tower.t1 .tw-ring { stroke: #4facfe; }
.mm-tower.t2 .tw { fill: #c63a52; stroke: #ffb3be; }
.mm-tower.t2 .tw-ring { stroke: #f5576c; }
.mm-tower.dead { opacity: 0.4; }
.mm-tower.dead .tw { fill: #2b2e35; stroke: #44474f; }
.mm-tower.dead .tw-ring { stroke: #44474f; opacity: 0.3; }
.mm-tower.dead .tw-core { fill: #50535b; }
/* Nexos (diamante con pulso) */
.mm-nexus .nx { transform: rotate(45deg); transform-origin: center; transform-box: fill-box; }
.mm-nexus .nx-ring { transform: rotate(45deg); transform-origin: center; transform-box: fill-box; fill: none; stroke-width: 1; opacity: 0.6; animation: mmNexusPulse 2.2s ease-in-out infinite; }
.mm-nexus.blue .nx { fill: #4facfe; stroke: #cfeaff; stroke-width: 1; }
.mm-nexus.blue .nx-ring { stroke: #4facfe; }
.mm-nexus.red .nx { fill: #f5576c; stroke: #ffd6dc; stroke-width: 1; }
.mm-nexus.red .nx-ring { stroke: #f5576c; }
@keyframes mmNexusPulse { 0%,100% { opacity: 0.15; } 50% { opacity: 0.7; } }
/* Puntos de equipo */
.mm-dot { filter: url(#mmDotGlow); transition: cx 0.8s linear, cy 0.8s linear; }
/* Oro */
.mm-gold {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6em;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 0.5px;
    z-index: 10;
    white-space: nowrap;
    background: rgba(6,12,20,0.6);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(200,155,60,0.25);
}

@media (max-width: 768px) {
    .lck-scoreboard {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }
    .lck-scoreboard .team-info:first-child,
    .lck-scoreboard .team-info:last-child {
        justify-content: center;
    }
    .lck-scoreboard .team-info:last-child .team-name-score { order: 0; }
    .lck-scoreboard .team-info:last-child .team-kills-display { order: 0; }
    .objectives-bar { flex-wrap: wrap; }
    .objective-item { min-width: 30%; }
    .mm-stage { max-width: 260px; }
}
