﻿/* ================================
   Ranking — estilo PRIME (mobile-first)
   ================================ */

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('ChatGPT Image 7 jul 2025, 03_29_05 p.m..png') center/cover no-repeat fixed;
    opacity: .07;
    pointer-events: none;
    filter: blur(1px) saturate(1.02) contrast(1.03);
    transform: scale(1.03);
}


.text-muted-ol {
    color: var(--muted) !important;
}

/* Filtros (unificado con Estadísticas) */
.filters-card {
    background: rgba(15,27,46,.72);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: calc(var(--radius) - 2px);
    padding: 12px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.ol-select {
    background: rgba(11,18,32,.55) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
}

    .ol-select:focus {
        box-shadow: 0 0 0 .2rem rgba(74,163,255,.15) !important;
    }

.btn-ol {
    background: linear-gradient(135deg, rgba(74,163,255,.95), rgba(124,92,255,.95));
    border: 0;
    color: #081120;
    font-weight: 800;
}

    .btn-ol:hover {
        filter: brightness(1.02);
        transform: translateY(-1px);
    }

/* KPI row (unificado con Estadísticas) */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 991px) {
    .kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.kpi {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(15,23,42,.66);
    box-shadow: var(--shadow);
    min-width: 0;
}

    .kpi .k {
        color: rgba(148,163,184,.92);
        font-weight: 800;
        font-size: .78rem;
        letter-spacing: .4px;
        text-transform: uppercase;
    }

    .kpi .v {
        font-weight: 900;
        font-size: 1.22rem;
        letter-spacing: .2px;
        margin-top: 2px;
    }

    .kpi .h {
        color: rgba(148,163,184,.85);
        margin-top: 2px;
        font-size: .82rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* ---- Overlay spinner: centrado + PRIME ---- */
#overlaySpinner {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(2,6,23,.58);
    backdrop-filter: blur(6px);
    z-index: 1090;
}

    #overlaySpinner.d-none {
        display: none !important;
    }

    #overlaySpinner .ol-overlay-card {
        width: min(420px, 92vw);
        border-radius: 18px;
        border: 1px solid rgba(148,163,184,.18);
        background: rgba(15,23,42,.72);
        box-shadow: 0 18px 54px rgba(0,0,0,.35);
        padding: 18px 18px 16px;
        display: flex;
        gap: 14px;
        align-items: center;
    }

    #overlaySpinner .spinner-border {
        width: 2.15rem;
        height: 2.15rem;
        border-width: .22rem;
    }

    #overlaySpinner .ol-overlay-txt .t {
        font-weight: 900;
        letter-spacing: .2px;
    }

    #overlaySpinner .ol-overlay-txt .s {
        color: rgba(148,163,184,.9);
        font-weight: 700;
        margin-top: 2px;
        font-size: .92rem;
    }

/* Desktop más ancho SOLO en Ranking */
@media (min-width: 1200px) {
    .container-xl {
        max-width: 1320px !important;
    }
}

@media (min-width: 1600px) {
    .container-xl {
        max-width: 1440px !important;
    }
}

.rank-subtitle {
    color: rgba(168,182,214,.95);
    font-weight: 700;
    font-size: .92rem;
    margin-top: 6px;
}

/* Sticky */
.rank-sticky {
    position: sticky;
    top: 72px;
    z-index: 20;
    padding-top: 10px;
}

.rank-sticky-inner {
    border-radius: 18px;
    border: 1px solid rgba(231,238,252,.12);
    background: rgba(13,22,38,.62);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

@media (min-width: 992px) {
    .rank-sticky-inner {
        padding: 14px 16px;
    }
}

.rank-filter-row {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

@media (min-width: 992px) {
    .rank-filter-row {
        grid-template-columns: 1fr 1fr;
    }
}

.rank-filter-label {
    color: rgba(231,238,252,.78);
    font-weight: 900;
    font-size: .82rem;
    letter-spacing: .2px;
    margin-bottom: 6px;
}

/* Selects */
.rank-select {
    border-radius: 14px;
    border: 1px solid rgba(231,238,252,.14);
    background: rgba(231,238,252,.05);
    color: rgba(231,238,252,.92);
    font-weight: 900;
    padding: .55rem .75rem;
    box-shadow: 0 10px 20px rgba(0,0,0,.12);
}

    .rank-select:focus {
        border-color: rgba(74,163,255,.55);
        box-shadow: 0 0 0 .2rem rgba(74,163,255,.18);
    }

    .rank-select option {
        color: #0b1220;
    }

/* Chips de "estado" (Temporada / Categoría) con ellipsis */
.chip-ellipsis {
    max-width: 52vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .chip-ellipsis {
        max-width: 360px;
    }
}

/* KPI strip (swipe) */
.kpi-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

    .kpi-strip::-webkit-scrollbar {
        height: 6px;
    }

    .kpi-strip::-webkit-scrollbar-thumb {
        background: rgba(231,238,252,.12);
        border-radius: 999px;
    }

.kpi-card {
    min-width: 160px;
    border-radius: 16px;
    border: 1px solid rgba(231,238,252,.12);
    background: rgba(231,238,252,.04);
    padding: 12px 12px;
}

@media (min-width: 992px) {
    .kpi-card {
        min-width: 190px;
    }
}

.kpi-card .k {
    color: var(--muted);
    font-weight: 900;
    font-size: .82rem;
}

.kpi-card .v {
    font-weight: 950;
    font-size: 1.35rem;
    margin-top: 2px;
    letter-spacing: -.2px;
}

.kpi-card .h {
    color: rgba(168,182,214,.95);
    font-size: .82rem;
    font-weight: 700;
    margin-top: 2px;
}

/* Cards premium */
.card-pro {
    background: linear-gradient(180deg, rgba(18,33,58,.98), rgba(15,27,46,.98)) !important;
    border: 1px solid rgba(231,238,252,.12) !important;
}

/* Top4 */
.top4 {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
}

    .top4::-webkit-scrollbar {
        height: 6px;
    }

    .top4::-webkit-scrollbar-thumb {
        background: rgba(231,238,252,.12);
        border-radius: 999px;
    }

.t4 {
    min-width: 220px;
    border-radius: 16px;
    border: 1px solid rgba(231,238,252,.12);
    background: rgba(231,238,252,.04);
    padding: 12px;
}

    .t4 .h {
        font-weight: 950;
    }

    .t4 .s {
        color: rgba(168,182,214,.95);
        font-weight: 700;
        font-size: .85rem;
        margin-top: 2px;
    }

/* Tabs estilo app */
.rank-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
}

    .rank-tabs::-webkit-scrollbar {
        height: 6px;
    }

    .rank-tabs::-webkit-scrollbar-thumb {
        background: rgba(231,238,252,.12);
        border-radius: 999px;
    }

    .rank-tabs .rt {
        border: 1px solid rgba(231,238,252,.12);
        background: rgba(231,238,252,.04);
        color: rgba(231,238,252,.88);
        padding: 10px 12px;
        border-radius: 999px;
        font-weight: 950;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: transform .12s ease, filter .12s ease;
    }

        .rank-tabs .rt:hover {
            filter: brightness(1.06);
            transform: translateY(-1px);
        }

        .rank-tabs .rt.active {
            background: linear-gradient(135deg, rgba(74,163,255,.30), rgba(124,92,255,.22));
            border-color: rgba(74,163,255,.45);
            color: var(--text);
            box-shadow: 0 10px 22px rgba(0,0,0,.18);
        }

.rank-panel-title {
    font-weight: 950;
    font-size: 1.06rem;
    letter-spacing: -.2px;
}

.rank-panel-hint {
    color: rgba(168,182,214,.95);
    font-weight: 700;
    font-size: .9rem;
    margin-top: 4px;
}

/* Segment mini (rachas) */
.seg-mini {
    display: flex;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(231,238,252,.12);
    background: rgba(231,238,252,.04);
}

    .seg-mini button {
        border: 0;
        background: transparent;
        color: rgba(231,238,252,.80);
        font-weight: 950;
        padding: 10px 14px;
        border-radius: 999px;
        white-space: nowrap;
    }

        .seg-mini button.active {
            color: var(--text);
            background: linear-gradient(135deg, rgba(74,163,255,.26), rgba(124,92,255,.18));
            border: 1px solid rgba(74,163,255,.38);
        }

/* Listas */
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(231,238,252,.12);
    background: rgba(231,238,252,.045);
    transition: transform .12s ease, filter .12s ease;
}

    .rank-row:hover {
        transform: translateY(-1px);
        filter: brightness(1.05);
    }

.rank-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rank-n {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(74,163,255,.20);
    background: rgba(74,163,255,.10);
    display: grid;
    place-items: center;
    font-weight: 950;
    color: rgba(231,238,252,.92);
    flex: 0 0 auto;
}

.rank-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(231,238,252,.12);
    background: rgba(231,238,252,.06);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

    .rank-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.rank-txt {
    min-width: 0;
}

.rank-name {
    font-weight: 950;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52vw;
}

@media (min-width: 992px) {
    .rank-name {
        max-width: 360px;
    }
}

.rank-sub {
    color: rgba(168,182,214,.95);
    font-size: .84rem;
    font-weight: 700;
}

.rank-stat {
    text-align: right;
    flex: 0 0 auto;
}

    .rank-stat .big {
        font-weight: 950;
        font-size: 1.12rem;
        letter-spacing: -.2px;
    }

    .rank-stat .small {
        color: rgba(168,182,214,.95);
        font-size: .82rem;
        font-weight: 700;
        opacity: .9;
    }

/* Medallas (Hall of Fame) */
.medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-weight: 950;
    border: 1px solid rgba(231,238,252,.16);
    background: rgba(231,238,252,.06);
}

    .medal.gold {
        background: rgba(255,208,71,.16);
        border-color: rgba(255,208,71,.25);
    }

    .medal.silver {
        background: rgba(209,221,238,.16);
        border-color: rgba(209,221,238,.25);
    }

    .medal.bronze {
        background: rgba(255,166,97,.16);
        border-color: rgba(255,166,97,.25);
    }

/* Bars */
.rank-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-bar {
    border-radius: 14px;
    border: 1px solid rgba(231,238,252,.12);
    background: rgba(231,238,252,.04);
    padding: 10px 12px;
}

.rank-bar-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-weight: 900;
}

    .rank-bar-top .mut {
        color: rgba(168,182,214,.95);
        font-weight: 800;
    }

.rank-bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(231,238,252,.12);
    overflow: hidden;
    margin-top: 8px;
}

.rank-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(74,163,255,.85), rgba(124,92,255,.65));
    width: 0%;
    transition: width .35s ease;
}

/* Skeletons */
.skel {
    height: 64px;
    border-radius: 16px;
    border: 1px solid rgba(231,238,252,.12);
    background: linear-gradient(90deg, rgba(231,238,252,.05), rgba(231,238,252,.10), rgba(231,238,252,.05));
    background-size: 200% 100%;
    animation: sh 1.2s ease-in-out infinite;
}

@keyframes sh {
    0% {
        background-position: 0 0
    }

    100% {
        background-position: 200% 0
    }
}

/* Overlay */
.ol-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(8,12,20,.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ol-overlay-card {
    width: min(420px, 92vw);
    border-radius: 18px;
    border: 1px solid rgba(231,238,252,.14);
    background: rgba(13,22,38,.78);
    box-shadow: 0 18px 44px rgba(0,0,0,.28);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ol-overlay-txt .t {
    font-weight: 950;
}

.ol-overlay-txt .s {
    color: rgba(168,182,214,.95);
    font-weight: 700;
    font-size: .9rem;
    margin-top: 2px;
}


/* Allow duo/dupla names to wrap (avoid truncation) */
.rank-name--wrap {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.15
}

.rank-left {
    min-width: 0
}

.rank-txt {
    min-width: 0
}
/* Segment scroll (para mobile, muchos botones) */
.seg-mini.seg-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .seg-mini.seg-scroll::-webkit-scrollbar {
        display: none;
    }

    .seg-mini.seg-scroll button {
        flex: 0 0 auto;
    }
.duo-modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 576px) {
    .duo-modal-grid {
        grid-template-columns: 1fr 180px;
        align-items: start;
    }
}

.duo-kpi {
    padding: 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.03);
}

.duo-label {
    font-weight: 800;
    opacity: .75;
    font-size: .9rem;
}

.duo-big {
    font-size: 2.2rem;
    font-weight: 950;
    line-height: 1.05;
    margin-top: 6px;
}

.duo-small {
    opacity: .7;
    margin-top: 8px;
    line-height: 1.25;
}

.duo-actions .btn {
    border-radius: 12px;
}

.duo-tip {
    font-size: .9rem;
    opacity: .7;
}
.duo-players {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.duo-player {
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

    .duo-player:hover {
        background: rgba(255,255,255,.12);
        transform: translateY(-2px);
    }