/* ==========================================
   PANTALLA FINAL (juegos normales)
========================================== */

.overlay-pantalla-final {
    position: fixed;
    inset: 0;
    z-index: 10000;

    background: rgba(0, 0, 0, 0.75);

    display: flex;
    align-items: center;
    justify-content: center;

    animation: aparecer-overlay-final 0.3s ease;
}

@keyframes aparecer-overlay-final {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tarjeta-pantalla-final {
    position: relative;

    background: #1A2B20;
    border: 1px solid #2A3D30;
    border-radius: 20px;
    padding: 30px 34px;

    width: 90%;
    max-width: 340px;

    text-align: center;

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: aparecer-tarjeta-final 0.35s ease;
}

@keyframes aparecer-tarjeta-final {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.mensaje-personalizado-final {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 13px;
    color: #8A9690;
    margin: 0 0 10px;
}

.puntos-ganados-final {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 48px;
    color: #3FA873;
    line-height: 1;
}

.etiqueta-final {
    font-size: 12px;
    color: #8A9690;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 4px 0 18px;
}

.badge-record {
    background: rgba(255, 122, 92, 0.15);
    border: 1px solid #FF7A5C;
    color: #FF7A5C;
    border-radius: 10px;
    padding: 8px 14px;
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 12px;
}

.stat-final {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 13px;
    color: #EDEFEC;
    margin: 6px 0;
}

.stat-final strong {
    color: #3FA873;
}

.btn-cerrar-final {
    width: 100%;
    margin-top: 18px;

    background: #3FA873;
    color: #0F1912;
    border: none;
    border-radius: 10px;
    padding: 12px;

    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;

    cursor: pointer;
}

.btn-cerrar-final:hover {
    background: #4fc186;
}

.btn-cerrar-x {
    position: absolute;
    top: -14px;
    right: -14px;

    box-sizing: border-box;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #1A2B20;
    border: 1px solid #2A3D30;
    border-radius: 50%;
    color: #8A9690;

    font-size: 16px;
    line-height: 1;
    cursor: pointer;

    transition: color 0.15s ease, border-color 0.15s ease;
}

.btn-cerrar-x:hover {
    color: #EDEFEC;
    border-color: #3FA873;
}

/* ==========================================
   INSTRUCCIONES
========================================== */

.tarjeta-instrucciones {
    max-width: 420px;
    text-align: left;
}

.titulo-instrucciones {
    font-family: 'Oswald', Arial, sans-serif;
    color: #EDEFEC;
    margin: 0 0 14px;
    text-align: center;
}

.contenido-instrucciones {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #EDEFEC;
}

.contenido-instrucciones p {
    margin: 0 0 10px;
}

.contenido-instrucciones ul {
    margin: 0 0 10px;
    padding-left: 20px;
}

.contenido-instrucciones li {
    margin-bottom: 6px;
}

.btn-ayuda-flotante {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 500;

    box-sizing: border-box;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #3FA873;
    color: #0F1912;
    border: none;

    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 20px;

    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

    transition: transform 0.15s ease;
}

.btn-ayuda-flotante:hover {
    transform: scale(1.1);
}

/* ==========================================
   RECAP SEMANAL — pantalla completa
========================================== */

.overlay-recap-completo {
    position: fixed;
    inset: 0;
    z-index: 10000;

    background: rgba(15, 25, 18, 0.92);

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
    padding: 12px;

    animation: aparecer-overlay-final 0.3s ease;
}

.tarjeta-recap-semanal {
    position: relative;

    max-width: 420px;
    width: 100%;
    max-height: 94vh;

    overflow: hidden;

    padding: 6px 10px;
}

.tarjeta-recap-semanal .titulo-instrucciones {
    font-size: 15px;
    margin: 0 0 6px;
}

.btn-recap-flotante {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 500;

    box-sizing: border-box;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #1A2B20;
    border: 2px solid #3FA873;

    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

    transition: transform 0.15s ease;
}

.btn-recap-flotante:hover {
    transform: scale(1.1);
}

.seccion-recap {
    margin-bottom: 6px;
}

.titulo-seccion-recap {
    font-family: 'Oswald', Arial, sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #8A9690;
    margin: 0 0 4px;
    text-align: center;
}

.tu-posicion-recap {
    text-align: center;
    font-size: 9px;
    color: #8A9690;
    margin: 2px 0 0;

    opacity: 0;
    transition: opacity 0.4s ease;
}

.tu-posicion-recap.visible {
    opacity: 1;
}

/* ==========================================
   PODIO (pedestales)
========================================== */

.podio-lugares {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;

    width: 100%;
    max-width: 100%;
    min-height: 46px;
}

.pedestal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;

    width: 30%;
    max-width: 68px;
    min-width: 0;

    opacity: 0;
    transform: translateY(30px) scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pedestal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pedestal-1 { order: 2; }
.pedestal-2 { order: 1; }
.pedestal-3 { order: 3; }

.pedestal-avatar {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.pedestal-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1A2B20;
}

.pedestal-medalla-icono {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 12px;
}

.pedestal-nombre {
    font-size: 8px;
    font-weight: 700;
    color: #EDEFEC;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.pedestal-puntos {
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 700;
    font-size: 9px;
    color: #3FA873;
}

.pedestal-base {
    width: 100%;
    border-radius: 6px 6px 0 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: #0F1912;
}

.pedestal-1 .pedestal-base { height: 42px; background: linear-gradient(180deg, #FFE066, #FFD700); }
.pedestal-2 .pedestal-base { height: 30px; background: linear-gradient(180deg, #E0E0E0, #C0C0C0); }
.pedestal-3 .pedestal-base { height: 20px; background: linear-gradient(180deg, #E0A878, #CD7F32); }

.ayuda-cerrar-recap {
    text-align: center;
    font-size: 9px;
    color: #8A9690;
    margin: 6px 0 0;
    opacity: 0.6;
}