/* ==============================================
   Torneo Público - Estilos específicos
   Extraído de _TorneoPublicoBody.cshtml
   ============================================== */

:root {
    --pz-blue: #29b6f6;
    --pz-dark-blue: #0288d1;
    --pz-yellow: #ffd700;
    --pz-bg: #f4f6f9;
    --pz-white: #ffffff;
    --pz-text-dark: #333333;
    --pz-text-muted: #6c757d;
    --pz-court-green: #4caf50;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--pz-bg);
    color: var(--pz-text-dark);
}

h1, h2, h3, h4, h5, .nav-link-custom {
    font-family: 'Montserrat', sans-serif;
}

/* Navbar */
.navbar {
    background-color: var(--pz-white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

/* Hero con Carousel */
.tournament-hero {
    position: relative;
    color: white;
    padding: 80px 0 60px;
    overflow: hidden;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Indicadores del carousel */
.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 8px;
}

.hero-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
}

.hero-indicator.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

.hero-indicator:hover {
    background: rgba(255, 255, 255, 0.7);
}

.tournament-format {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 4px;
    margin-top: 12px;
}

.btn-ver-galeria {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 0.45rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

    .btn-ver-galeria:hover {
        background: rgba(255, 255, 255, 0.35);
        color: white;
        transform: translateY(-1px);
    }

/* Sponsors - Carrusel infinito */
.sponsors-strip {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    position: relative;
}

.sponsors-track {
    display: flex;
    width: max-content;
    animation: scroll-infinite 20s linear infinite;
}

.sponsors-track:hover {
    animation-play-state: paused;
}

.sponsor-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    flex-shrink: 0;
}

.sponsor-logo {
    height: 40px;
    max-width: 150px;
    object-fit: contain;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: 0.3s;
}

.sponsor-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.sponsor-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6c757d;
    white-space: nowrap;
}

.sponsor-text i {
    color: var(--pz-blue);
}

@keyframes scroll-infinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Scroll horizontal en tabs */
.nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.nav-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.nav-tabs .nav-link {
    white-space: nowrap;
}

/* Tabs */
.nav-pills .nav-link {
    color: var(--pz-text-muted);
    font-weight: 600;
    border-radius: 50px;
    padding: 10px 25px;
    margin-right: 10px;
}

.nav-pills .nav-link.active {
    background-color: var(--pz-blue);
    color: white;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--pz-text-muted);
    font-weight: 600;
    padding-bottom: 10px;
}

.nav-tabs .nav-link.active {
    color: var(--pz-blue);
    border-bottom: 3px solid var(--pz-blue);
    background: transparent;
}

/* Cards */
.card-custom {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    background: white;
    margin-bottom: 20px;
}

.card-header-custom {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px;
}

/* Tables */
.table-custom thead th {
    border-top: none;
    color: var(--pz-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
}

.rank-pos {
    width: 25px;
    height: 25px;
    background: var(--pz-blue);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.rank-pos.classified {
    background: var(--pz-court-green);
}

/* Info Icons */
.info-icon {
    width: 40px;
    height: 40px;
    background: rgba(41, 182, 246, 0.1);
    color: var(--pz-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

/* My Matches Section */
#myMatchesSection {
    display: none;
}

/* Loading */
.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: var(--pz-blue);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
footer {
    background-color: #111;
    color: #fff;
    padding: 40px 0;
    margin-top: 60px;
}

/* Accordion */
.accordion-button:not(.collapsed) {
    color: var(--pz-dark-blue);
    background-color: rgba(41, 182, 246, 0.1);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
}

/* Bracket styles */
.bracket-admin-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px 0;
}

.bracket-admin {
    display: flex;
    flex-direction: row-reverse;
    gap: 40px;
    padding: 20px;
    width: fit-content;
    margin: 0 auto;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.round-title {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #2d3748;
    text-transform: uppercase;
}

.round-matches {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
}

.bracket-match {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
}

.match-info {
    background: #f7fafc;
    padding: 6px 10px;
    font-size: 0.75rem;
    color: #718096;
    border-bottom: 1px solid #e2e8f0;
}

.match-team {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
}

.match-team:last-child {
    border-bottom: none;
}

.match-team.winner {
    background-color: #c6f6d5;
    font-weight: 600;
}

.btn-torneos {
    background-color: transparent;
    color: var(--pz-blue);
    border: 2px solid var(--pz-blue);
    border-radius: 20px;
    padding: 6px 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-torneos:hover {
    background-color: var(--pz-blue);
    color: white;
}

/* Filtros de partidos */
.filtro-categoria-select {
    max-width: 280px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border-color: #dee2e6;
    color: var(--pz-text-dark);
    cursor: pointer;
}

.filtro-categoria-select:focus {
    border-color: var(--pz-blue);
    box-shadow: 0 0 0 0.2rem rgba(41, 182, 246, 0.25);
}

.dia-chip {
    background: #e9ecef;
    color: var(--pz-text-dark);
    border: none;
    font-weight: 500;
    white-space: nowrap;
    text-transform: capitalize;
    transition: all 0.2s;
    position: relative;
}

.dia-chip.active {
    background: var(--pz-dark-blue);
    color: white;
}

.dia-chip:hover:not(.active) {
    background: #dee2e6;
}

.dia-chip.dia-chip-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.dot-hoy {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #28a745;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
}

.dia-chip.active .dot-hoy {
    background: white;
}

.dia-bar::-webkit-scrollbar {
    display: none;
}

.dia-bar {
    scrollbar-width: none;
}

.categoria-pills {
    scrollbar-width: none;
}

.categoria-pills::-webkit-scrollbar {
    display: none;
}

.categoria-pills .nav-link {
    padding: .25rem .5rem;
    font-size: .875rem;
    font-weight: 500;
    margin-right: .5rem;
}

.categoria-pill-pendiente {
    opacity: 0.7;
    border: 1px dashed #6c757d !important;
    color: #6c757d !important;
    background: transparent !important;
}

.categoria-pill-pendiente.active {
    opacity: 1;
    background: #f8f9fa !important;
    color: #495057 !important;
}

/* Mis Partidos - Scroll horizontal */
.mis-partidos-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mis-partidos-scroll::-webkit-scrollbar {
    display: none;
}

.mis-partidos-card {
    flex: 0 0 80%;
    max-width: 300px;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .mis-partidos-card {
        flex: 0 0 300px;
    }
}

/* Mi Partido Card - Compact */
.mi-partido-card {
    background: white;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #dee2e6;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mi-partido-finalizado {
    border-left-color: #28a745;
}

.mi-partido-por-jugar {
    border-left-color: #ffc107;
}

.mi-partido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mi-partido-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pz-text-muted);
}

.mi-partido-meta {
    font-size: 0.7rem;
    color: var(--pz-text-muted);
    font-weight: 500;
}

.mi-partido-teams {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    margin-bottom: 10px;
}

.mi-partido-team {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mi-partido-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--pz-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mi-partido-winner .mi-partido-name {
    color: #2e7d32;
    font-weight: 700;
}

.mi-partido-trophy {
    font-size: 0.7rem;
    color: #ffc107;
    flex-shrink: 0;
}

.mi-partido-middle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding-left: 2px;
}

.mi-partido-vs {
    font-size: 0.7rem;
    color: var(--pz-text-muted);
    font-weight: 600;
}

.mi-partido-score {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--pz-text-dark);
    letter-spacing: 0.5px;
}

.mi-partido-middle .btn-share-match {
    font-size: 0.75rem;
    padding: 2px 6px;
    flex-shrink: 0;
}

.mi-partido-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: var(--pz-text-muted);
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
    margin-top: auto;
}

/* Modal extras */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

#modalLogoEquipo .modal-dialog {
    max-width: 90vw;
}

#modalLogoEquipo .modal-content {
    background: rgba(0,0,0,0.8) !important;
}
