

/* ───────── Racha de perfección ───────── */
.lp-racha {
    display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 20px;
    font-size: .66rem; font-weight: 800; white-space: nowrap;
    background: rgba(255,255,255,.06); color: rgba(255,255,255,.45); transition: all .25s;
}
.lp-racha.activa {
    background: rgba(255,140,0,.18); color: #ffb74d;
    box-shadow: 0 0 12px rgba(255,140,0,.4); animation: lpPulso 1.1s ease-in-out infinite;
}
@keyframes lpPulso { 50% { transform: scale(1.1); } }

.lp-etiqueta-seccion {
    font-size: .72rem; color: rgba(255,255,255,.4); margin: 16px 0 8px;
    text-transform: uppercase; letter-spacing: .05em;
}
.lp-situacion { font-size: .85rem; color: rgba(255,255,255,.75); margin: 14px 0 4px; }
.lp-pregunta  { font-weight: 800; margin: 0 0 12px; }

/* ───────── SWIPE DE DISPARO ───────── */
.lp-tiro-wrap {
    max-width: 440px; margin: 12px auto 0; border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(255,255,255,.12); background: #0b2a17;
}
.lp-tiro-svg {
    display: block; width: 100%; height: auto; aspect-ratio: 400 / 260;
    touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none;
}
.lp-tiro-cesped { fill: #0b2a17; }
.lp-poste { fill: none; stroke: rgba(255,255,255,.88); stroke-width: 5; stroke-linejoin: round; }
.lp-objetivo {
    fill: rgba(255,204,0,.14); stroke: var(--uel, #ffcc00); stroke-width: 2; stroke-dasharray: 4 4;
    transform-box: fill-box; transform-origin: center; animation: lpObjetivo 1.4s ease-in-out infinite;
}
@keyframes lpObjetivo { 50% { transform: scale(1.2); fill: rgba(255,204,0,.3); } }

.lp-portero rect { fill: rgba(255,75,75,.22); stroke: #ff4b4b; stroke-width: 2; }
.lp-portero text { font-size: 22px; pointer-events: none; }
.lp-barrera rect { fill: rgba(255,75,75,.3); stroke: #ff4b4b; stroke-width: 1.5; }

.lp-trazo {
    fill: none; stroke: var(--ucl, #00ff88); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
    filter: drop-shadow(0 0 4px rgba(0,255,136,.85)); pointer-events: none;
}
.lp-balon { fill: #fff; stroke: #111; stroke-width: 2; pointer-events: none; }
.lp-balon-halo {
    fill: none; stroke: rgba(255,255,255,.55); stroke-width: 2; pointer-events: none;
    transform-box: fill-box; transform-origin: center; animation: lpHalo 1.2s ease-out infinite;
}
@keyframes lpHalo { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.lp-hint { fill: rgba(255,255,255,.55); font-size: 11px; font-family: 'Inter', sans-serif; pointer-events: none; }
.lp-hint-flash { animation: lpHintFlash .6s ease; }
@keyframes lpHintFlash { 0%,100% { fill: rgba(255,255,255,.55); } 40% { fill: #ffcc00; } }

/* Reutiliza flashGol / flashFallo ya definidos en juegos.html */
.lp-tiro-wrap.lp-gol   { animation: flashGol .5s ease; }
.lp-tiro-wrap.lp-fallo { animation: flashFallo .5s ease; }
.lp-tiro-wrap.lp-gol .lp-porteria-red {
    transform-box: fill-box; transform-origin: center top; animation: lpRed .5s ease;
}
@keyframes lpRed { 30% { transform: scaleY(1.08) translateY(3px); } }
.lp-tiro-wrap.lp-fallo .lp-portero,
.lp-tiro-wrap.lp-fallo .lp-barrera { animation: lpSacudida .4s ease; }
@keyframes lpSacudida { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ───────── PIZARRA TÁCTICA ───────── */
.lp-pizarra-wrap {
    max-width: 440px; margin: 10px auto 0; border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(255,255,255,.14); background: #0d2a18;
}
.lp-pizarra {
    display: block; width: 100%; height: auto; aspect-ratio: 400 / 260;
    cursor: crosshair; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.lp-campo { fill: #0f3a21; }
.lp-campo-franjas { fill: rgba(255,255,255,.03); }
.lp-lineas { fill: none; stroke: rgba(255,255,255,.38); stroke-width: 2; }
.lp-porteria-pizarra { fill: rgba(255,255,255,.7); }

.lp-jug { transform-box: fill-box; transform-origin: center; animation: lpJugador .5s cubic-bezier(.3,1.5,.5,1) backwards; animation-delay: var(--d, 0s); pointer-events: none; }
.lp-jug circle { stroke: #fff; stroke-width: 2; }
.lp-yo circle   { fill: #2979ff; }
.lp-comp circle { fill: #00c853; }
.lp-riv circle  { fill: #ff4b4b; }
.lp-jug text { font-size: 8px; font-weight: 800; fill: #fff; text-anchor: middle; font-family: 'Inter', sans-serif; }
@keyframes lpJugador { from { opacity: 0; transform: scale(.2); } }
.lp-yo circle { animation: lpYo 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes lpYo { 50% { stroke-width: 4; } }
.lp-balon-pizarra { fill: #fff; stroke: #000; stroke-width: 1.5; pointer-events: none; }

.lp-zona { pointer-events: none; transform-box: fill-box; transform-origin: center; animation: lpZona .5s ease backwards; }
.lp-zona circle { stroke-width: 2.5; stroke-dasharray: 6 4; }
.lp-zona text { font-size: 16px; }
.lp-zona.z100 circle { fill: rgba(0,255,136,.25); stroke: #00ff88; }
.lp-zona.z70  circle { fill: rgba(255,204,0,.2);  stroke: #ffcc00; }
.lp-zona.z40  circle { fill: rgba(255,75,75,.2);  stroke: #ff4b4b; }
@keyframes lpZona { from { opacity: 0; transform: scale(.4); } }
.lp-marca-click { fill: none; stroke: #fff; stroke-width: 3; pointer-events: none; transform-box: fill-box; transform-origin: center; animation: lpPing .9s ease-out; }
@keyframes lpPing { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.2); opacity: .2; } }

.lp-leyenda { display: flex; gap: 14px; justify-content: center; margin-top: 8px; font-size: .66rem; color: rgba(255,255,255,.5); }
.lp-leyenda .yo   { color: #6ea8ff; }
.lp-leyenda .comp { color: #4be37a; }
.lp-leyenda .riv  { color: #ff7a7a; }

/* ───────── CARTA DE JUGADOR (holográfica) ───────── */
.lp-campo-nombre { display: block; font-size: .72rem; color: rgba(255,255,255,.55); margin: 0 0 6px; }
.lp-campo-nombre input {
    display: block; margin: 5px auto 0; width: 200px; max-width: 100%; box-sizing: border-box; text-align: center;
    padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18);
    background: rgba(0,0,0,.3); color: #fff; font-family: 'Inter', sans-serif; font-size: .85rem; font-weight: 700;
}
.lp-campo-nombre input:focus { outline: none; border-color: var(--ucl); }

.lp-carta-escena { perspective: 900px; display: flex; justify-content: center; margin: 14px 0 6px; }

.lp-carta {
    --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
    position: relative; width: 260px; height: 380px; box-sizing: border-box; overflow: hidden;
    padding: 16px 18px 0; border-radius: 22px 22px 70px 70px; text-align: center;
    font-family: 'Inter', sans-serif; color: #2a1d00; user-select: none;
    transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
    transition: transform .12s ease-out;
    box-shadow: 0 18px 40px rgba(0,0,0,.55), inset 0 0 0 3px rgba(255,255,255,.4), inset 0 0 0 7px rgba(0,0,0,.08);
    animation: lpEntrada .9s cubic-bezier(.2,1.2,.3,1) both;
}
@keyframes lpEntrada { from { opacity: 0; transform: rotateY(180deg) scale(.7); } }

.lp-oro    { background: linear-gradient(155deg, #fff1a8 0%, #e6b93a 38%, #b8841a 70%, #f7d767 100%); }
.lp-plata  { background: linear-gradient(155deg, #f6f9fd 0%, #aeb9c8 45%, #7d8a9c 75%, #e6ebf2 100%); }
.lp-bronce { background: linear-gradient(155deg, #f5d2ad 0%, #c27a3f 45%, #8a4f22 75%, #e6b07b 100%); }
.lp-icono  { background: linear-gradient(155deg, #1b0f3a 0%, #4a1d8f 35%, #0d6efd 70%, #00e5ff 100%); color: #fff; }

/* Capa holográfica: banda irisada que se desplaza + foco que sigue al puntero */
.lp-carta-holo, .lp-carta-brillo { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.lp-carta-holo {
    background: linear-gradient(115deg, transparent 18%, rgba(255,255,255,.5) 32%, rgba(255,110,255,.32) 42%,
                rgba(110,255,255,.36) 52%, rgba(255,255,120,.3) 60%, transparent 72%);
    background-size: 260% 260%; mix-blend-mode: overlay; opacity: .85;
    animation: lpHolo 4.5s linear infinite;
}
@keyframes lpHolo { from { background-position: 130% 0; } to { background-position: -40% 100%; } }
.lp-carta-brillo {
    background: radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,.55), transparent 46%);
    mix-blend-mode: soft-light;
}
.lp-carta::after { /* destellos */
    content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background:
        radial-gradient(circle at 18% 22%, rgba(255,255,255,.9) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 80% 36%, rgba(255,255,255,.8) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 62% 74%, rgba(255,255,255,.7) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 30% 82%, rgba(255,255,255,.8) 0 1.5px, transparent 2.5px);
    animation: lpDestello 2.6s ease-in-out infinite;
}
@keyframes lpDestello { 0%,100% { opacity: .2; } 50% { opacity: 1; } }

.lp-carta-cabecera { position: relative; display: flex; justify-content: space-between; align-items: flex-start; }
.lp-carta-nota { text-align: left; line-height: 1; }
.lp-carta-nota b { display: block; font-size: 3rem; font-weight: 800; letter-spacing: -2px; text-shadow: 0 2px 0 rgba(255,255,255,.35); }
.lp-carta-nota span { font-size: .72rem; font-weight: 800; letter-spacing: 2px; opacity: .75; }
.lp-carta-logo {
    width: 78px; height: 78px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(255,255,255,.28); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5);
}
.lp-carta-logo img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.lp-logo-ini {
    width: 58px; height: 58px; border-radius: 50%; align-items: center; justify-content: center; display: flex;
    font-weight: 800; font-size: 1.1rem; background: rgba(0,0,0,.25); color: #fff;
}
.lp-carta-categoria { position: relative; margin-top: 10px; font-size: .62rem; font-weight: 800; letter-spacing: 2px; opacity: .7; }
.lp-carta-nombre {
    position: relative; margin: 6px 0 10px; padding-bottom: 8px; font-size: 1.35rem; font-weight: 800; letter-spacing: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 2px solid rgba(0,0,0,.15);
}
.lp-icono .lp-carta-nombre { border-bottom-color: rgba(255,255,255,.3); }
.lp-carta-stats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 4px; padding: 0 4px; }
.lp-stat { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: rgba(0,0,0,.1); }
.lp-icono .lp-stat { background: rgba(255,255,255,.12); }
.lp-stat b { font-size: 1.35rem; font-weight: 800; line-height: 1; }
.lp-stat span { font-size: .6rem; font-weight: 800; letter-spacing: 1.5px; opacity: .7; margin-top: 2px; }
.lp-carta-club { position: relative; margin-top: 12px; font-size: .8rem; font-weight: 800; letter-spacing: .5px; }
.lp-carta-marca {
    position: absolute; left: 0; right: 0; bottom: 20px; font-size: .56rem; font-weight: 800;
    letter-spacing: .5px; opacity: .7;
}

/* Modo exportación: html2canvas no soporta blend-modes ni animaciones; se usan degradados estáticos */
.lp-exportando { animation: none !important; transition: none !important; transform: none !important; }
.lp-exportando .lp-carta-holo { mix-blend-mode: normal; opacity: .32; animation: none; background-position: 50% 50%; }
.lp-exportando .lp-carta-brillo { mix-blend-mode: normal; opacity: .22; }
.lp-exportando::after { animation: none; opacity: .8; }

/* ───────── Botones para compartir ───────── */
.lp-fila-botones { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.lp-compartir { margin-top: 12px; }
.lp-btn-share { width: auto !important; padding: 9px 16px !important; margin: 0 !important; font-size: .78rem !important; background: var(--ucl); color: #000; }
.lp-btn-x { background: #fff !important; color: #000 !important; }


/* ───────── Accesibilidad ───────── */
@media (max-width: 380px) { .lp-carta { transform-origin: top center; } }
@media (prefers-reduced-motion: reduce) {
    .lp-carta, .lp-carta-holo, .lp-carta::after, .lp-objetivo, .lp-balon-halo, .lp-racha.activa, .lp-jug, .lp-yo circle { animation: none !important; }
    .lp-carta { transition: none; }
}
