/* Más ancho para la vista de rondas */
.container {
    max-width: 100%;
}

.layout-wrapper {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.public-home {
    min-height: 100vh;
}

.home-hero-wrapper {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: -1.5rem;
    overflow: hidden;
}

.home-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(13, 110, 253, 0.85), rgba(17, 24, 39, 0.88)),
        url('/assets/img/ui/cab_home.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 4rem 0;
    border-radius: 0;
}

.home-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.10), rgba(0,0,0,0.22));
}

.home-hero-badge {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    font-size: 0.9rem;
    font-weight: 600;
}

.public-kpi-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border-radius: 16px;
}

.public-kpi-card:hover {
    transform: translateY(-2px);
}

.public-kpi-icon {
    font-size: 1.4rem;
    color: #0d6efd;
}

.public-ranking-row,
.public-tournament-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #eef1f4;
    border-radius: 14px;
    background: #fff;
    transition: background 0.18s ease, transform 0.18s ease;
    justify-content: space-between;
    min-width: 0;
}

.public-ranking-row:hover,
.public-tournament-row:hover {
    background: #f8fafc;
}

.public-ranking-pos {
    width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.public-ranking-number {
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -0.03em;
    color: #0f172a;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    line-height: 1;
}

.public-ranking-photo {
    width: 44px;
    height: 44px;
    object-fit: cover;
    flex-shrink: 0;
}

.public-ranking-avatar {
    width: 110px;
    height: 70px;
    margin-top: -12px;
    margin-bottom: -12px;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    clip-path: polygon(20% 0%, 100% 0%, 80% 100%, 0% 100%);
    background: #dfe6ee;
}

.public-ranking-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    display: block;
}

.public-latest-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    border: 1px solid #e9edf2;
    border-radius: 20px;
    background: #fff;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.public-latest-card:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.public-latest-title {
    line-height: 1.15;
}

.public-latest-lock {
    min-width: 42px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.public-latest-type-badge,
.public-latest-players-badge,
.public-latest-points-badge {
    font-size: 0.95rem;
}

.public-latest-points-badge {
    background: #f4e3a3;
    color: #6b5600;
    border: 1px solid #e5cb72;
}

.public-latest-winner {
    min-height: auto;
}

.public-latest-trophy {
    font-size: 2.1rem;
    line-height: 1;
    color: #d4a72c;
}

.public-latest-winner-photo {
    width: 52px;
    height: 52px;
    object-fit: cover;
    flex-shrink: 0;
}

.public-latest-winner-name {
    font-size: 1.1rem;
    line-height: 1.3;
}

.public-latest-view-btn {
    min-width: 110px;
}

/* Start Card Podium */
.public-podium-card {
    border: 1px solid #e9edf2;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.public-podium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.public-podium-image-wrap {
    position: relative;
    height: 320px;
    overflow: hidden;
}

.public-podium-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.public-podium-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.08) 0%,
        rgba(15, 23, 42, 0.28) 38%,
        rgba(15, 23, 42, 0.72) 100%
    );
}

.public-podium-color-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.9;
}

.podium-card-first .public-podium-color-overlay {
    background: linear-gradient(
        135deg,
        rgba(212, 167, 44, 0.06) 0%,
        rgba(212, 167, 44, 0.18) 30%,
        rgba(212, 167, 44, 0.04) 100%
    );
}

.podium-card-second .public-podium-color-overlay {
    background: linear-gradient(
        135deg,
        rgba(148, 163, 184, 0.08) 0%,
        rgba(148, 163, 184, 0.18) 30%,
        rgba(148, 163, 184, 0.05) 100%
    );
}

.podium-card-third .public-podium-color-overlay {
    background: linear-gradient(
        135deg,
        rgba(176, 113, 74, 0.08) 0%,
        rgba(176, 113, 74, 0.18) 30%,
        rgba(176, 113, 74, 0.05) 100%
    );
}

.public-podium-rank {
    position: absolute;
    top: 18px;
    right: 18px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.95);
    z-index: 3;
}

.public-podium-rank-1 {
    font-size: 4.2rem;
    color: #d4a72c;
}

.public-podium-rank-2 {
    font-size: 3.6rem;
    color: #b9c2cc;
}

.public-podium-rank-3 {
    font-size: 3.6rem;
    color: #b0714a;
}

.public-podium-content {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 3;
}

.public-podium-name {
    font-size: 1.45rem;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.public-podium-points {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.public-podium-points-1 {
    color: #f2cc58;
}

.public-podium-points-2 {
    color: #d8dee6;
}

.public-podium-points-3 {
    color: #d59a73;
}

.public-podium-tournaments-badge {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.45rem 0.7rem;
}

/**/
.public-trending-row {
    position: relative;
    min-height: 118px;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.public-trending-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.public-trending-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.public-trending-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.62) 49%,
        rgba(13, 110, 253, 0.48) 92%,
        rgba(13, 110, 253, 0.28) 100%
    );
}

.public-trending-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 18px;
    color: #fff;
}

.public-trending-points {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
    color: #f2cc58;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.public-trending-name {
    font-size: 1.5rem;
    margin-top: 25px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.45rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.public-trending-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.92);
}

.public-trending-stats strong {
    font-weight: 700;
}

.public-trending-result-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    line-height: 1;
}

.public-ranking-meta-pill {
    font-weight: 500;
}

.public-ranking-defending-pill {
    background: #fff7db !important;
    border-color: #efd98a !important;
    color: #6b5600 !important;
}

.public-ranking-meta-pill {
    font-weight: 500;
}

.public-ranking-defending-pill {
    background: #fff7db !important;
    border-color: #efd98a !important;
    color: #6b5600 !important;
}

/* ===== Ranking Search ===== */

.public-ranking-search-wrap {
    position: relative;
    width: min(100%, 260px);
}

.public-ranking-search-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    font-size: 14px;
}

.public-ranking-search-input {
    height: 40px;
    padding-left: 2.3rem;
    padding-right: 2.3rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: all 0.15s ease;
}

.public-ranking-search-input::placeholder {
    color: #94a3b8;
}

.public-ranking-search-clear {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #64748b;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
    cursor: pointer;
}

.public-ranking-search-clear:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #0f172a;
}

.public-ranking-search-clear i {
    font-size: 12px;
    line-height: 1;
}


@media (max-width: 767.98px) {
    .public-trending-row {
        min-height: 108px;
    }

    .public-trending-content {
        padding: 14px 14px;
    }

    .public-trending-points {
        top: 10px;
        right: 12px;
        font-size: 1.15rem;
    }

    .public-trending-name {
        font-size: 1rem;
        padding-right: 72px;
    }

    .public-trending-stats {
        font-size: 0.78rem;
        gap: 4px 10px;
    }

    .public-ranking-search-wrap {
        width: 100%;
    }

    .public-ranking-search-input {
        height: 38px;
    }

    .public-podium-image-wrap {
        height: 260px;
    }

    .public-podium-rank-1 {
        font-size: 3.3rem;
    }

    .public-podium-rank-2,
    .public-podium-rank-3 {
        font-size: 3rem;
    }

    .public-podium-name {
        font-size: 1.2rem;
    }

    .public-podium-points {
        font-size: 1rem;
    }

    .public-podium-image-wrap {
        height: 200px;
    }

    .public-podium-name {
        font-size: 1.1rem;
    }
}

.min-w-0 {
    min-width: 0;
}


@media (max-width: 767.98px) {
    .home-hero {
        padding: 3rem 0;
        border-radius: 0 0 20px 20px;
        background-attachment: scroll;
    }

    .public-tournament-row {
        padding: 10px 12px;
    }

    .public-latest-card {
        padding: 1rem;
        border-radius: 16px;
    }

    .public-latest-title {
        font-size: 1.2rem !important;
    }

    .public-latest-winner {
        min-height: auto;
    }

    .public-latest-winner-photo {
        width: 46px;
        height: 46px;
    }

    .public-latest-trophy {
        font-size: 1.8rem;
    }

    .public-latest-view-btn {
        min-width: 96px;
    }

    .public-ranking-row {
        position: relative;
        gap: 10px;
        padding: 10px 12px;
    }

    .public-ranking-pos {
        position: absolute;
        z-index: 1005;
        top: 25px;
        left: 25px;
    }

    .public-ranking-number {
        font-size: 2.4rem;
        color: #fdfdfd;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }

    .public-ranking-avatar {
        width: 104px;
        height: 104px;
    }

    .public-ranking-avatar::before,
    .public-ranking-avatar::after {
        width: 6px;
    }

    .public-ranking-row {
        flex-wrap: wrap;
        align-items: center;
        row-gap: 6px;
    }

    .public-ranking-points{
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .public-ranking-row .small .badge,
    .public-ranking-row .text-end .badge {
        font-size: 0.6rem;
    }

    .public-ranking-row .min-w-0 {
        min-width: 0;
        font-size: 1rem;
        padding-top: 5px;
    }
    
    .pill-primary-color {
        font-size: 0.8rem !important;
    }

    .layout-wrapper {
        padding-left: 5px;
        padding-right: 5px;
    }
}

@media (max-width: 460px) {
    .hide-under-460 {
        display: none !important;
    }

    .responsive-fs {
        font-size: 0.75rem !important;
    }

    .layout-wrapper {
        padding-left: 5px;
        padding-right: 5px;
    }

}