
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal {
    background: white;
    border-radius: 20px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease-out;
    position: relative;
    display: block;

}

.modal-header {
    background: #015293;
    color: white;
    padding: 25px 30px;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="30" cy="10" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="70" cy="10" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateX(-100px);
    }

    100% {
        transform: translateX(100px);
    }
}

.modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.modal-header .subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 0;
    max-height: 70vh;
    overflow-y: auto;
}

.torneos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    padding: 30px;
}

.torneo-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    position: relative;
}

.torneo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.torneo-header {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.torneo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.torneo-card:hover .torneo-image {
    transform: scale(1.05);
}

.torneo-placeholder {
    font-size: 60px;
    color: rgba(255, 255, 255, 0.8);
}

.categoria-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.categoria-masculino {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
}

.categoria-femenino {
    background: #f9b233;
    color: white;
}

.categoria-mixto {
    background: linear-gradient(45deg, #a8edea, #fed6e3);
    color: #333;
}

.categoria-infantil {
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
    color: #333;
}

.estado-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #00c851;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
}

.torneo-content {
    padding: 25px;
}

.torneo-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.torneo-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 14px;
}

.info-item i {
    width: 18px;
    color: #ffca79;
}

.torneo-dates {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.date-item:last-child {
    margin-bottom: 0;
}

.date-label {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.date-value {
    color: #666;
    font-size: 13px;
}

.torneo-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/*     .btn {
        padding: 12px 20px;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .btn-primary {
        background: linear-gradient(45deg, #ff6b35, #f7931e);
        color: white;
        flex: 1;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
    }

    .btn-secondary {
        background: #f8f9fa;
        color: #666;
        border: 1px solid #e0e0e0;
    }

    .btn-secondary:hover {
        background: #e9ecef;
        color: #333;
    }
 */
.no-torneos {
    text-align: center;
    padding: 60px 30px;
    color: #666;
}

.no-torneos i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-torneos h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.no-torneos p {
    font-size: 16px;
    line-height: 1.6;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Si hay solo un torneo, la card será más pequeña y estará centrada */
.torneos-grid.single-torneo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.torneos-grid.single-torneo .torneo-card {
    max-width: 500px;
    /* Ajusta el tamaño que quieras */
    width: 100%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal {
        width: 98%;
        margin: 10px;
        max-height: 95vh;

    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 22px;
    }

    .torneos-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 15px;
    }

    .torneo-card {
        min-width: 0;
    }

    .torneo-header {
        height: 160px;
    }

    .torneo-content {
        padding: 20px;
    }

    .torneo-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 15px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .torneos-grid {
        padding: 15px;
    }

    .torneo-content {
        padding: 15px;
    }

    .close-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}