/* --- ESTILOS TARJETAS DE TORNEOS --- */

/* CARD GENERAL */
.tournament-card {
    background-color: #1e1e1e;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    min-height: 150px;
    position: relative;
    border: 1px solid #333;
    transition: transform 0.2s;
    color: #e0e0e0; /* Texto base claro */
}

.tournament-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* ESTILOS ESPECÍFICOS PARA TORNEOS PROPIOS */
.card-propio {
    border: 1px solid #0056b3;
    background-color: #242424;
}

/* COLUMNA IMAGEN */
.image-column {
    width: 130px;
    flex-shrink: 0;
    background-color: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    min-height: 150px;
}

.image-column img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

.image-column:hover img {
    opacity: 0.8;
}

/* CAJA DE FECHA */
.date-box {
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px;
    text-align: center;
    border-radius: 6px;
    min-width: 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(2px);
}

.date-box .month {
    font-family: "Montserrat", sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    line-height: 1;
    font-weight: 700;
    color: #ffd700;
}

.date-box .day {
    font-family: "Montserrat", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.1;
}

/* COLUMNA INFO */
.info-column {
    padding: 12px 15px;
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    justify-content: center;
}

.platform-info {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    flex-wrap: wrap;
    gap: 5px;
}

.platform-name {
    font-family: "Montserrat", sans-serif;
    color: #4caf50;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tournament-title {
    font-family: "Montserrat", sans-serif;
    font-size: 1.2em;
    font-weight: 700;
    margin: 2px 0 6px 0;
    line-height: 1.2;
    color: #fff;
}

.tournament-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.tournament-title a:hover {
    color: #4caf50;
}

.date-full-text {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 10px;
}

/* BOTONES Y ACCIONES */
.actions-row {
    display: flex;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-inscribirse { background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%); color: white; }
.btn-ver-torneo { background: linear-gradient(135deg, #0056b3 0%, #004494 100%); color: white; }
.btn-inscriptos { background: transparent; color: #ccc; border: 1px solid #555; }
.btn-whatsapp { background-color: #25D366; color: white; }
.btn-web { background-color: #333; border: 1px solid #555; color: white; }

.btn-action:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* BADGES */
.badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-sistema { background: #0056b3; color: white; }
.badge-insc { color: #ff9800; border: 1px solid #ff9800; }
.badge-live { color: #f44336; border: 1px solid #f44336; animation: blink 2s infinite; }

@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }

/* MODAL TORNEOS (Estilos específicos para evitar conflictos) */
.modal-torneo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000; /* Mayor que el otro modal */
}

.modal-content-torneo {
    max-width: 95%;
    max-height: 95%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
}

.modal-close-torneo {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
}

@media (max-width: 500px) {
    .tournament-card {
        flex-direction: column;
    }
    .image-column {
        width: 100%;
        height: 160px;
        min-height: 160px;
    }
    .info-column {
        padding: 15px;
    }
}

/* --- ESTILOS TARJETAS DE TORNEOS --- */

/* CARD GENERAL */
.tournament-card {
    background-color: #1e1e1e;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    min-height: 150px; /* Altura Estándar */
    position: relative;
    border: 1px solid #333;
    transition: transform 0.2s;
    color: #e0e0e0;
}

.tournament-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* ESTILOS ESPECÍFICOS PARA TORNEOS PROPIOS */
.card-propio {
    border: 1px solid #0056b3;
    background-color: #242424;
}

/* COLUMNA IMAGEN */
.image-column {
    width: 130px; /* Ancho Estándar */
    flex-shrink: 0;
    background-color: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    min-height: 150px; /* Altura Estándar */
}

.image-column img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

.image-column:hover img { opacity: 0.8; }

/* CAJA DE FECHA */
.date-box {
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px;
    text-align: center;
    border-radius: 6px;
    min-width: 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(2px);
}

.date-box .month {
    font-family: "Montserrat", sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    line-height: 1;
    font-weight: 700;
    color: #ffd700;
}

.date-box .day {
    font-family: "Montserrat", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.1;
}

/* COLUMNA INFO */
.info-column {
    padding: 12px 15px;
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    justify-content: center;
}

.platform-info {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    flex-wrap: wrap;
    gap: 5px;
}

.platform-name {
    font-family: "Montserrat", sans-serif;
    color: #4caf50;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tournament-title {
    font-family: "Montserrat", sans-serif;
    font-size: 1.2em; /* Fuente Estándar */
    font-weight: 700;
    margin: 2px 0 6px 0;
    line-height: 1.2;
    color: #fff;
}

.tournament-title a { color: inherit; text-decoration: none; transition: color 0.2s; }
.tournament-title a:hover { color: #4caf50; }

.date-full-text {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 10px;
}

/* BOTONES Y ACCIONES */
.actions-row { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-inscribirse { background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%); color: white; }
.btn-ver-torneo { background: linear-gradient(135deg, #0056b3 0%, #004494 100%); color: white; }
.btn-inscriptos { background: transparent; color: #ccc; border: 1px solid #555; }
.btn-whatsapp { background-color: #25D366; color: white; }
.btn-web { background-color: #333; border: 1px solid #555; color: white; }
.btn-live { background-color: #d32f2f; color: white; border: 1px solid #b71c1c; } /* Nuevo estilo botón Live */

.btn-action:hover { opacity: 0.9; transform: translateY(-1px); }

/* BADGES */
.badge { font-size: 0.65rem; padding: 2px 6px; border-radius: 3px; font-weight: bold; text-transform: uppercase; }
.badge-sistema { background: #0056b3; color: white; }
.badge-insc { color: #ff9800; border: 1px solid #ff9800; }
.badge-live { color: #f44336; border: 1px solid #f44336; animation: blink 2s infinite; }

@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }

/* --- ESTILOS VERSIÓN COMPACTA (Plan Basic - 30% más chico) --- */
.card-compact {
    min-height: 105px !important; /* De 150px a 105px */
}

.card-compact .image-column {
    width: 90px !important; /* De 130px a 90px */
    min-height: 105px !important;
}

.card-compact .tournament-title {
    font-size: 0.95rem !important; /* Texto más chico */
    margin-bottom: 3px;
}

.card-compact .date-box {
    transform: scale(0.8); /* Fecha más chica */
    top: 2px;
    left: 2px;
}

.card-compact .btn-action {
    padding: 4px 8px; /* Botones más chicos */
    font-size: 0.7rem;
}

.card-compact .info-column {
    padding: 8px 10px;
}

/* MODAL TORNEOS */
.modal-torneo {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9); display: none;
    align-items: center; justify-content: center; z-index: 2000;
}
.modal-content-torneo { max-width: 95%; max-height: 95%; box-shadow: 0 0 20px rgba(0, 0, 0, 0.8); border-radius: 4px; }
.modal-close-torneo { position: absolute; top: 20px; right: 30px; font-size: 3rem; color: #fff; cursor: pointer; }

@media (max-width: 500px) {
    .tournament-card { flex-direction: column; }
    .image-column { width: 100%; height: 160px; min-height: 160px; }
    
    /* Ajuste Mobile para Compacto */
    .card-compact .image-column { width: 100% !important; height: 100px !important; min-height: 100px !important; }
}

/* ... (código anterior de .image-column:hover img) ... */

/* NUEVO: Placeholder cuando no hay imagen */
.placeholder-icon-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2a2a2a; /* Un poco más claro que el fondo normal */
    color: #555; /* Color de la copa sutil */
    font-size: 4rem; /* Tamaño grande para la copa */
    cursor: default; /* No mostrar manito de click */
}

/* Ajuste para versión compacta */
.card-compact .placeholder-icon-container {
    font-size: 3rem;
}

        .brand-header-container {
            width: 75%;
            margin: 0 auto 20px auto;
            padding-top: 15px;
            display: flex;
            justify-content: center;
        }

        .brand-logo-text {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-wrap: nowrap;
            white-space: nowrap;
            gap: 2px; /* Espacio mínimo entre elementos */
        }

        /* ESTILO 1: Las "Pastillas" (WWW. y .NET) - AJUSTADAS */
        .brand-pill {
            font-family: 'Consolas', monospace;
            
            /* VOLVEMOS AL FONDO VERDE / LETRA BLANCA */
            background-color: #4caf50; 
            color: white;
            
            font-size: 2rem; 
            
            /* PADDING MÍNIMO (Apenas unos pixeles extra) */
            padding: 2px 2px; 
            line-height: 1; /* Altura de línea compacta */
            
            display: flex;
            align-items: center;
            justify-content: center;
            
            /* Sombra suave */
            box-shadow: 0 2px 3px rgba(0,0,0,0.2);
            
            /* Corrección visual vertical para fuente pixelada */
            padding-top: 2px; 
            padding-bottom: 2px;
        }

        .pill-start {
            border-top-left-radius: 4px;
            border-bottom-left-radius: 4px;
            border-top-right-radius: 4px;
            border-bottom-right-radius: 4px;
        }

        .pill-end {
            border-top-left-radius: 4px;
            border-bottom-left-radius: 4px;
            border-top-right-radius: 4px;
            border-bottom-right-radius: 4px;
        }

        /* ESTILO 2: Texto Central (PADELCALENDAR) */
        .brand-main-text {
            font-family: 'Space Mono', monospace;
            background-color: transparent;
            color: #4caf50;
            
            /* Tamaño +10% aprox respecto a las pills */
            font-size: 3rem;
            
            display: flex;
            align-items: center;
            margin-top: -2px; 
            letter-spacing: -0.5px;
            font-weight: bold;
        }

        .brand-padel {
            font-weight: 400;
        }

        .brand-calendar {
            font-weight: 1800;
        }

        /* Ajustes Mobile */
        @media (max-width: 400px) {
            .brand-header-container { width: 95%; }
            .brand-pill { font-size: 0.65rem; padding: 2px 5px; }
            .brand-main-text { font-size: 0.8rem; }
        }


        /* --- CATEGORÍAS EN TARJETAS --- */
.categories-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 8px;
    min-height: 24px; /* Altura mínima para evitar saltos */
}

.cat-pill {
    font-family: 'Roboto', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

/* --- COLORES ESPECÍFICOS --- */

/* Caballeros (Celeste) */
.cat-cab {
    background-color: #4fc3f7; /* Celeste vibrante */
    color: #000; /* Texto oscuro para contraste */
}
.cat-cab-suma {
    background-color: #0288d1; /* Azul más oscuro */
}

/* Damas (Rosa) */
.cat-dama {
    background-color: #ff80ab; /* Rosa suave */
    color: #000;
}
.cat-dama-suma {
    background-color: #c51162; /* Rosa/Fucsia oscuro */
    color: #fff;
}

/* Default / Mixtos */
.cat-neutral {
    background-color: #78909c;
}

/* --- LOADING SKELETON (Intermitente) --- */
.cat-pill.loading {
    background-color: #333;
    color: transparent;
    width: 40px;
    height: 18px;
    animation: pulse 1.5s infinite ease-in-out;
    border: 1px solid #444;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}


/* --- ESTILOS PARA EXTERNOS (PLANES) --- */

/* 1. NO PRO: Imagen Bloqueada (Blanco y Negro) */
.img-locked {
    filter: grayscale(100%);
    opacity: 0.7;
    cursor: default !important; /* Quita la manito */
    pointer-events: none;       /* Bloquea el click */
    transition: all 0.3s ease;
}

/* 2. PRO: Spoiler de Categorías (Estilo Lista Pública) */
.spoiler-details {
    margin-top: 10px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

.spoiler-summary {
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4fc3f7; /* Celeste del tema */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none; /* Quitar triángulo por defecto */
    outline: none;
    transition: background 0.2s;
}

.spoiler-summary:hover {
    background-color: rgba(79, 195, 247, 0.1);
}

/* Ocultar marcador nativo en Chrome/Safari */
.spoiler-summary::-webkit-details-marker {
    display: none;
}

/* Icono +/- */
.spoiler-summary::after {
    content: '+';
    font-size: 1.1em;
    font-weight: bold;
    color: #888;
}

details[open] .spoiler-summary::after {
    content: '-';
    color: #fff;
}

.spoiler-content {
    padding: 10px 12px;
    font-size: 0.8rem;
    color: #ccc;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    white-space: pre-line; /* Respeta saltos de línea */
    line-height: 1.4;
}

.app-footer {
    position: fixed; /* Lo clava en la pantalla */
    bottom: 0;
    left: 50%;
    transform: translateX(-50%); /* Lo centra perfectamente */
    width: 100%;
    max-width: 900px; /* Respeta el ancho de tu app */
    background-color: #1e1e1e; /* Color gris oscuro de tus secciones */
    border-top: 2px solid #333; /* Borde sutil superior */
    padding: 10px 0;
    z-index: 1000; /* Asegura que flote sobre todo */
    box-shadow: 0 -4px 10px rgba(0,0,0,0.5); /* Sombra hacia arriba */
}

.footer-content {
    display: flex;
    justify-content: space-around; /* Separa los elementos */
    align-items: center;
    padding: 0 15px;
}

/* Estilo botón Instagram Oscuro */
.instagram-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #e0e0e0;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    padding: 6px 12px;
    background-color: #333; /* Fondo botón */
    border-radius: 20px;
    border: 1px solid #444;
    transition: background-color 0.2s;
}

.instagram-pill:hover {
    background-color: #444;
    color: #fff;
}

/* Ajuste para el contador en fondo oscuro */
.visit-counter-dark img {
    opacity: 0.8; /* Un poco más tenue para no encandilar */
    vertical-align: middle;
}

/* Espacio extra al final del body para que el footer no tape contenido */
body {
    padding-bottom: 70px !important;
}

