/* ===============================================================
   VARIABLES & RESET
=============================================================== */
:root {
    --app-white: #ffffff;
    --app-maroon: #560321;
    --app-maroon-soft: #7a0c3a;
    --app-maroon-deep: #2d0112;
    --app-gold: #ffd700;
    --app-gold-soft: #fff7cf;
    --app-text: #2b2b2b;
    --glass-bg: rgba(255, 255, 255, 0.09);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

html {
    font-size: 15px;
    position: relative;
    min-height: 100%;
}
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* ===============================================================
   ADMIN LAYOUT (usa _Layout.cshtml — fondo claro)
=============================================================== */
body {
    background: linear-gradient(180deg, #ffffff 0%, #fffafa 100%);
    color: var(--app-text);
    margin-bottom: 0;
}

.app-navbar {
    background-color: var(--app-maroon);
}
.app-navbar .nav-link,
.app-navbar .navbar-brand {
    color: #fff !important;
}
.app-navbar .nav-link:hover {
    color: var(--app-gold) !important;
}

.app-footer {
    background-color: #fff;
    position: absolute;
    bottom: 0;
    width: 100%;
}

/* ===============================================================
   PUBLIC LAYOUT (usa _PublicLayout.cshtml — fondo oscuro/glass)
=============================================================== */
body.public-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at top left, #7a0c3a 0%, transparent 55%),
        radial-gradient(ellipse at bottom right, #3a0117 0%, transparent 55%),
        linear-gradient(160deg, #2d0112 0%, #560321 50%, #1a000a 100%);
    background-attachment: fixed;
    color: #fff;
}

.public-page-wrap {
    flex: 1; /* ocupa todo el espacio sobrante, empuja el footer al fondo */
    padding-bottom: 6rem; /* espacio para la barra flotante */
}

.public-main {
    padding-top: 1rem;
}

/* Footer público eliminado por diseño */
.public-footer { display: none; }

/* ===============================================================
   PUBLIC — FLOATING NAV (Equipos / Actividades)
=============================================================== */
.public-floatbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 16px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 0 12px;
    pointer-events: none;
}

.public-floatbar-top {
    pointer-events: auto;
}

.public-floatbar-inner {
    pointer-events: auto;
    width: min(520px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.public-floatbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: background 0.2s ease, transform 0.2s ease;
}

.public-floatbar-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.public-floatbar-circle {
    pointer-events: auto;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.05rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.public-floatbar-circle:hover {
    transform: translateY(-1px);
    background: rgba(0, 0, 0, 0.45);
}

/* ===============================================================
   PUBLIC — LIGHT THEME (sin morado)
   Aplica solo en el frontend público (`body.public-body`)
=============================================================== */
body.public-body {
    background: #ffffff;
    color: var(--app-text);
    position: relative;
    overflow-x: hidden;
}

/* Capa de manchas de color / explosiones de humo */
body.public-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 15% 25%, rgba(86, 3, 33, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 85% 75%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 123, 255, 0.1) 0%, transparent 60%),
        radial-gradient(circle at 75% 15%, rgba(40, 167, 69, 0.12) 0%, transparent 45%);
    filter: blur(50px);
    animation: background-drift 15s ease-in-out infinite alternate;
}

@keyframes background-drift {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-2%, 2%); }
}

/* Manchas adicionales dinámicas */
.color-splash {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.35;
    pointer-events: none;
    animation: splash-pulse 6s ease-in-out infinite alternate;
}

@keyframes splash-pulse {
    0% { transform: scale(1); opacity: 0.25; }
    100% { transform: scale(1.6); opacity: 0.45; }
}

body.public-body .public-footer { display: none; }

body.public-body .public-floatbar-inner {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.public-body .public-floatbar-btn {
    color: var(--app-text);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body.public-body .public-floatbar-btn:hover {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(0, 0, 0, 0.16);
}

body.public-body .public-floatbar-btn:active {
    transform: translateY(0);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body.public-body .public-floatbar-circle {
    color: var(--app-text);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.public-body .public-floatbar-circle:hover {
    background: rgba(255, 255, 255, 0.85);
}

@media (max-width: 480px) {
    .public-floatbar {
        gap: 6px;
    }

    .public-floatbar-circle {
        width: 42px;
        height: 42px;
        font-size: 0.95rem;
    }
}

body.public-body .glass-card {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

/* Home sin scroll (modo compacto) */
body.public-body.home-index-mode {
    overflow: hidden;
}

body.public-body.home-index-mode .public-page-wrap {
    padding-bottom: 5.1rem;
}

.home-index-page {
    min-height: calc(100vh - 112px);
}

@media (max-width: 480px) {
    .home-index-page {
        min-height: calc(100vh - 96px);
        padding-top: 0.35rem !important;
        padding-bottom: 0.2rem !important;
    }

    .home-index-page .text-center.mb-5 {
        margin-bottom: 0.65rem !important;
    }

    .home-index-page .home-logo {
        height: 54px;
        margin-bottom: 0.35rem !important;
    }

    .home-index-page .glass-title {
        font-size: 1.35rem;
        margin-bottom: 0.15rem;
    }

    .home-index-page .glass-subtitle {
        font-size: 0.8rem;
    }

    .home-index-page .glass-card {
        margin-bottom: 0.55rem !important;
        padding: 0.85rem !important;
    }

    .home-index-page .team-track {
        height: 52px;
    }

    .home-index-page .team-name-label {
        width: 64px;
        font-size: 0.72rem;
    }

    .home-index-page .team-pin .team-logo-img,
    .home-index-page .team-pin .team-logo-fallback {
        width: 42px;
        height: 42px;
    }
}

body.public-body .glass-title {
    color: var(--app-text);
    text-shadow: none;
}

body.public-body .glass-subtitle {
    color: rgba(0, 0, 0, 0.65);
}

/* Mantener look, pero con contraste en tema claro */
body.public-body .btn-back-glass {
    color: rgba(0, 0, 0, 0.78);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.public-body .btn-back-glass:hover {
    color: rgba(0, 0, 0, 0.9);
    background: #ffffff;
}

body.public-body .glass-search-wrap {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.public-body .glass-search-icon {
    color: rgba(0, 0, 0, 0.55);
}

body.public-body .glass-search-input {
    color: var(--app-text);
}

body.public-body .glass-search-input::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

body.public-body .glass-search-btn {
    background: var(--app-maroon);
    color: #fff;
}

body.public-body .glass-search-btn:hover {
    background: var(--app-maroon-soft);
}

body.public-body .team-track::before {
    background: rgba(0, 0, 0, 0.08);
}

/* Home (racing chart): mismo look limpio que Equipos */
body.public-body .team-pin .team-logo-img {
    background: transparent;
    border: none;
    box-shadow: none;
    width: 68px;
    height: 68px;
    object-fit: contain;
}

body.public-body .team-pin .team-logo-fallback {
    background: transparent;
    border: none;
    box-shadow: none;
    width: 68px;
    height: 68px;
    color: var(--app-text);
}

body.public-body .team-pin .team-score-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #7a5b00;
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: none;
}

@media (max-width: 480px) {
    body.public-body .team-pin .team-logo-img,
    body.public-body .team-pin .team-logo-fallback {
        width: 52px;
        height: 52px;
    }
}

body.public-body .team-name-label {
    color: rgba(0, 0, 0, 0.72);
}

body.public-body .ranking-header {
    color: var(--app-text);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.public-body .ranking-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
}

body.public-body .ranking-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

body.public-body .rank-name {
    color: var(--app-text);
}

/* ===============================================================
   HOME — TABLA RESUMEN ESTILO EXCEL
=============================================================== */
.summary-grid-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
    border-radius: 1.2rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.summary-grid-main {
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.85));
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.84rem;
}

.summary-table th,
.summary-table td {
    border: 1px solid rgba(0, 0, 0, 0.065);
    text-align: center;
    padding: 0.34rem 0.24rem;
    white-space: nowrap;
}

.summary-table thead th {
    font-weight: 800;
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.75);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(242, 242, 242, 0.95));
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.summary-table .team-col {
    text-align: left;
    padding-left: 0.6rem;
    width: 112px;
    font-weight: 700;
}

.summary-table .team-head-col {
    width: 56px;
    padding: 0.24rem 0.15rem;
}

.summary-head-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.summary-head-fallback {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.08);
    color: #222;
    font-size: 0.7rem;
}

.summary-table .total-col {
    width: 62px;
    font-weight: 800;
    background: linear-gradient(180deg, #4cff4c, #25db25);
    color: #0e330e;
}

.summary-table .total-val {
    background: rgba(24, 24, 24, 0.06);
    color: #1c1c1c;
}

.summary-table .total-row td {
    background: var(--app-maroon) !important;
    color: #fff !important;
    font-weight: 800;
    font-size: 0.95rem;
}
.summary-table tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.02);
}

.summary-table tbody tr:hover td {
    background: rgba(0, 0, 0, 0.045);
}

.score-cell {
    font-weight: 800;
}

.score-empty {
    background: rgba(0, 0, 0, 0.02);
}

.score-badge-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.game-row-head {
    padding-left: 0.35rem !important;
}

.game-row-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.game-row-image {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.game-row-name {
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.summary-legend {
    min-width: 240px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0.7rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.55rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 245, 245, 0.95));
}

.legend-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.25px;
}

.legend-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.legend-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.25px;
}

.legend-rule-list {
    display: grid;
    gap: 0.3rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.82);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
    padding: 0.3rem 0.4rem;
}

.legend-badge-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
}

@media (max-width: 900px) {
    .summary-grid-wrap {
        grid-template-columns: 1fr;
    }
    .summary-legend {
        border-left: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        flex-direction: column;
        justify-content: flex-start;
        min-width: 0;
        padding: 0.6rem;
    }
}

@media (max-width: 480px) {
    .summary-table {
        font-size: 0.71rem;
    }
    .summary-table .team-col {
        width: 78px;
        padding-left: 0.35rem;
    }
    .summary-table .team-head-col {
        width: 38px;
        padding: 0.18rem 0.08rem;
    }
    .summary-table .total-col {
        width: 44px;
    }
    .summary-table th,
    .summary-table td {
        padding: 0.2rem 0.1rem;
    }
    .summary-legend {
        padding: 0.42rem;
        gap: 0.4rem;
    }
    .legend-title {
        font-size: 0.76rem;
    }
    .legend-section-title {
        font-size: 0.66rem;
    }
    .legend-item {
        font-size: 0.68rem;
        padding: 0.22rem 0.32rem;
    }
    .legend-badge-img {
        width: 17px;
        height: 17px;
    }
    .summary-head-logo {
        width: 28px;
        height: 28px;
    }
    .game-row-image {
        width: 24px;
        height: 24px;
        border-radius: 6px;
    }
    .score-badge-img {
        width: 18px;
        height: 18px;
    }
    .game-row-name {
        font-size: 0.62rem;
    }
}

/* ===============================================================
   GLASS MORPHISM BASE
=============================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    box-shadow: var(--glass-shadow);
    padding: 1.75rem;
    transition:
        box-shadow 0.25s ease,
        transform 0.25s ease;
}
.glass-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
}

/* ===============================================================
   TIPOGRAFIA PUBLICA
=============================================================== */
.glass-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    margin-bottom: 0.35rem;
}
.glass-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    margin-bottom: 0;
}
.text-gold {
    color: var(--app-gold) !important;
}

/* ===============================================================
   TEAMS — CARDS (pantalla Equipos)
=============================================================== */
.team-card-v {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 220px;
    padding: 1.1rem;
}

.team-logo-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: clamp(120px, 18vw, 190px);
}

.team-logo-wrap .team-logo-img {
    width: auto;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transform: scale(1.12);
    background: transparent;
    border: none;
    box-shadow: none;
}

.team-logo-wrap .team-logo-fallback {
    width: min(170px, 90%);
    height: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    font-size: clamp(1.2rem, 4vw, 2.2rem);
    background: transparent;
    border: none;
    box-shadow: none;
}

.team-card-info {
    margin-top: 0.25rem;
}

.team-card-name {
    font-weight: 800;
    line-height: 1.15;
    margin-top: 0.25rem;
    margin-bottom: 0.15rem;
}

.team-card-score {
    font-weight: 700;
    font-size: 0.92rem;
}

@media (max-width: 480px) {
    .team-card-v {
        min-height: 150px;
        padding: 0.65rem 0.6rem;
    }

    .team-logo-wrap {
        height: clamp(88px, 26vw, 120px);
    }

    .team-card-name {
        font-size: 0.92rem;
    }

    .team-card-score {
        font-size: 0.8rem;
    }
}

/* Contraste en tema claro (sin tocar títulos/volver) */
body.public-body .team-card-name {
    color: var(--app-text);
}

body.public-body .team-card-score {
    color: rgba(0, 0, 0, 0.65);
}

body.public-body .team-card-score small {
    color: rgba(0, 0, 0, 0.45);
}

/* ===============================================================
   HOME — LOGO
=============================================================== */
.home-logo {
    height: 90px;
    filter: drop-shadow(0 4px 18px rgba(255, 215, 0, 0.35));
    animation: pulse 2.5s ease-in-out infinite;
}

/* ===============================================================
   HOME — GRAFICO DE EQUIPOS (racing chart)
=============================================================== */
.team-chart {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding: 0.5rem 0;
}

.team-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.15rem 0;
}
.team-row-leader .team-name-label {
    color: var(--app-gold);
    font-weight: 700;
}

/* Track (línea de carrera) */
.team-track {
    flex: 1;
    position: relative;
    height: 72px;
}

/* Línea de fondo */
.team-track::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-50%);
}

/* Barra de progreso rellena */
.team-track-fill {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), var(--team-color, var(--app-gold)));
    transform: translateY(-50%);
    border-radius: 2px;
    animation: race-fill 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
}

@keyframes race-fill {
    from { width: 0; }
    to { width: var(--prog, 5%); }
}

.team-pin {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    z-index: 10;
    animation: race-pin 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
}

@keyframes race-pin {
    from { left: 0; }
    to { left: var(--prog, 5%); }
}

/* Logo líder: glow dorado y pulso de victoria */
.team-pin-leader .team-logo-img,
.team-pin-leader .team-logo-fallback {
    box-shadow: 
        0 0 0 3px var(--team-color, var(--app-gold)),
        0 0 20px 6px var(--team-color, rgba(255, 215, 0, 0.55));
    animation: leader-pulse 2s ease-in-out infinite 2.1s;
}

@keyframes leader-pulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.15); filter: brightness(1.2); box-shadow: 0 0 0 5px var(--app-gold), 0 0 30px 10px rgba(255, 215, 0, 0.7); }
}

/* Fin de animaciones de carrera */


.team-logo-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.4);
}
.team-logo-fallback {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(86, 3, 33, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: #fff;
}
.team-score-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--app-gold);
    background: rgba(0, 0, 0, 0.55);
    border-radius: 99px;
    padding: 1px 6px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.team-name-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
    width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    text-align: right;
}
@media (max-width: 480px) {
    .team-name-label {
        width: 60px;
        font-size: 0.7rem;
    }
    .team-logo-img,
    .team-logo-fallback {
        width: 40px;
        height: 40px;
    }
}

/* ===============================================================
   HOME — BOTON VER ACTIVIDADES
=============================================================== */
.btn-ver-actividades {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(
        135deg,
        rgba(86, 3, 33, 0.7),
        rgba(122, 12, 58, 0.7)
    );
    border: 1px solid var(--glass-border);
    border-radius: 3rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
    letter-spacing: 0.3px;
}
.btn-ver-actividades:hover {
    color: var(--app-gold);
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 215, 0, 0.25);
    background: linear-gradient(
        135deg,
        rgba(122, 12, 58, 0.8),
        rgba(86, 3, 33, 0.8)
    );
}

/* Botón "volver" glass */
.btn-back-glass {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    padding: 0.3rem 0.85rem;
    backdrop-filter: blur(10px);
    transition:
        color 0.2s,
        background 0.2s;
}
.btn-back-glass:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

/* ===============================================================
   ACTIVIDADES — BUSCADOR GLASS
=============================================================== */
.glass-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 3rem;
    padding: 0.5rem 0.5rem 0.5rem 1.25rem;
    box-shadow: var(--glass-shadow);
    max-width: 540px;
    margin: 0 auto;
}
.glass-search-icon {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1rem;
    flex-shrink: 0;
}
.glass-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.95rem;
}
.glass-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.glass-search-btn {
    background: var(--app-maroon);
    color: #fff;
    border: none;
    border-radius: 2rem;
    padding: 0.45rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.glass-search-btn:hover {
    background: var(--app-maroon-soft);
}

/* ===============================================================
   ACTIVIDADES — GRID DE TARJETAS CUADRADAS
=============================================================== */
.activity-grid-card {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    background-color: #3a0117;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.activity-grid-card:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

/* Overlay degradado permanente (oscuro abajo) */
.activity-grid-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.25) 55%,
        transparent 100%
    );
    transition: background 0.3s ease;
}
.activity-grid-card:hover .activity-grid-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.5) 55%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

/* Contenido (nombre + botón) */
.activity-grid-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem;
    gap: 0.5rem;
}
.activity-grid-name {
    color: #fff;
    font-weight: 700;
    font-size: clamp(0.75rem, 2vw, 1rem);
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    line-height: 1.3;
    z-index: 2;
}
.activity-grid-cta {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--app-gold);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 2rem;
    padding: 0.3rem 0.85rem;
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(6px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
    z-index: 2;
    white-space: nowrap;
}
.activity-grid-card:hover .activity-grid-cta {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================================================
   ADMIN — ACTIVIDADES (mismo grid que público, adaptado a fondo claro)
=============================================================== */
.admin-activities-grid .activity-grid-card {
    background-color: #ffffff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
}
.admin-activities-grid .activity-grid-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.16) 55%,
        transparent 100%
    );
}
.admin-activities-grid .activity-grid-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}
.activity-grid-card.admin-activity-add {
    background: repeating-linear-gradient(
        45deg,
        rgba(86, 3, 33, 0.06),
        rgba(86, 3, 33, 0.06) 10px,
        rgba(86, 3, 33, 0.02) 10px,
        rgba(86, 3, 33, 0.02) 20px
    );
    border: 2px dashed rgba(86, 3, 33, 0.35);
}
.activity-grid-card.admin-activity-add .activity-grid-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.08) 55%,
        transparent 100%
    );
}
.activity-grid-card.admin-activity-add .activity-grid-name {
    font-size: 2.2rem !important;
    line-height: 1;
}
.activity-grid-card.admin-activity-add .activity-grid-cta {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.35);
}
.activity-grid-card.admin-activity-selected {
    outline: 3px solid rgba(255, 215, 0, 0.75);
    outline-offset: 3px;
}

/* ===============================================================
   RANKING — GLASS CARD
=============================================================== */
.ranking-header {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition:
        background 0.2s,
        transform 0.2s;
}
.ranking-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}
.ranking-item:last-child {
    margin-bottom: 0;
}

/* Primer, segundo, tercer lugar */
.rank-gold {
    background: rgba(255, 215, 0, 0.12) !important;
    border-color: rgba(255, 215, 0, 0.35) !important;
    box-shadow:
        0 0 18px rgba(255, 215, 0, 0.2),
        inset 0 0 12px rgba(255, 215, 0, 0.06);
}
.rank-silver {
    background: rgba(192, 192, 192, 0.1) !important;
    border-color: rgba(192, 192, 192, 0.3) !important;
}
.rank-bronze {
    background: rgba(205, 127, 50, 0.1) !important;
    border-color: rgba(205, 127, 50, 0.3) !important;
}

.rank-pos {
    font-size: 1.3rem;
    min-width: 2rem;
    text-align: center;
    flex-shrink: 0;
}
.rank-name {
    flex: 1;
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}
.rank-value {
    font-weight: 700;
    color: var(--app-gold);
    font-size: 0.9rem;
    white-space: nowrap;
}
.rank-value small {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    font-size: 0.75em;
    margin-left: 2px;
}

/* Tabla de rondas glass */
.glass-table {
    color: rgba(255, 255, 255, 0.85);
}
.glass-table thead th {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
    padding: 0.65rem 1rem;
}
.glass-table tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.65rem 1rem;
    color: rgba(255, 255, 255, 0.85);
}
.glass-table tbody tr:last-child td {
    border-bottom: none;
}
.glass-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

/* ===============================================================
   ANIMACIONES
=============================================================== */
.fade-in-up {
    animation: fadeUp 0.45s ease both;
}
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

/* ===============================================================
   ADMIN — COMPONENTES (heredados, sin cambios)
=============================================================== */
.card-modern {
    border: 1px solid #f0dede;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(122, 12, 12, 0.08);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(122, 12, 12, 0.16);
}
.btn-app {
    background-color: var(--app-maroon);
    color: #fff;
    border: none;
}
.btn-app:hover {
    background-color: var(--app-maroon-soft);
    color: #fff;
}
.badge-app {
    background-color: var(--app-gold-soft);
    color: #7a5b00;
    border: 1px solid var(--app-gold);
}
.first-place {
    background-color: var(--app-gold-soft);
    border-left: 6px solid var(--app-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}
.login-mini {
    background: #fff;
    border: 1px solid #e8d5d5;
    border-radius: 0.75rem;
    padding: 0.75rem;
}
.text-app-maroon {
    color: var(--app-maroon);
}
.admin-hidden-link {
    color: #9a9a9a;
    font-size: 0.78rem;
    text-decoration: none;
    opacity: 0.6;
    transition:
        opacity 0.2s ease,
        color 0.2s ease;
}
.admin-hidden-link:hover {
    color: var(--app-maroon);
    opacity: 1;
    text-decoration: underline;
}
.splash-wrapper {
    min-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.splash-logo {
    max-width: 260px;
    animation: pulse 1.2s infinite;
}

/* ===============================================================
   ACTIVITY CARD (lista admin / previous design backup)
=============================================================== */
.activity-card {
    border-radius: 1rem;
    background: #fff;
    min-height: 130px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.activity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(86, 3, 33, 0.13) !important;
}
.activity-card-body.has-image {
    padding-right: 260px !important;
}
.activity-card-img-wrap {
    width: 250px;
    pointer-events: none;
    overflow: hidden;
}
.activity-card-fade {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 55%;
    background: linear-gradient(to right, #fff 0%, transparent 100%);
    z-index: 1;
}
.activity-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.activity-card:hover .activity-card-img {
    transform: scale(1.04);
}
.activity-card-link:hover .card-title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Badge tipos */
.badge-position {
    background-color: #28a745;
    color: white;
    border: 1px solid #218838;
}
.badge-time {
    background-color: #007bff;
    color: white;
    border: 1px solid #0062cc;
}
.badge-elimination {
    background-color: #dc3545;
    color: white;
    border: 1px solid #b02a37;
}
.badge-rounds {
    background-color: #ffc107;
    color: #212529;
    border: 1px solid #d39e00;
}
.badge-score {
    background-color: #6f42c1;
    color: white;
    border: 1px solid #563d7c;
}

/* ===============================================================
   MODERN DASHBOARD CARDS
 =============================================================== */
.card-modern {
    border: none;
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: #fff;
}

.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-modern .card-img-top {
    border-bottom: 4px solid var(--app-gold);
    transition: transform 0.5s ease;
}

.card-modern:hover .card-img-top {
    transform: scale(1.05);
}

.btn-app {
    background-color: var(--app-maroon);
    color: white;
    border-radius: 0.75rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-app:hover {
    background-color: var(--app-maroon-soft);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(86, 3, 33, 0.2);
}

.text-app-maroon {
    color: var(--app-maroon) !important;
}

.bg-app-maroon {
    background-color: var(--app-maroon) !important;
}

