@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&display=swap');

#easybet_all {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    background: transparent;
    border: none;
    box-sizing: border-box;
}

/* Forzar ancho */
#easybet_all,
.elementor-widget-container:has(#easybet_all),
.elementor-column:has(#easybet_all) {
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
}

.easybet_match {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr 130px 1fr !important;
    grid-template-rows: auto auto auto auto !important;
    grid-template-areas:
        "header header header"
        "team1 center-top team2"
        "team1 center-bottom team2"
        "footer footer footer" !important;
    gap: 12px 0 !important;
    background: #222850 !important;
    /* Premium dark navy background */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px !important;
    padding: 20px !important;
    /* Normal padding, no absolute overlap hacks */
    color: #ffffff !important;
    box-sizing: border-box !important;
    width: 100% !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Efecto hover */
.easybet_match:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3) !important;
}

/* 1. GRUPO Y FECHA (Header - using contents so children become direct grid items) */
.easybet_mtop {
    display: contents !important;
}

.easybet_mtop>span:first-of-type {
    grid-column: 1 !important;
    grid-row: 1 !important;
    color: #a855f7 !important;
    /* Vibrant Purple */
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    align-self: center !important;
}

.match-datetime {
    grid-column: 2 / span 2 !important;
    grid-row: 1 !important;
    color: #94a3b8 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    margin: 0 !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.match-datetime svg {
    stroke: #94a3b8 !important;
}

/* ESTRUCTURAS PLANAS */
.easybet_teams {
    display: contents !important;
}

.easybet_bet {
    display: contents !important;
}

/* 2. EQUIPO 1 (Izquierda) */
.easybet_teams div:first-of-type {
    grid-column: 1 !important;
    grid-row: 2 / span 2 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* 3. EQUIPO 2 (Derecha) */
.easybet_teams div:last-of-type {
    grid-column: 3 !important;
    grid-row: 2 / span 2 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.easybet_teams img {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    border: 2px solid #ffffff !important;
    object-fit: cover !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25) !important;
    margin: 0 !important;
}

.easybet_teams span {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    text-transform: none !important;
}

/* 4. RESULTADO REAL (Cuadritos oscuros en medio) */
.easybet_real_score_container {
    grid-column: 2 !important;
    grid-row: 2 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
}

.real-score-box {
    width: 48px !important;
    height: 48px !important;
    line-height: 48px !important;
    text-align: center !important;
    background: #121826 !important;
    border: 1.5px solid #312e81 !important;
    border-radius: 10px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    display: block !important;
    box-sizing: border-box !important;
}

.real-score-box:empty::before {
    content: "-" !important;
}

.real-score-colon {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #94a3b8 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ocultar resultado real si el formulario de apuestas está activo */
.easybet_match:has(form) .easybet_real_score_container {
    display: none !important;
}

/* 5. FORMULARIO DE APUESTAS (Abierto) */
.easybet_bet form {
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 2 / span 2 !important;
    grid-template-columns: 48px auto 48px !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
        "in1 colon in2"
        "btn btn btn" !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.easybet_bet input[type=number] {
    grid-area: in1 !important;
    width: 48px !important;
    height: 48px !important;
    line-height: 48px !important;
    background: #121826 !important;
    border: 1.5px solid #312e81 !important;
    border-radius: 10px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    text-align: center !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

.easybet_bet input[name*="w_p2"] {
    grid-area: in2 !important;
}

.easybet_bet form::after {
    content: ":" !important;
    grid-area: colon !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #94a3b8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    margin: 0 !important;
}

.easybet_bet input[type=number]:focus {
    border-color: #6366f1 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

/* 6. BOTONES DE ACCIÓN */
.easybet_bet input[type=submit] {
    grid-area: btn !important;
    width: 100% !important;
    padding: 8px 16px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    border-radius: 20px !important;
    border: none !important;
    cursor: pointer !important;
    text-align: center !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s ease !important;
}

.btn-apostar {
    background: #0cbaff !important;
    color: #ffffff !important;
}

.btn-apostar:hover {
    background: #00a4e4 !important;
    transform: translateY(-1px) !important;
}

.btn-actualizar {
    background: #8b5cf6 !important;
    color: #ffffff !important;
}

.btn-actualizar:hover {
    background: #7c3aed !important;
    transform: translateY(-1px) !important;
}

/* 7. BADGES DE ESTADO (Partidos finalizados/en juego) */
.status-container-right {
    grid-column: 2 !important;
    grid-row: 3 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
}

.status-badge {
    display: inline-block !important;
    padding: 4px 12px !important;
    border-radius: 6px !important;
    /* rectangular-ish with soft corners, looks more like a tag */
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
}

.status-badge.finished {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

.status-badge.live {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
}

/* 8. PRONÓSTICO DEL USUARIO (Posicionado abajo) */
.my-bet-container {
    grid-column: 1 / span 3 !important;
    grid-row: 4 !important;
    /* Normal grid placement, will NEVER overlap */
    margin: 12px 0 0 0 !important;
    padding: 12px 0 0 0 !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* Truco CSS para cambiar "TU PRONÓSTICO" por "MI PRONÓSTICO" sin tocar PHP */
.my-bet-label {
    font-size: 0 !important;
    margin: 0 !important;
}

.my-bet-label::before {
    content: "MI PRONÓSTICO" !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #818cf8 !important;
    letter-spacing: 0.5px !important;
}

.my-bet-score {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #818cf8 !important;
    background: #121826 !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    padding: 4px 16px !important;
    border-radius: 8px !important;
    display: inline-block !important;
    line-height: 1.2 !important;
}

.my-bet-empty {
    font-size: 0 !important;
    margin: 0 !important;
}

.my-bet-empty::before {
    content: "Aún sin pronóstico" !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    background: #121826 !important;
    border: 1px dashed rgba(255, 255, 255, 0.15) !important;
    padding: 4px 16px !important;
    border-radius: 8px !important;
    display: inline-block !important;
    line-height: 1.2 !important;
}

/* Partido finalizado sin participación */
.my-bet-missed {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    background: rgba(239, 68, 68, 0.07) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    padding: 4px 16px !important;
    border-radius: 8px !important;
    display: inline-block !important;
    line-height: 1.2 !important;
}

/* OCULTACIONES Y DETALLES */
.easybet_bet>span,
.easybet_bet br,
.easybet_place {
    display: none !important;
}

.easybet_beted,
.easybet_bet_user {
    display: none !important;
}

/* Mensajes informativos de guardado */
.easybet_info_msg {
    display: none !important;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* RESPONSIVIDAD PARA MÓVILES (Estrechos) */
@media (max-width: 500px) {
    .easybet_match {
        grid-template-columns: 1fr 110px 1fr !important;
        padding: 15px !important;
    }

    .easybet_teams img {
        width: 50px !important;
        height: 50px !important;
    }

    .easybet_teams span {
        font-size: 12px !important;
    }

    .easybet_bet form,
    .easybet_real_score_container {
        grid-template-columns: 40px auto 40px !important;
    }

    .easybet_bet input[type=number],
    .real-score-box {
        width: 40px !important;
        height: 40px !important;
        line-height: 40px !important;
        font-size: 16px !important;
    }

    .my-bet-container {
        margin-top: 8px !important;
        padding-top: 8px !important;
    }
}


/* ========================================= */
/* --- ESTILOS DEL RANKING (Podio y Lista) --- */
/* ========================================= */

/* ========================================= */
/* --- ESTILOS DEL RANKING (Podio y Lista) --- */
/* ========================================= */

.easybet_ranking_container {
    background: #222850 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 30px 20px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2) !important;
    font-family: 'Outfit', sans-serif !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    color: #ffffff !important;
}

/* Ocultar la cabecera vieja */
.easybet_rank_user {
    display: none !important;
}

/* PODIO */
.easybet_podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 60px;
    /* Más espacio para las medallas inferiores */
    padding: 0 15px;
}

.podium_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 16px;
    padding: 20px 5px;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.rank_2 {
    background: linear-gradient(135deg, #f97316, #ea580c);
    /* Bronce/Naranja */
    width: 30%;
    max-width: 160px;
    height: 190px !important;
}

.rank_1 {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    /* Oro/Amarillo */
    width: 35%;
    max-width: 190px;
    height: 230px !important;
    color: white;
    z-index: 2;
    box-shadow: 0 15px 35px -5px rgba(245, 158, 11, 0.5);
}

.rank_3 {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    /* Plata/Gris */
    width: 30%;
    max-width: 160px;
    height: 180px !important;
}

.podium_avatar_wrapper {
    position: relative;
    margin-bottom: 15px;
}

.podium_avatar {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
}

.rank_1 .podium_avatar {
    width: 85px !important;
    height: 85px !important;
    border: 3px solid white !important;
}

.podium_rank_badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #1e293b;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    z-index: 10;
}

.rank_1 .podium_rank_badge {
    width: 34px;
    height: 34px;
    font-size: 16px;
}

.podium_crown {
    display: none !important;
}

.podium_name {
    font-size: 13px;
    font-weight: 700;
    display: block;
    line-height: 1.2;
    margin-bottom: 5px;
    color: #1e293b;
}

.rank_1 .podium_name {
    color: #ffffff;
    font-size: 15px;
}

.podium_points {
    font-size: 12px;
    font-weight: 500;
    color: rgba(30, 41, 59, 0.8);
}

.rank_1 .podium_points {
    color: #fffbeb;
}

/* Iconos de Trofeo/Medalla debajo de las tarjetas */
.podium_medal_icon {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
}

/* LISTA */
.easybet_ranking_list {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0;
}

.ranking_list_item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px !important;
    /* Reducido de 20px para ahorrar espacio */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.ranking_list_item:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

.list_rank_circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #312e81 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #ffffff !important;
    font-size: 15px;
    background: #121826 !important;
    margin-right: 15px !important;
    flex-shrink: 0;
}

/* Ocultar avatar en la lista como en la imagen */
.list_avatar {
    display: none !important;
}

.list_user_info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    text-align: left !important;
}

.list_user_name {
    font-weight: 400;
    color: #ffffff !important;
    font-size: 15px;
    margin-bottom: 4px;
    text-align: left !important;
}

.list_user_points {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Barra de progreso */
.list_user_points::after {
    content: "";
    display: block;
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px;
    position: relative;
    box-shadow: inset 20px 0 0 #312e81 !important;
    /* Simulamos la parte llena */
}

.list_arrow {
    color: #cbd5e1;
    font-size: 20px;
    margin-left: 15px;
}

.easybet-item-hidden {
    display: none !important;
}

/* BOTÓN VER MÁS */
.ranking_show_more_container {
    padding: 20px 0 0 0 !important;
    text-align: center;
    background: transparent !important;
    border-radius: 0 !important;
}

.ranking_show_more_btn {
    background: linear-gradient(135deg, #a855f7, #7c3aed) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 10px 24px !important;
    border-radius: 24px !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.3) !important;
}

.ranking_show_more_btn:hover {
    background: linear-gradient(135deg, #b55fe6, #8b5cf6) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 14px rgba(168, 85, 247, 0.4) !important;
}

.ranking_footer_btn {
    display: none !important;
}

/* ========================================= */
/* --- ESTILOS DE TABS DE FILTRADO (Hoy/Mañana) --- */
/* ========================================= */

.easybet-tabs-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.easybet-tab-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #1d2246 !important;
    /* Mismo color base de las tarjetas */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 10px 24px !important;
    border-radius: 24px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    font-family: 'Outfit', sans-serif !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15) !important;
}

.easybet-tab-icon {
    transition: stroke 0.25s ease !important;
    flex-shrink: 0 !important;
}

.easybet-tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.easybet-tab-btn.active {
    background: #8b5cf6 !important;
    /* Violeta vibrante */
    color: #ffffff !important;
    border-color: #8b5cf6 !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
}

.easybet-no-matches-msg {
    text-align: center !important;
    padding: 40px 20px !important;
    background: #1d2246 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    color: #94a3b8 !important;
    margin-bottom: 20px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
    box-sizing: border-box !important;
    font-family: 'Outfit', sans-serif !important;
}

.easybet-no-matches-icon {
    font-size: 32px !important;
    display: block !important;
    margin-bottom: 12px !important;
}

.easybet-no-matches-msg p {
    font-size: 14px !important;
    margin: 0 0 16px 0 !important;
    color: #ffffff !important;
}

.easybet-view-all-btn {
    background: #0cbaff !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 24px !important;
    cursor: pointer !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 10px rgba(12, 186, 255, 0.3) !important;
}

.easybet-view-all-btn:hover {
    background: #00a4e4 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 14px rgba(12, 186, 255, 0.4) !important;
}

.easybet-filter-hidden {
    display: none !important;
}

/* ========================================= */
/* --- ANIMACIÓN DE RESALTE DE TARJETA --- */
/* ========================================= */

@keyframes easybetHighlight {
    0% {
        border-color: #0cbaff;
        box-shadow: 0 0 15px rgba(12, 186, 255, 0.6), 0 0 0 3px #0cbaff;
    }

    70% {
        border-color: #0cbaff;
        box-shadow: 0 0 12px rgba(12, 186, 255, 0.4), 0 0 0 2px #0cbaff;
    }

    100% {
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    }
}

.easybet_match:target,
.easybet_match.easybet-highlighted {
    animation: easybetHighlight 4s ease-out forwards !important;
}

/* ========================================= */
/* --- BANNER DE RANGO Y DESTACADO DEL RANKING --- */
/* ========================================= */

.easybet-user-rank-banner {
    text-align: center !important;
    margin-bottom: 20px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(12, 186, 255, 0.1) !important;
    border: 1px solid rgba(12, 186, 255, 0.3) !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    gap: 8px !important;
    margin: 10px auto 20px auto !important;
    display: flex !important;
    max-width: fit-content !important;
    transition: all 0.2s ease !important;
}

.easybet-user-rank-banner strong {
    color: #0cbaff !important;
    font-size: 15px !important;
}

.easybet-user-rank-banner:hover {
    background: rgba(12, 186, 255, 0.2) !important;
    border-color: rgba(12, 186, 255, 0.5) !important;
    transform: scale(1.03) !important;
}

@keyframes easybetRankPulse {
    0% {
        background: rgba(12, 186, 255, 0.4) !important;
    }

    100% {
        background: transparent !important;
    }
}

.easybet_ranking_container .ranking_list_item.easybet-rank-highlight {
    animation: easybetRankPulse 3s ease-out forwards !important;
}