/* ====================================================
   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 inline ── */
.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.7;
}
.minimap-canvas {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    background:
        radial-gradient(ellipse at 14% 86%, rgba(40,95,160,0.20), transparent 40%),
        radial-gradient(ellipse at 86% 14%, rgba(160,55,65,0.20), transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(14,32,52,0.95), rgba(4,10,18,0.98));
    border: 1px solid var(--border2);
    border-radius: var(--r-sm);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.55);
}
/* Lanes (forma de Grieta del Invocador) */
.mm-lane {
    position: absolute;
    background: rgba(200,180,120,0.13);
    border: 1px solid rgba(200,180,120,0.10);
    border-radius: 2px;
}
.mm-lane-mid   { left: 4%;  top: 48%; width: 92%; height: 4%; transform: rotate(-45deg); }
.mm-lane-top-v { left: 7%;  top: 12%; width: 4%;  height: 76%; }
.mm-lane-top-h { left: 12%; top: 7%;  width: 76%; height: 4%; }
.mm-lane-bot-v { left: 89%; top: 12%; width: 4%;  height: 76%; }
.mm-lane-bot-h { left: 12%; top: 89%; width: 76%; height: 4%; }
/* River (diagonal perpendicular) */
.mm-river {
    position: absolute;
    left: 3%; top: 47%;
    width: 94%; height: 6%;
    background: linear-gradient(90deg, rgba(40,110,190,0.16), rgba(60,140,210,0.22), rgba(40,110,190,0.16));
    border: 1px solid rgba(60,140,210,0.10);
    border-radius: 3px;
    transform: rotate(45deg);
}
/* Base / fountain glow en las esquinas */
.mm-base {
    position: absolute;
    width: 34%;
    height: 34%;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}
.mm-base.blue { left: -8%; bottom: -8%; background: radial-gradient(circle, rgba(79,172,254,0.30), transparent 68%); }
.mm-base.red  { right: -8%; top: -8%;  background: radial-gradient(circle, rgba(245,87,108,0.30), transparent 68%); }
/* Jungle quadrants */
.mm-jungle {
    position: absolute;
    width: 16%;
    height: 16%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(28,64,40,0.30), rgba(20,46,30,0.10));
    border: 1px solid rgba(40,90,55,0.14);
    z-index: 1;
}
/* Campamentos de jungla */
.mm-camp {
    position: absolute;
    width: 4px;
    height: 4px;
    margin: -2px 0 0 -2px;
    border-radius: 50%;
    background: rgba(150,200,120,0.55);
    box-shadow: 0 0 3px rgba(150,200,120,0.4);
    z-index: 3;
}
/* Objectives */
.mm-objective {
    position: absolute;
    width: 17px;
    height: 17px;
    margin: -8px 0 0 -8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5em;
    font-weight: 800;
    color: #fff;
    z-index: 4;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.mm-objective.baron { background: rgba(140,90,200,0.30); border: 1px solid rgba(164,114,232,0.45); box-shadow: 0 0 6px rgba(164,114,232,0.25); }
.mm-objective.dragon { background: rgba(200,110,60,0.30); border: 1px solid rgba(232,116,59,0.45); box-shadow: 0 0 6px rgba(232,116,59,0.25); }
/* Towers (torreta con almena) */
.mm-tower {
    position: absolute;
    width: 8px;
    height: 11px;
    margin-left: -4px;
    margin-top: -6px;
    border-radius: 2px 2px 1px 1px;
    z-index: 5;
    transition: all 0.4s;
}
.mm-tower::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 3px;
    border-radius: 1px;
    background: inherit;
}
.mm-tower::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
}
.mm-tower.t1 { background: #4facfe; box-shadow: 0 0 5px rgba(79,172,254,0.6); }
.mm-tower.t2 { background: #f5576c; box-shadow: 0 0 5px rgba(245,87,108,0.6); }
.mm-tower.dead {
    background: #3a3a40;
    box-shadow: none;
    opacity: 0.4;
    transform: scale(0.78) rotate(10deg);
}
.mm-tower.dead::before { background: #3a3a40; }
.mm-tower.dead::after { display: none; }
/* Nexus (diamante) */
.mm-nexus {
    position: absolute;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 2px;
    transform: rotate(45deg);
    z-index: 4;
}
.mm-nexus.blue { background: #4facfe; box-shadow: 0 0 8px rgba(79,172,254,0.6); border: 1px solid rgba(180,220,255,0.6); }
.mm-nexus.red { background: #f5576c; box-shadow: 0 0 8px rgba(245,87,108,0.6); border: 1px solid rgba(255,190,200,0.6); }
/* Team dots */
.mm-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
}
/* Gold display */
.mm-gold {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55em;
    color: var(--gold-light);
    letter-spacing: 0.5px;
    z-index: 10;
    white-space: nowrap;
}

@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%; }
    .minimap-canvas { max-width: 260px; }
}
